1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE CPL_REGISTER |
8 |
C *==========================================================* |
9 |
C | SUBROUTINE CPL_REGISTER | |
10 |
C | o Routine controlling registration with MIT coupler. | |
11 |
C | - Atmospheric version - | |
12 |
C *==========================================================* |
13 |
C | This version talks to the MIT Coupler. It uses the MIT | |
14 |
C | Coupler "checkpoint1" library calls. | |
15 |
C *==========================================================* |
16 |
IMPLICIT NONE |
17 |
|
18 |
C == Global variables == |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "ATMIDS.h" |
22 |
|
23 |
C == Routine arguments == |
24 |
C myThid - Thread number for this instance of the routine |
25 |
INTEGER myThid |
26 |
CEndOfInterface |
27 |
|
28 |
C == Local variables == |
29 |
#ifdef COMPONENT_MODULE |
30 |
C Arrays for passing attributes to the coupler |
31 |
INTEGER iReg(4,nSx,nSy) |
32 |
Real*4 rReg(4,nSx,nSy) |
33 |
C bi, bj, J - Loop counters |
34 |
INTEGER bi,bj,J |
35 |
C Base coordinates of a tile on the global grid. |
36 |
INTEGER iG0, jG0 |
37 |
#endif |
38 |
|
39 |
|
40 |
C-- Register with the MIT coupler |
41 |
#ifdef COMPONENT_MODULE |
42 |
DO bj=1,nSy |
43 |
DO bi=1,nSx |
44 |
jG0 = myYGlobalLo+(bj-1)*sNy |
45 |
iG0 = myXGlobalLo+(bi-1)*sNx |
46 |
IREG(1,bi,bj)=sNx |
47 |
IREG(2,bi,bj)=sNy |
48 |
IREG(3,bi,bj)=iG0 |
49 |
IREG(4,bi,bj)=jG0 |
50 |
ENDDO |
51 |
ENDDO |
52 |
CALL MITCOMPONENT_TILE_REGISTER( nSx, nSy, ireg, rreg ) |
53 |
#endif |
54 |
|
55 |
|
56 |
RETURN |
57 |
END |