1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ATM2D_OPTIONS.h" |
5 |
|
6 |
CBOP 0 |
7 |
C !ROUTINE: EXCH_COMPONENT_CONFIGS |
8 |
|
9 |
C !INTERFACE: |
10 |
SUBROUTINE EXCH_COMPONENT_CONFIGS( msgUnit ) |
11 |
|
12 |
C !DESCRIPTION: |
13 |
C *==========================================================* |
14 |
C | SUBROUTINE EXCH_COMPONENT_CONFIGS |
15 |
C | o Routine which controls exchange of component model |
16 |
C | configuration information to other components. |
17 |
C *==========================================================* |
18 |
|
19 |
C !USES: |
20 |
IMPLICIT NONE |
21 |
C == Global variables == |
22 |
C Data on ocean grid |
23 |
c#include "OCNSIZE.h" |
24 |
c#include "OCNVARS.h" |
25 |
C Data on atmos grid |
26 |
c#include "ATMSIZE.h" |
27 |
c#include "ATMVARS.h" |
28 |
|
29 |
C !INPUT/OUTPUT PARAMETERS: |
30 |
C msgUnit :: log-file I/O unit |
31 |
INTEGER msgUnit |
32 |
|
33 |
#ifdef ATM2D_MPI_ON |
34 |
C !LOCAL VARIABLES: |
35 |
LOGICAL errFlag |
36 |
CHARACTER*70 errMsg |
37 |
CEOP |
38 |
|
39 |
errFlag = .FALSE. |
40 |
errMsg = ' ' |
41 |
|
42 |
C-- 1) collect configs from all components |
43 |
|
44 |
C Receive ocean config (OCNCONFIG) from ocean component (OCN). |
45 |
CALL CPL_RECV_OCN_OCNCONFIG |
46 |
|
47 |
C Receive atmos config (ATCONFIG) from atmos. component (ATM). |
48 |
c CALL CPL_RECV_ATM_ATMCONFIG |
49 |
|
50 |
C-- 2) send to all components the configs of the other component |
51 |
|
52 |
C Send atmos. config (ATMCONFIG) to ocean component (OCN). |
53 |
CALL CPL_SEND_OCN_ATMCONFIG |
54 |
|
55 |
C Send ocean config (OCNCONFIG) to atmos. component (ATM). |
56 |
c CALL CPL_SEND_ATM_OCNCONFIG |
57 |
|
58 |
C-- 3) define length of the run (number of coupler time-step) |
59 |
C and check for consistent Coupler config (vs components) |
60 |
c CALL CPL_CHECK_CPLCONFIG( |
61 |
c I msgUnit, |
62 |
c U errFlag, errMsg ) |
63 |
|
64 |
C-- All procs in World check for error and stop if any |
65 |
CALL MITCPLR_ALL_CHECK( errFlag, errMsg ) |
66 |
|
67 |
#endif /* ATM2D_MPI_ON */ |
68 |
|
69 |
RETURN |
70 |
END |