/[MITgcm]/MITgcm/pkg/atm_compon_interf/cpl_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/atm_compon_interf/cpl_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (hide annotations) (download)
Fri Dec 25 19:44:35 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64i, checkpoint64h, checkpoint64j, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.6: +17 -14 lines
fix for multi-threaded

1 jmc 1.7 C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/cpl_readparms.F,v 1.6 2009/04/28 23:27:24 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "CPP_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: CPL_READPARMS
8     C !INTERFACE:
9     SUBROUTINE CPL_READPARMS( myThid )
10    
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | S/R CPL_READPARMS
14     C | o Read Coupling parameters that control import/export
15     C | from/to the coupler layer
16     C *==========================================================*
17     C | this version is specific to 1 component (atmos)
18     C *==========================================================*
19     C \ev
20 jmc 1.4
21 jmc 1.1 C !USES:
22     IMPLICIT NONE
23    
24     C == Global variables ===
25    
26     #include "SIZE.h"
27    
28     #include "EEPARAMS.h"
29     #include "PARAMS.h"
30     #include "CPL_PARAMS.h"
31 jmc 1.4 #include "ATMIDS.h"
32 jmc 1.1
33     C !INPUT/OUTPUT PARAMETERS:
34 jmc 1.4 C == Routine Arguments ==
35 jmc 1.7 C myThid :: my Thread Id. number
36 jmc 1.1 INTEGER myThid
37     CEOP
38    
39     #ifdef COMPONENT_MODULE
40    
41 jmc 1.7 C !FUNCTIONS:
42     c INTEGER ILNBLNK
43 jmc 1.1
44 jmc 1.7 C !LOCAL VARIABLES:
45 jmc 1.4 C == Local Variables ==
46 jmc 1.7 C msgBuf :: Informational/error message buffer
47 jmc 1.1 C iUnit :: Work variable for IO unit number
48     C k :: loop counter
49     C iL :: Work variable for length of file-name
50     CHARACTER*(MAX_LEN_MBUF) msgBuf
51 jmc 1.7 INTEGER iUnit
52     c INTEGER k, iL
53 jmc 1.1 _RL cpl_atmSendFrq
54    
55     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
56    
57 jmc 1.4 C-- Coupling parameters:
58 jmc 1.2 C cpl_earlyExpImpCall :: call coupler early in the time stepping call sequence
59 jmc 1.5 C cpl_oldPickup :: restart from an old pickup (= until checkpoint 59h)
60 jmc 1.2 C useImportMxlD :: True => use Imported Mix.Layer Detph from coupler
61     C useImportSST :: True => use the Imported SST from coupler
62     C useImportSSS :: True => use the Imported SSS from coupler
63     C useImportVsq :: True => use the Imported Surf. velocity^2
64 jmc 1.4 C useImportFlxCO2 :: True => use the Imported air-sea CO2 fluxes from coupler
65     C cpl_atmSendFrq :: Frequency^-1 for sending data to coupler (s)
66 jmc 1.1 NAMELIST /CPL_ATM_PARAM/
67 jmc 1.2 & cpl_earlyExpImpCall,
68     & cpl_oldPickup,
69 jmc 1.4 & useImportMxlD, useImportSST, useImportSSS,
70     & useImportVsq, useImportFlxCO2,
71 jmc 1.1 & cpl_atmSendFrq
72    
73     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
74    
75 jmc 1.7 _BEGIN_MASTER(myThid)
76    
77     C-- Open the data file
78     WRITE(msgBuf,'(A)') ' CPL_READPARMS: opening data.cpl'
79     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
80    
81     CALL OPEN_COPY_DATA_FILE( 'data.cpl', 'CPL_READPARMS',
82     O iUnit, myThid )
83    
84 jmc 1.1 C- Set default value:
85 jmc 1.4 cpl_earlyExpImpCall = .TRUE.
86     cpl_oldPickup = .FALSE.
87     useImportMxlD = .TRUE.
88     useImportSST = .TRUE.
89     useImportSSS = .TRUE.
90     useImportVsq = .TRUE.
91     IF ( atmCpl_exchange_DIC ) THEN
92     useImportFlxCO2 = .TRUE.
93     ELSE
94     useImportFlxCO2 = .FALSE.
95     ENDIF
96 jmc 1.2 cpl_atmSendFrq= deltaTClock
97 jmc 1.4
98 jmc 1.1 C-- Read parameters from open data file:
99    
100     C- Parameters for coupling interface:
101     READ(UNIT=iUnit,NML=CPL_ATM_PARAM)
102    
103 jmc 1.4 WRITE(msgBuf,'(A)')
104 jmc 1.1 & ' CPL_READPARMS: finished reading data.cpl'
105     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
106 jmc 1.4
107 jmc 1.1 C-- Close the open data file
108     CLOSE(iUnit)
109    
110     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
111     C-- Check parameters and model configuration
112 jmc 1.4 IF ( useImportFlxCO2 .AND. .NOT.atmCpl_exchange_DIC ) THEN
113     WRITE(msgBuf,'(2A)') 'CPL_READPARMS: useImportFlxCO2',
114     & ' requires atmCpl_exchange_DIC TRUE'
115     CALL PRINT_ERROR( msgBuf, myThid)
116     STOP 'ABNORMAL END: S/R CPL_READPARMS'
117     ENDIF
118 jmc 1.1
119     C- derive other parameters:
120     cplSendFrq_iter = NINT( cpl_atmSendFrq / deltaTClock )
121     IF ( cplSendFrq_iter .LT. 1) cplSendFrq_iter = 1
122    
123     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
124     C-- Print out parameter values :
125    
126     iUnit = standardMessageUnit
127     WRITE(msgBuf,'(A)') ' '
128     CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,1)
129     WRITE(msgBuf,'(A)') '// ==================================='
130     CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,1)
131     WRITE(msgBuf,'(A)') '// Coupling package parameters :'
132     CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,1)
133     WRITE(msgBuf,'(A)') '// ==================================='
134     CALL PRINT_MESSAGE(msgBuf,iUnit,SQUEEZE_RIGHT,1)
135    
136     C- namelist CPL_ATM_PARAM:
137 jmc 1.2 CALL WRITE_0D_L( cpl_earlyExpImpCall, INDEX_NONE,
138     & 'cpl_earlyExpImpCall=',
139     & ' /* call coupler early in the time-stepping */')
140     CALL WRITE_0D_L( cpl_oldPickup , INDEX_NONE,
141     & 'cpl_oldPickup =',
142 jmc 1.4 & ' /* restart from old pickup on/off flag */')
143 jmc 1.2 CALL WRITE_0D_L( useImportMxlD , INDEX_NONE,
144     & 'useImportMxlD =',
145 jmc 1.4 & ' /* use Imported MxL. Depth from Coupler flag */')
146 jmc 1.1 CALL WRITE_0D_L( useImportSST , INDEX_NONE,
147     & 'useImportSST =',
148 jmc 1.4 & ' /* use Imported SST from Coupler on/off flag */')
149 jmc 1.2 CALL WRITE_0D_L( useImportSSS , INDEX_NONE,
150     & 'useImportSSS =',
151 jmc 1.4 & ' /* use Imported SSS from Coupler on/off flag */')
152 jmc 1.2 CALL WRITE_0D_L( useImportVsq , INDEX_NONE,
153     & 'useImportVsq =',
154 jmc 1.4 & ' /* use Imported surf.Vel^2 from Coupler flag */')
155     CALL WRITE_0D_L( useImportFlxCO2 , INDEX_NONE,
156     & 'useImportFlxCO2 =',
157     & ' /* use Imported air-sea CO2 flux from Coupler flag */')
158 jmc 1.6 CALL WRITE_0D_RL( cpl_atmSendFrq, INDEX_NONE, 'cpl_atmSendFrq =',
159 jmc 1.1 & ' /* Frequency^o-1 for sending data to Coupler (s) */')
160 jmc 1.4 C cpl_atmSendFrq :: Frequency^-1 for sending data to coupler (s)
161 jmc 1.1 CALL WRITE_0D_I( cplSendFrq_iter, INDEX_NONE,'cplSendFrq_iter =',
162     &' /* send data to coupler every "cplSendFrq" iter */')
163    
164     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
165    
166     _END_MASTER(myThid)
167 jmc 1.4
168 jmc 1.1 C-- Everyone else must wait for the parameters to be loaded
169     _BARRIER
170    
171     #endif /* COMPONENT_MODULE */
172    
173     RETURN
174     END

  ViewVC Help
Powered by ViewVC 1.1.22