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

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

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


Revision 1.3 - (hide annotations) (download)
Wed Nov 27 21:54:45 2013 UTC (10 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint65, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.2: +30 -10 lines
- change component tile registration (cpl_register.F in both compon_interf
  and mitcomponent_tile_register.F) to pass the full list of tiles
  information (including bi,bj) in 1 vector (instead of in a bi,bj matrix).
- with pkg/exch2: adopt the same convention used for I/O to define mapping
  towards coupler global array (unless W2_useE2ioLayOut=F):
   a) can now use different tiling between atm & ocn comp.
   b) no needs to modify the run-Off map when changing tiling (was needed
      even if using the same tiling between atm & ocn).
   c) will allow to run with blank-tiles in 1 component (e.g., for ocean
      full land tiles); not yet tested.

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/cpl_register.F,v 1.2 2009/12/25 19:43:43 jmc Exp $
2 jmc 1.2 C $Name: $
3 jmc 1.1
4 jmc 1.3 #include "PACKAGES_CONFIG.h"
5 jmc 1.1 #include "CPP_OPTIONS.h"
6    
7 jmc 1.2 CBOP 0
8     C !ROUTINE: CPL_REGISTER
9    
10     C !INTERFACE:
11 jmc 1.1 SUBROUTINE CPL_REGISTER
12 jmc 1.2
13     C !DESCRIPTION:
14 jmc 1.1 C *==========================================================*
15 jmc 1.2 C | SUBROUTINE CPL_REGISTER
16     C | o Routine controlling registration with MIT coupler.
17     C | - Atmospheric version -
18 jmc 1.1 C *==========================================================*
19 jmc 1.2 C | This version talks to the MIT Coupler. It uses the MIT
20     C | Coupler "checkpoint1" library calls.
21 jmc 1.1 C *==========================================================*
22 jmc 1.2
23     C !USES:
24 jmc 1.1 IMPLICIT NONE
25     C == Global variables ==
26     #include "SIZE.h"
27     #include "EEPARAMS.h"
28     #include "ATMIDS.h"
29 jmc 1.3 #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 jmc 1.1
35 jmc 1.2 C !INPUT/OUTPUT PARAMETERS:
36 jmc 1.1 C == Routine arguments ==
37 jmc 1.2 C myThid :: Thread number for this instance of the routine
38     c INTEGER myThid
39     CEOP
40 jmc 1.1
41 jmc 1.2 #ifdef COMPONENT_MODULE
42     C !LOCAL VARIABLES:
43 jmc 1.1 C == Local variables ==
44 jmc 1.2 C bi, bj :: Tile indices
45     C j :: Loop counter
46     C iG0, jG0 :: Base coordinates of a tile on the global grid.
47 jmc 1.3 C iReg :: Array for passing attributes to the coupler
48 jmc 1.2 INTEGER iG0, jG0
49     INTEGER bi, bj
50 jmc 1.3 INTEGER j, nTiles
51     INTEGER iReg(6,nSx*nSy)
52     #ifdef ALLOW_EXCH2
53     INTEGER tN
54     #endif /* ALLOW_EXCH2 */
55 jmc 1.1
56     C-- Register with the MIT coupler
57 jmc 1.3 j = 0
58 jmc 1.1 DO bj=1,nSy
59     DO bi=1,nSx
60 jmc 1.3 j = j+1
61 jmc 1.1 jG0 = myYGlobalLo+(bj-1)*sNy
62     iG0 = myXGlobalLo+(bi-1)*sNx
63 jmc 1.3 #ifdef ALLOW_EXCH2
64     IF ( W2_useE2ioLayOut ) THEN
65     tN = W2_myTileList(bi,bj)
66     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 jmc 1.1 ENDDO
77     ENDDO
78 jmc 1.3 nTiles = nSx*nSy
79     CALL MITCOMPONENT_TILE_REGISTER( nTiles, iReg )
80 jmc 1.2 #endif /* COMPONENT_MODULE */
81 jmc 1.1
82     RETURN
83     END

  ViewVC Help
Powered by ViewVC 1.1.22