| 1 |
C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/ocn_export_data.F,v 1.1 2015/11/12 20:04:16 jmc Exp $ |
| 2 |
C $Name: $ |
| 3 |
|
| 4 |
#include "OCN_CPL_OPTIONS.h" |
| 5 |
|
| 6 |
CBOP |
| 7 |
C !ROUTINE: OCN_EXPORT_DATA |
| 8 |
|
| 9 |
C !INTERFACE: |
| 10 |
SUBROUTINE OCN_EXPORT_DATA( |
| 11 |
I myTime, myIter, myThid ) |
| 12 |
|
| 13 |
C !DESCRIPTION: \bv |
| 14 |
C *==========================================================* |
| 15 |
C | SUBROUTINE OCN_EXPORT_DATA |
| 16 |
C | o Routine for controlling |
| 17 |
C | - export of ocean coupling data to coupler layer |
| 18 |
C | but only if using Sequential coupling. |
| 19 |
C | - diagnostics of coupling fields (timeave pkg only), |
| 20 |
C | whether Synchronous or Sequential coupling. |
| 21 |
C *==========================================================* |
| 22 |
C | This version talks to the MIT Coupler. It uses the MIT |
| 23 |
C | Coupler "checkpoint1" library calls. |
| 24 |
C *==========================================================* |
| 25 |
C \ev |
| 26 |
|
| 27 |
C !USES |
| 28 |
IMPLICIT NONE |
| 29 |
C == GLobal variables == |
| 30 |
#include "SIZE.h" |
| 31 |
#include "EEPARAMS.h" |
| 32 |
#include "PARAMS.h" |
| 33 |
#include "CPL_PARAMS.h" |
| 34 |
|
| 35 |
C !INPUT/OUTPUT PARAMETERS: |
| 36 |
C == Routine arguments == |
| 37 |
C myTime :: Current time in simulation. |
| 38 |
C myIter :: Current timestep number. |
| 39 |
C myThid :: Thread number for this instance of the routine. |
| 40 |
_RL myTime |
| 41 |
INTEGER myIter |
| 42 |
INTEGER myThid |
| 43 |
CEOP |
| 44 |
|
| 45 |
#ifdef COMPONENT_MODULE |
| 46 |
C !LOCAL VARIABLES: |
| 47 |
C msgBuf :: Informational/error message buffer |
| 48 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
| 49 |
|
| 50 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
| 51 |
C Note MIT Coupler checkpoint1 does not allow asynchronous posting of |
| 52 |
C data, so ordering has to be consistent with coupling layer ordering. |
| 53 |
C-------------------------------------------------------------------------- |
| 54 |
C Sequential coupling: Send data to coupling layer |
| 55 |
|
| 56 |
IF ( ocn_cplSequential ) THEN |
| 57 |
IF ( debugMode ) THEN |
| 58 |
_BEGIN_MASTER( myThid ) |
| 59 |
WRITE(msgBuf,'(A,I10)') |
| 60 |
& ' Exporting oceanic surface fields at iter=', myIter |
| 61 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
| 62 |
& SQUEEZE_RIGHT, myThid ) |
| 63 |
_END_MASTER( myThid ) |
| 64 |
ENDIF |
| 65 |
|
| 66 |
CALL OCN_STORE_MY_DATA( |
| 67 |
I myTime, myIter, myThid ) |
| 68 |
|
| 69 |
CALL OCN_EXPORT_FIELDS ( myIter, myThid ) |
| 70 |
|
| 71 |
ENDIF |
| 72 |
|
| 73 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
| 74 |
|
| 75 |
IF ( cpl_taveFreq.GT.0. _d 0 ) THEN |
| 76 |
C-- note: will move this "if" inside OCN_CPL_DIAGS when other diags |
| 77 |
C than time-ave are computed within OCN_CPL_DIAGS. |
| 78 |
CALL OCN_CPL_DIAGS( myTime, myIter, myThid ) |
| 79 |
ENDIF |
| 80 |
|
| 81 |
#endif /* COMPONENT_MODULE */ |
| 82 |
|
| 83 |
RETURN |
| 84 |
END |