1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_export_atmconfig.F,v 1.4 2013/12/02 22:13:23 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ATM_CPL_OPTIONS.h" |
5 |
|
6 |
CBOP 0 |
7 |
C !ROUTINE: ATM_EXPORT_ATMCONFIG |
8 |
|
9 |
C !INTERFACE: |
10 |
SUBROUTINE ATM_EXPORT_ATMCONFIG( |
11 |
U errFlag, |
12 |
I landMask, myThid ) |
13 |
|
14 |
C !DESCRIPTION: |
15 |
C *==========================================================* |
16 |
C | SUBROUTINE ATM_EXPORT_ATMCONFIG |
17 |
C | o Routine for exporting atmos. config to coupling level. |
18 |
C *==========================================================* |
19 |
C | This version talks to the MIT Coupler. It uses the MIT |
20 |
C | Coupler "checkpoint1" library calls. |
21 |
C *==========================================================* |
22 |
|
23 |
C !USES: |
24 |
IMPLICIT NONE |
25 |
C == Global variables == |
26 |
#include "SIZE.h" |
27 |
#include "EEPARAMS.h" |
28 |
#include "PARAMS.h" |
29 |
#include "ATMIDS.h" |
30 |
c#include "ATMCPL.h" |
31 |
#include "CPL_PARAMS.h" |
32 |
|
33 |
C !INPUT/OUTPUT PARAMETERS: |
34 |
C errFlag :: logical flag to report an error |
35 |
C landMask :: land / sea mask (=1 : full land; =0 : full ocean grid cell) |
36 |
C myThid :: Thread number for this instance of the routine |
37 |
LOGICAL errFlag |
38 |
_RL landMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
39 |
INTEGER myThid |
40 |
|
41 |
C !LOCAL VARIABLES: |
42 |
C msgBuf :: Informational/error message buffer |
43 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
44 |
INTEGER tmpFld(1) |
45 |
CEOP |
46 |
|
47 |
C Send my configuration information to the coupler |
48 |
_BARRIER |
49 |
_BEGIN_MASTER( myThid ) |
50 |
|
51 |
C o Send number of coupler time-steps to do for this run |
52 |
IF ( MOD( nTimeSteps, cplSendFrq_iter ).NE.0 ) THEN |
53 |
errFlag = .TRUE. |
54 |
WRITE(msgBuf,'(2A)') 'ATM_EXPORT_ATMCONFIG: ', |
55 |
& '=> Length of run not a multiple of cpl_atmSendFrq' |
56 |
CALL PRINT_ERROR( msgBuf, myThid ) |
57 |
ENDIF |
58 |
tmpFld(1) = nTimeSteps/cplSendFrq_iter |
59 |
CALL COMPSEND_I4VEC( 'nCouplingSteps', 1, tmpFld ) |
60 |
|
61 |
C o Send atmos. land/sea mask |
62 |
CALL COMPSEND_R8TILES( |
63 |
I atmLandName, sNx, OLx, sNy, OLy, 1, nSx, nSy, |
64 |
I landMask ) |
65 |
|
66 |
_END_MASTER( myThid ) |
67 |
_BARRIER |
68 |
|
69 |
RETURN |
70 |
END |