/[MITgcm]/MITgcm/eesupp/src/exch_cycle_ebl.F
ViewVC logotype

Contents of /MITgcm/eesupp/src/exch_cycle_ebl.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Sun Feb 4 14:38:43 2001 UTC (23 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.1: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/exch_cycle_ebl.F,v 1.1 1998/09/29 18:53:44 cnh Exp $
2 C $Name: $
3
4 SUBROUTINE EXCH_CYCLE_EBL( myThid )
5 C /==========================================================\
6 C | SUBROUTINE EXCH_CYCLE_EBL |
7 C | o Cycle exchange buffer level. |
8 C |==========================================================|
9 C | Step the "exchange buffer level" to next value. |
10 C | The buffer level is used to prevent consecutive messages |
11 C | overwriting one another. Because we know that every tile |
12 C | will participate in an exchange we can be sure that every|
13 C | tile will cycle through the buffers with the same |
14 C | sequence. Also we know that a tile cannot start a new |
15 C | exchange before it has completed its end of the previous |
16 C | exchange. Thus by cycling through three buffer levels we |
17 C | can be sure that the buffer we write to will be free. |
18 C | That is by the time we are participating in the third |
19 C | exchange transaction we know that both ends of the first |
20 C | transaction must have completed. |
21 C | Note -- |
22 C | 1. We allow more than three levels below although this |
23 C | is not necessary. |
24 C \==========================================================/
25 IMPLICIT NONE
26 C == Global data ==
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "EESUPPORT.h"
30 #include "EXCH.h"
31
32 C == Routine arguments ==
33 C myThid - Thread number of this instance of the routine
34 INTEGER myThid
35
36 C == Local variables ==
37 C bi, bj - Loop counters
38 INTEGER bi, bj
39
40 DO bj=myByLo(myThid),myByHi(myThid)
41 DO bi=myBxLo(myThid),myBxHi(myThid)
42 C-- Use next level exchange buffer in cycle.
43 exchangeBufLevel(1,bi,bj) = exchangeBufLevel(1,bi,bj)+1
44 IF ( exchangeBufLevel(1,bi,bj) .GT. NUMBER_OF_BUFFER_LEVELS )
45 & exchangeBufLevel(1,bi,bj) = 1
46 ENDDO
47 ENDDO
48
49 RETURN
50 END

  ViewVC Help
Powered by ViewVC 1.1.22