| 1 |
C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/cpl_exch_configs.F,v 1.3 2013/12/02 22:16:19 jmc Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
#include "OCN_CPL_OPTIONS.h" |
| 5 |
|
| 6 |
CBOP 0 |
| 7 |
C !ROUTINE: CPL_EXCH_CONFIGS |
| 8 |
|
| 9 |
C !INTERFACE: |
| 10 |
SUBROUTINE CPL_EXCH_CONFIGS( myThid ) |
| 11 |
|
| 12 |
C !DESCRIPTION: |
| 13 |
C *==========================================================* |
| 14 |
C | SUBROUTINE CPL_EXCH_CONFIGS |
| 15 |
C | o Controlling routine for initial config exchange between |
| 16 |
C | component models and ocean component. |
| 17 |
C | - Oceanic version - |
| 18 |
C *==========================================================* |
| 19 |
C | Controls the import of configuration information |
| 20 |
C | (grid/topography,etc...) from other components and the |
| 21 |
C | export of configuration information from this component. |
| 22 |
C | The routine does some basic checking on consistency |
| 23 |
C | components and summarizes the information that has been |
| 24 |
C | imported. |
| 25 |
C | The routine will need to be customised for different |
| 26 |
C | styles of coupled run. The coupler requires consistency |
| 27 |
C | between sending and receiving operations posted by |
| 28 |
C | various components. Therefore changes in one component |
| 29 |
C | model CPL_EXCH_CONFIG may require changes in other |
| 30 |
C | component models CPL_EXCH_CONFIG routines as well |
| 31 |
C | as in the coupler EXCH_COMPONENT_CONFIG routine. |
| 32 |
C *==========================================================* |
| 33 |
|
| 34 |
C !USES: |
| 35 |
IMPLICIT NONE |
| 36 |
C == Global variables == |
| 37 |
#include "SIZE.h" |
| 38 |
#include "EEPARAMS.h" |
| 39 |
c#include "PARAMS.h" |
| 40 |
c#include "CPL_PARAMS.h" |
| 41 |
|
| 42 |
C !INPUT/OUTPUT PARAMETERS: |
| 43 |
C myThid :: Thread number for this instance of the routine |
| 44 |
INTEGER myThid |
| 45 |
|
| 46 |
C !LOCAL VARIABLES: |
| 47 |
C errMsg :: error message to print to clog file |
| 48 |
LOGICAL errFlag |
| 49 |
CHARACTER*70 errMsg |
| 50 |
c CHARACTER*(MAX_LEN_MBUF) msgBuf |
| 51 |
CEOP |
| 52 |
|
| 53 |
errFlag = .FALSE. |
| 54 |
errMsg = ' ' |
| 55 |
|
| 56 |
C- Post my configuration information to the coupler "layer". |
| 57 |
CALL OCN_EXPORT_OCNCONFIG( myThid ) |
| 58 |
|
| 59 |
C- Import other component model(s) configuration(s) from the |
| 60 |
C coupler "layer". |
| 61 |
C o Get atmospheric model configuration |
| 62 |
CALL OCN_IMPORT_ATMCONFIG( myThid ) |
| 63 |
|
| 64 |
C- Summarise coupling config set-up and check for inconsistency |
| 65 |
_BARRIER |
| 66 |
CALL OCN_CHECK_CPLCONFIG( |
| 67 |
U errFlag, errMsg, |
| 68 |
I myThid ) |
| 69 |
|
| 70 |
C-- All procs in World check for error and stop if any |
| 71 |
_BEGIN_MASTER( myThid ) |
| 72 |
CALL MITCPLR_ALL_CHECK( errFlag, errMsg ) |
| 73 |
_END_MASTER( myThid ) |
| 74 |
|
| 75 |
_BARRIER |
| 76 |
|
| 77 |
RETURN |
| 78 |
END |