forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpl_exch_configs.F
87 lines (72 loc) · 2.9 KB
/
cpl_exch_configs.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/cpl_exch_configs.F,v 1.5 2015/11/12 01:06:40 jmc Exp $
C $Name: $
#include "ATM_CPL_OPTIONS.h"
CBOP 0
C !ROUTINE: CPL_EXCH_CONFIGS
C !INTERFACE:
SUBROUTINE CPL_EXCH_CONFIGS( myThid )
C !DESCRIPTION:
C *==========================================================*
C | SUBROUTINE CPL_EXCH_CONFIGS
C | o Controlling routine for initial config exchange between
C | component models and atmosphere component.
C | - Atmospheric version -
C *==========================================================*
C | Controls the import of configuration information
C | (grid/topography,etc...) from other components and the
C | export of configuration information from this component.
C | The routine does some basic checking on consistency
C | components and summarizes the information that has been
C | imported.
C | The routine will need to be customised for different
C | styles of coupled run. The coupler requires consistency
C | between sending and receiving operations posted by
C | various components. Therefore changes in one component
C | model CPL_EXCH_CONFIG may require changes in other
C | component models CPL_EXCH_CONFIG routines as well
C | as in the coupler EXCH_COMPONENT_CONFIG routine.
C *==========================================================*
C !USES:
IMPLICIT NONE
C == Global variables ==
#include "SIZE.h"
#include "EEPARAMS.h"
c#include "PARAMS.h"
c#include "CPL_PARAMS.h"
C !INPUT/OUTPUT PARAMETERS:
C myThid :: Thread number for this instance of the routine
INTEGER myThid
C !LOCAL VARIABLES:
C errMsg :: error message to print to clog file
LOGICAL errFlag
CHARACTER*70 errMsg
c CHARACTER*(MAX_LEN_MBUF) msgBuf
C-- local variable in common block
_RL landMask_loc(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
COMMON / CPL_EXCH_CONFIGS_LOC / landMask_loc
CEOP
errFlag = .FALSE.
errMsg = ' '
C- Get configuration information (=land/sea mask) from other pkg
CALL ATM_GET_ATMCONFIG(
O landMask_loc,
I myThid )
C- Post my configuration information to the coupler "layer".
CALL ATM_EXPORT_ATMCONFIG(
U errFlag,
I landMask_loc, myThid )
C- Import other component model(s) configuration(s) from the coupler "layer"
C o Get ocean model configuration
CALL ATM_IMPORT_OCNCONFIG( myThid )
C- Summarise coupling config set-up and check for inconsistency
_BARRIER
CALL ATM_CHECK_CPLCONFIG(
U errFlag, errMsg,
I landMask_loc, myThid )
C-- All procs in World check for error and stop if any
_BEGIN_MASTER( myThid )
CALL MITCPLR_ALL_CHECK( errFlag, errMsg )
_END_MASTER( myThid )
_BARRIER
RETURN
END