1 |
|
2 |
*************************************************************************************** |
3 |
| Initialisation | |
4 |
*************************************************************************************** |
5 |
|
6 |
MITCOMPONENT_init |
7 |
================= |
8 |
|
9 |
CALL MITCOMPONENT_init( |
10 |
I name, |
11 |
O comm ) |
12 |
|
13 |
name - Name of component to register e.g. |
14 |
'ocean', 'atmos', 'ice', 'land'. Up to |
15 |
MAX_COMPONENTS ( see "CPLR_SIG.h" ) |
16 |
are allowed. Default is MAX_COMPONENTS = 10. |
17 |
|
18 |
comm - MPI_Communicator which includes all procs. |
19 |
that registered as component type 'name. |
20 |
|
21 |
Each process can only register as one component type. |
22 |
|
23 |
Every process has to call MITCOMPONENT_init at the |
24 |
same point otherwise everything deadlocks or dies. |
25 |
Except the coupler process which calls MITCOUPLER_init. |
26 |
|
27 |
Initialises the MPI context for a particular component |
28 |
model. On return the component is given a communicator |
29 |
that can be used for communication based on MPI |
30 |
for the processes of the component. Internal |
31 |
coupler data structures are also populated that |
32 |
hold information about the component. Typical start-up |
33 |
sequence is |
34 |
|
35 |
Ocean model (N processes) |
36 |
: |
37 |
: |
38 |
MPI_Init |
39 |
MITCOMPONENT_init('Ocean', MPI_COMM_Ocean ) |
40 |
|
41 |
Atmos model (M processes) |
42 |
: |
43 |
: |
44 |
MPI_Init |
45 |
MITCOMPONENT_init('Atmos', MPI_COMM_Atmos ) |
46 |
|
47 |
Coupler (one process only) |
48 |
: |
49 |
: |
50 |
MPI_Init |
51 |
MITCOUPLER_init( 'Coupler', MPI_COMM_Coupler ) |
52 |
|
53 |
|
54 |
MITCOMPONENT_tile_register |
55 |
========================== |
56 |
MITCOMPONENT_tile_register( |
57 |
I ntx, nty, ireg, rreg ) |
58 |
ntx - number of tiles in X to register |
59 |
nty - number of tiles in Y to register |
60 |
ireg - array of integer tile attributes. |
61 |
Current attributes are: |
62 |
ireg(1,bi,bj) - tile size in X |
63 |
ireg(2,bi,bj) - tile size in Y |
64 |
ireg(3,bi,bj) - tile base coordinate on global grid in X |
65 |
ireg(4,bi,bj) - tile base coordinate on global grid in Y |
66 |
Declared: |
67 |
INTEGER IREG(4,NTX,NTY) |
68 |
|
69 |
rreg - array of float (32-bit) tile attributes |
70 |
Current attributes are: |
71 |
rreg is not used at the moment. |
72 |
Declared: |
73 |
REAL*4 RREG(4,NTX,NTY) |
74 |
|
75 |
MITCOMPONENT_register |
76 |
===================== |
77 |
MITCOMPONENT_register( |
78 |
I nx, ny, 1, 1 ) |
79 |
routine for registering tile size for a single tile model. |
80 |
Deprecated - use MITCOMPONENT_tile_register with ntx and nty |
81 |
set to 1. This routine will not be supported in future coupler releases. |
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
*************************************************************************************** |
90 |
| Sending data | |
91 |
*************************************************************************************** |
92 |
COMPSEND_R4 |
93 |
=========== |
94 |
COMPSEND_R4('Q_a',nx,0,ny,0,Q_surf) |
95 |
REAL*4 Q_surf(nx,ny) |
96 |
|
97 |
COMPSEND_R4TILES |
98 |
================ |
99 |
COMPSEND_R4TILES('SST_o',nx,0,ny,0,1,nSx,nSy, SST) |
100 |
REAK*4 SST(SNX,SNY,NSX,NSY) |
101 |
|
102 |
COMPSEND_R8TILES |
103 |
================ |
104 |
COMPSEND_R8TILES('Ocean Mask',nx,0,ny,0,1,nSx,nSy, landmask) |
105 |
REAK*8 LANDMASK(SNX,SNY,NSX,NSY) |
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
*************************************************************************************** |
113 |
| Receiving data | |
114 |
*************************************************************************************** |
115 |
COMPRECV_R4 |
116 |
=========== |
117 |
COMPRECV_R4('SST_a',nx,0,ny,0,SST) |
118 |
REAL*4 SST(nx,ny) |
119 |
CALL COMPRECV_R4(dataname,sNx,OLx,sNy,OLy,array) |
120 |
REAL*4 array(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
121 |
|
122 |
COMPRECV_R8 |
123 |
=========== |
124 |
COMPRECV_R8('Ocean Mask',nx,0,ny,0,landmask) |
125 |
REAL*8 landmask(nx,ny) |
126 |
CALL COMPRECV_R8(dataname,sNx,OLx,sNy,OLy,array) |
127 |
REAL*8 array(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |