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