1 |
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 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CBOP 0 |
7 |
C !ROUTINE: CPL_REGISTER |
8 |
|
9 |
C !INTERFACE: |
10 |
SUBROUTINE CPL_REGISTER |
11 |
|
12 |
C !DESCRIPTION: |
13 |
C *==========================================================* |
14 |
C | SUBROUTINE CPL_REGISTER |
15 |
C | o Routine controlling registration with MIT coupler. |
16 |
C | - Atmospheric version - |
17 |
C *==========================================================* |
18 |
C | This version talks to the MIT Coupler. It uses the MIT |
19 |
C | Coupler "checkpoint1" library calls. |
20 |
C *==========================================================* |
21 |
|
22 |
C !USES: |
23 |
IMPLICIT NONE |
24 |
C == Global variables == |
25 |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
27 |
#include "ATMIDS.h" |
28 |
|
29 |
C !INPUT/OUTPUT PARAMETERS: |
30 |
C == Routine arguments == |
31 |
C myThid :: Thread number for this instance of the routine |
32 |
c INTEGER myThid |
33 |
CEOP |
34 |
|
35 |
#ifdef COMPONENT_MODULE |
36 |
C !LOCAL VARIABLES: |
37 |
C == Local variables == |
38 |
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 |
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 |
iReg(1,bi,bj) = sNx |
54 |
iReg(2,bi,bj) = sNy |
55 |
iReg(3,bi,bj) = iG0 |
56 |
iReg(4,bi,bj) = jG0 |
57 |
ENDDO |
58 |
ENDDO |
59 |
CALL MITCOMPONENT_TILE_REGISTER( nSx, nSy, iReg, rReg ) |
60 |
#endif /* COMPONENT_MODULE */ |
61 |
|
62 |
RETURN |
63 |
END |