/[MITgcm]/MITgcm/pkg/ctrl/ctrl_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/ctrl/ctrl_readparms.F

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


Revision 1.31 - (show annotations) (download)
Fri Feb 13 15:02:00 2009 UTC (15 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q
Changes since 1.30: +3 -1 lines
Add flag to reduce all tapelev I/O to single-prec.
In data.ctrl set
 doSinglePrecTapelev = .TRUE.

1 C
2 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_readparms.F,v 1.30 2008/06/26 18:11:53 heimbach Exp $
3 C $Name: $
4
5 #include "AD_CONFIG.h"
6 #include "CTRL_CPPOPTIONS.h"
7
8
9 subroutine ctrl_readparms( mythid )
10
11 c ==================================================================
12 c SUBROUTINE ctrl_readparms
13 c ==================================================================
14 c
15 c o read ctrl parameters
16 c split from ctrl_init
17 c
18 c started: heimbach@mit.edu 12-Jun-2003
19 c
20 c ==================================================================
21 c SUBROUTINE ctrl_readparms
22 c ==================================================================
23
24 implicit none
25
26 c == global variables ==
27
28 #include "EEPARAMS.h"
29 #include "SIZE.h"
30 #include "PARAMS.h"
31 #include "GRID.h"
32 #include "ctrl.h"
33
34 #ifdef ALLOW_OBCS_CONTROL
35 # include "OBCS.h"
36 #endif
37
38 c == routine arguments ==
39
40 integer mythid
41
42 c == local variables ==
43
44 integer bi,bj
45 integer i,j,k
46 integer ntmp
47 integer ivarindex
48 integer iUnit
49 integer iobcs
50 integer il
51 integer errio
52 integer startrec
53 integer endrec
54 integer difftime(4)
55 _RL diffsecs
56 _RL dummy
57
58 character*(80) ymaskobcs
59 character*(max_len_prec) record
60 character*(max_len_mbuf) msgbuf
61
62 integer nwetc3d
63
64 c == external ==
65
66 integer ilnblnk
67 external ilnblnk
68
69 c == end of interface ==
70
71 c-- Read the namelist input.
72 namelist /ctrl_nml/
73 & xx_theta_file, xx_salt_file,
74 & xx_hflux_file, xx_hflux_remo_intercept, xx_hflux_remo_slope,
75 & xx_hfluxstartdate1, xx_hfluxstartdate2, xx_hfluxperiod,
76 & xx_sflux_file, xx_sflux_remo_intercept, xx_sflux_remo_slope,
77 & xx_sfluxstartdate1, xx_sfluxstartdate2, xx_sfluxperiod,
78 & xx_tauu_file, xx_tauu_remo_intercept, xx_tauu_remo_slope,
79 & xx_tauustartdate1, xx_tauustartdate2, xx_tauuperiod,
80 & xx_tauv_file, xx_tauv_remo_intercept, xx_tauv_remo_slope,
81 & xx_tauvstartdate1, xx_tauvstartdate2, xx_tauvperiod,
82 & xx_atemp_file, xx_atemp_remo_intercept, xx_atemp_remo_slope,
83 & xx_atempstartdate1, xx_atempstartdate2, xx_atempperiod,
84 & xx_aqh_file, xx_aqh_remo_intercept, xx_aqh_remo_slope,
85 & xx_aqhstartdate1, xx_aqhstartdate2, xx_aqhperiod,
86 & xx_precip_file, xx_precip_remo_intercept, xx_precip_remo_slope,
87 & xx_precipstartdate1, xx_precipstartdate2, xx_precipperiod,
88 & xx_swflux_file, xx_swflux_remo_intercept, xx_swflux_remo_slope,
89 & xx_swfluxstartdate1, xx_swfluxstartdate2, xx_swfluxperiod,
90 & xx_swdown_file, xx_swdown_remo_intercept, xx_swdown_remo_slope,
91 & xx_swdownstartdate1, xx_swdownstartdate2, xx_swdownperiod,
92 & xx_lwflux_file, xx_lwflux_remo_intercept, xx_lwflux_remo_slope,
93 & xx_lwfluxstartdate1, xx_lwfluxstartdate2, xx_lwfluxperiod,
94 & xx_lwdown_file, xx_lwdown_remo_intercept, xx_lwdown_remo_slope,
95 & xx_lwdownstartdate1, xx_lwdownstartdate2, xx_lwdownperiod,
96 & xx_evap_file, xx_evap_remo_intercept, xx_evap_remo_slope,
97 & xx_evapstartdate1, xx_evapstartdate2, xx_evapperiod,
98 & xx_snowprecip_file, xx_snowprecip_remo_intercept,
99 & xx_snowprecip_remo_slope, xx_snowprecipperiod,
100 & xx_snowprecipstartdate1, xx_snowprecipstartdate2,
101 & xx_apressure_file, xx_apressure_remo_intercept,
102 & xx_apressure_remo_slope, xx_apressureperiod,
103 & xx_apressurestartdate1, xx_apressurestartdate2,
104 & xx_runoff_file, xx_runoff_remo_intercept, xx_runoff_remo_slope,
105 & xx_runoffstartdate1, xx_runoffstartdate2, xx_runoffperiod,
106 & xx_uwind_file, xx_uwind_remo_intercept, xx_uwind_remo_slope,
107 & xx_uwindstartdate1, xx_uwindstartdate2, xx_uwindperiod,
108 & xx_vwind_file, xx_vwind_remo_intercept, xx_vwind_remo_slope,
109 & xx_vwindstartdate1, xx_vwindstartdate2, xx_vwindperiod,
110 & xx_obcsn_file,
111 & xx_obcsnstartdate1, xx_obcsnstartdate2, xx_obcsnperiod,
112 & xx_obcss_file,
113 & xx_obcssstartdate1, xx_obcssstartdate2, xx_obcssperiod,
114 & xx_obcsw_file,
115 & xx_obcswstartdate1, xx_obcswstartdate2, xx_obcswperiod,
116 & xx_obcse_file,
117 & xx_obcsestartdate1, xx_obcsestartdate2, xx_obcseperiod,
118 & xx_diffkr_file, xx_kapgm_file, xx_kapredi_file, xx_tr1_file,
119 & xx_sst_file, xx_sss_file,
120 & xx_sststartdate1, xx_sststartdate2, xx_sstperiod,
121 & xx_sssstartdate1, xx_sssstartdate2, xx_sssperiod,
122 & xx_depth_file,
123 & xx_efluxy_file, xx_efluxp_file,
124 & xx_bottomdrag_file,
125 & xx_edtaux_file, xx_edtauy_file,
126 & xx_uvel_file, xx_vvel_file, xx_etan_file,
127 & xx_siarea_file, xx_siheff_file, xx_sihsnow_file,
128 & doInitXX,
129 & doPackDiag,
130 & doZscaleUnpack, doZscalePack,
131 & doMainUnpack, doMainPack,
132 & doSinglePrecTapelev,
133 & doAdmtlmBypassAD,
134 & delZexp, forcingPrecond
135 cHFLUXM_CONTROL
136 & ,xx_hfluxm_file
137 cHFLUXM_CONTROL
138
139 namelist /ctrl_packnames/
140 & yadmark, yctrlid, yctrlposunpack, yctrlpospack,
141 & ctrlname, costname, scalname, maskname, metaname
142
143 _BEGIN_MASTER( myThid )
144
145 c-- Set default values.
146 doInitXX = .TRUE.
147 #ifdef ALLOW_ADMTLM
148 doAdmTlm = .TRUE.
149 #else
150 doAdmTlm = .FALSE.
151 #endif
152 doPackDiag = .FALSE.
153 doZscaleUnpack = .FALSE.
154 doZscalePack = .FALSE.
155 doMainUnpack = .TRUE.
156 doMainPack = .TRUE.
157 doSinglePrecTapelev = .FALSE.
158 doAdmtlmBypassAD = .FALSE.
159
160 delZexp = 0.
161 forcingPrecond = 1. _d 0
162
163 xx_theta_file = 'xx_theta'
164 xx_salt_file = 'xx_salt'
165 c
166 xx_hfluxstartdate1 = 0
167 xx_hfluxstartdate2 = 0
168 xx_hfluxperiod = 0. _d 0
169 xx_hflux_file = 'xx_hfl'
170 xx_hflux_remo_intercept = 0. _d 0
171 xx_hflux_remo_slope = 0. _d 0
172 c
173 xx_sfluxstartdate1 = 0
174 xx_sfluxstartdate2 = 0
175 xx_sfluxperiod = 0. _d 0
176 xx_sflux_file = 'xx_sfl'
177 xx_sflux_remo_intercept = 0. _d 0
178 xx_sflux_remo_slope = 0. _d 0
179 c
180 xx_tauustartdate1 = 0
181 xx_tauustartdate2 = 0
182 xx_tauuperiod = 0. _d 0
183 xx_tauu_file = 'xx_tauu'
184 xx_tauu_remo_intercept = 0. _d 0
185 xx_tauu_remo_slope = 0. _d 0
186 c
187 xx_tauvstartdate1 = 0
188 xx_tauvstartdate2 = 0
189 xx_tauvperiod = 0. _d 0
190 xx_tauv_file = 'xx_tauv'
191 xx_tauv_remo_intercept = 0. _d 0
192 xx_tauv_remo_slope = 0. _d 0
193 c
194 xx_atempstartdate1 = 0
195 xx_atempstartdate2 = 0
196 xx_atempperiod = 0. _d 0
197 xx_atemp_file = 'xx_atemp'
198 xx_atemp_remo_intercept = 0. _d 0
199 xx_atemp_remo_slope = 0. _d 0
200 c
201 xx_aqhstartdate1 = 0
202 xx_aqhstartdate2 = 0
203 xx_aqhperiod = 0. _d 0
204 xx_aqh_file = 'xx_aqh'
205 xx_aqh_remo_intercept = 0. _d 0
206 xx_aqh_remo_slope = 0. _d 0
207 c
208 xx_precipstartdate1 = 0
209 xx_precipstartdate2 = 0
210 xx_precipperiod = 0. _d 0
211 xx_precip_file = 'xx_precip'
212 xx_precip_remo_intercept = 0. _d 0
213 xx_precip_remo_slope = 0. _d 0
214 c
215 xx_swfluxstartdate1 = 0
216 xx_swfluxstartdate2 = 0
217 xx_swfluxperiod = 0. _d 0
218 xx_swflux_file = 'xx_swflux'
219 xx_swflux_remo_intercept = 0. _d 0
220 xx_swflux_remo_slope = 0. _d 0
221 c
222 xx_swdownstartdate1 = 0
223 xx_swdownstartdate2 = 0
224 xx_swdownperiod = 0. _d 0
225 xx_swdown_file = 'xx_swdown'
226 xx_swdown_remo_intercept = 0. _d 0
227 xx_swdown_remo_slope = 0. _d 0
228 c
229 xx_lwfluxstartdate1 = 0
230 xx_lwfluxstartdate2 = 0
231 xx_lwfluxperiod = 0. _d 0
232 xx_lwflux_file = 'xx_lwflux'
233 xx_lwflux_remo_intercept = 0. _d 0
234 xx_lwflux_remo_slope = 0. _d 0
235 c
236 xx_lwdownstartdate1 = 0
237 xx_lwdownstartdate2 = 0
238 xx_lwdownperiod = 0. _d 0
239 xx_lwdown_file = 'xx_lwdown'
240 xx_lwdown_remo_intercept = 0. _d 0
241 xx_lwdown_remo_slope = 0. _d 0
242 c
243 xx_evapstartdate1 = 0
244 xx_evapstartdate2 = 0
245 xx_evapperiod = 0. _d 0
246 xx_evap_file = 'xx_evap'
247 xx_evap_remo_intercept = 0. _d 0
248 xx_evap_remo_slope = 0. _d 0
249 c
250 xx_snowprecipstartdate1 = 0
251 xx_snowprecipstartdate2 = 0
252 xx_snowprecipperiod = 0. _d 0
253 xx_snowprecip_file = 'xx_snowprecip'
254 xx_snowprecip_remo_intercept = 0. _d 0
255 xx_snowprecip_remo_slope = 0. _d 0
256 c
257 xx_apressurestartdate1 = 0
258 xx_apressurestartdate2 = 0
259 xx_apressureperiod = 0. _d 0
260 xx_apressure_file = 'xx_apressure'
261 xx_apressure_remo_intercept = 0. _d 0
262 xx_apressure_remo_slope = 0. _d 0
263 c
264 xx_runoffstartdate1 = 0
265 xx_runoffstartdate2 = 0
266 xx_runoffperiod = 0. _d 0
267 xx_runoff_file = 'xx_runoff'
268 xx_runoff_remo_intercept = 0. _d 0
269 xx_runoff_remo_slope = 0. _d 0
270 c
271 xx_uwindstartdate1 = 0
272 xx_uwindstartdate2 = 0
273 xx_uwindperiod = 0. _d 0
274 xx_uwind_file = 'xx_uwind'
275 xx_uwind_remo_intercept = 0. _d 0
276 xx_uwind_remo_slope = 0. _d 0
277 c
278 xx_vwindstartdate1 = 0
279 xx_vwindstartdate2 = 0
280 xx_vwindperiod = 0. _d 0
281 xx_vwind_file = 'xx_vwind'
282 xx_vwind_remo_intercept = 0. _d 0
283 xx_vwind_remo_slope = 0. _d 0
284 c
285 xx_obcsnstartdate1 = 0
286 xx_obcsnstartdate2 = 0
287 xx_obcsnperiod = 0. _d 0
288 xx_obcsn_file = 'xx_obcsn'
289 c
290 xx_obcssstartdate1 = 0
291 xx_obcssstartdate2 = 0
292 xx_obcssperiod = 0. _d 0
293 xx_obcss_file = 'xx_obcss'
294 c
295 xx_obcswstartdate1 = 0
296 xx_obcswstartdate2 = 0
297 xx_obcswperiod = 0. _d 0
298 xx_obcsw_file = 'xx_obcsw'
299 c
300 xx_obcsestartdate1 = 0
301 xx_obcsestartdate2 = 0
302 xx_obcseperiod = 0. _d 0
303 xx_obcse_file = 'xx_obcse'
304 c
305 xx_sststartdate1 = 0
306 xx_sststartdate2 = 0
307 xx_sstperiod = 0. _d 0
308 xx_sst_file = 'xx_sst'
309 c
310 xx_sssstartdate1 = 0
311 xx_sssstartdate2 = 0
312 xx_sssperiod = 0. _d 0
313 xx_sss_file = 'xx_sss'
314 c
315 xx_diffkr_file = 'xx_diffkr'
316 xx_kapgm_file = 'xx_kapgm'
317 xx_kapredi_file = 'xx_kapredi'
318 xx_tr1_file = 'xx_ptr'
319 xx_depth_file = 'xx_depth'
320 xx_efluxy_file = 'xx_efluxy'
321 xx_efluxp_file = 'xx_efluxp'
322 xx_bottomdrag_file = 'xx_bottomdrag'
323 xx_edtaux_file = 'xx_edtaux'
324 xx_edtauy_file = 'xx_edtauy'
325 xx_uvel_file = 'xx_uvel'
326 xx_vvel_file = 'xx_vvel'
327 xx_etan_file = 'xx_etan'
328 xx_siarea_file = 'xx_siarea'
329 xx_siheff_file = 'xx_siheff'
330 xx_sihsnow_file = 'xx_sihsnow'
331 cHFLUXM_CONTROL
332 xx_hfluxm_file = 'xx_hfluxm'
333 cHFLUXM_CONTROL
334
335 #ifdef ALLOW_TANGENTLINEAR_RUN
336 yadprefix = 'g_'
337 yadmark = 'g_'
338 #else
339 yadprefix = 'ad'
340 yadmark = 'ad'
341 #endif
342 yctrlid = 'MIT_CE_000'
343 yctrlposunpack = '.opt'
344 yctrlpospack = '.opt'
345 ctrlname = 'ecco_ctrl'
346 costname = 'ecco_cost'
347 scalname = ' '
348 maskname = ' '
349 metaname = ' '
350
351 c-- Next, read the cost data file.
352 WRITE(msgBuf,'(A)') 'CTRL_READPARMS: opening data.ctrl'
353 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
354 & SQUEEZE_RIGHT , 1)
355
356 CALL OPEN_COPY_DATA_FILE(
357 I 'data.ctrl', 'CTRL_READPARMS',
358 O iUnit,
359 I myThid )
360
361 READ(unit = iUnit, nml = ctrl_nml)
362 READ(unit = iUnit, nml = ctrl_packnames)
363
364 WRITE(msgBuf,'(A)')
365 & 'CTRL_READPARMS: finished reading data.ctrl'
366 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
367 & SQUEEZE_RIGHT , 1)
368
369 CLOSE( iUnit )
370
371 _END_MASTER( myThid )
372
373 _BARRIER
374
375 return
376 end
377

  ViewVC Help
Powered by ViewVC 1.1.22