/[MITgcm]/MITgcm/pkg/atm_compon_interf/cpl_register.F
ViewVC logotype

Diff of /MITgcm/pkg/atm_compon_interf/cpl_register.F

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

revision 1.2 by jmc, Fri Dec 25 19:43:43 2009 UTC revision 1.3 by jmc, Wed Nov 27 21:54:45 2013 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    
7  CBOP 0  CBOP 0
# Line 25  C     == Global variables == Line 26  C     == Global variables ==
26  #include "SIZE.h"  #include "SIZE.h"
27  #include "EEPARAMS.h"  #include "EEPARAMS.h"
28  #include "ATMIDS.h"  #include "ATMIDS.h"
29    #ifdef ALLOW_EXCH2
30    # include "W2_EXCH2_SIZE.h"
31    # include "W2_EXCH2_TOPOLOGY.h"
32    # include "W2_EXCH2_PARAMS.h"
33    #endif /* ALLOW_EXCH2 */
34    
35  C !INPUT/OUTPUT PARAMETERS:  C !INPUT/OUTPUT PARAMETERS:
36  C     == Routine arguments ==  C     == Routine arguments ==
# Line 38  C     == Local variables == Line 44  C     == Local variables ==
44  C     bi, bj    :: Tile indices  C     bi, bj    :: Tile indices
45  C     j         :: Loop counter  C     j         :: Loop counter
46  C     iG0, jG0  :: Base coordinates of a tile on the global grid.  C     iG0, jG0  :: Base coordinates of a tile on the global grid.
47  C     iReg,rReg :: Arrays for passing attributes to the coupler  C     iReg      :: Array for passing attributes to the coupler
48        INTEGER iG0, jG0        INTEGER iG0, jG0
49        INTEGER bi, bj        INTEGER bi, bj
50  c     INTEGER j        INTEGER j, nTiles
51        INTEGER iReg(4,nSx,nSy)        INTEGER iReg(6,nSx*nSy)
52        Real*4  rReg(4,nSx,nSy)  #ifdef ALLOW_EXCH2
53          INTEGER tN
54    #endif /* ALLOW_EXCH2 */
55    
56  C--   Register with the MIT coupler  C--   Register with the MIT coupler
57          j = 0
58        DO bj=1,nSy        DO bj=1,nSy
59         DO bi=1,nSx         DO bi=1,nSx
60            j = j+1
61          jG0 = myYGlobalLo+(bj-1)*sNy          jG0 = myYGlobalLo+(bj-1)*sNy
62          iG0 = myXGlobalLo+(bi-1)*sNx          iG0 = myXGlobalLo+(bi-1)*sNx
63          iReg(1,bi,bj) = sNx  #ifdef ALLOW_EXCH2
64          iReg(2,bi,bj) = sNy          IF ( W2_useE2ioLayOut ) THEN
65          iReg(3,bi,bj) = iG0            tN = W2_myTileList(bi,bj)
66          iReg(4,bi,bj) = jG0            iG0 = exch2_txGlobalo(tN)
67              jG0 = exch2_tyGlobalo(tN)
68            ENDIF
69    #endif /* ALLOW_EXCH2 */
70            iReg(1,j) = bi
71            iReg(2,j) = bj
72            iReg(3,j) = sNx
73            iReg(4,j) = sNy
74            iReg(5,j) = iG0
75            iReg(6,j) = jG0
76         ENDDO         ENDDO
77        ENDDO        ENDDO
78        CALL MITCOMPONENT_TILE_REGISTER( nSx, nSy, iReg, rReg )        nTiles = nSx*nSy
79          CALL MITCOMPONENT_TILE_REGISTER( nTiles, iReg )
80  #endif /* COMPONENT_MODULE */  #endif /* COMPONENT_MODULE */
81    
82        RETURN        RETURN

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22