/[MITgcm]/MITgcm/pkg/ecco/ecco_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/ecco/ecco_readparms.F

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


Revision 1.36 - (show annotations) (download)
Sat Oct 18 12:42:30 2008 UTC (15 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61e, checkpoint61g, checkpoint61h, checkpoint61i
Changes since 1.35: +3 -2 lines
Add call.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_readparms.F,v 1.35 2008/02/02 02:34:14 gforget Exp $
2 C $Name: $
3
4 #include "COST_CPPOPTIONS.h"
5
6 subroutine ecco_readparms( mythid )
7
8 c ==================================================================
9 c SUBROUTINE ecco_readparms
10 c ==================================================================
11 c
12 c o This routine initialises the package cost.
13 c started: Ralf Giering 18-Jan-2001
14 c
15 c ==================================================================
16 c SUBROUTINE ecco_readparms
17 c ==================================================================
18
19 implicit none
20
21 c == global variables ==
22
23 #include "EEPARAMS.h"
24 #include "SIZE.h"
25 #include "GRID.h"
26 #include "PARAMS.h"
27
28 #include "ecco_cost.h"
29
30 c == routine arguments ==
31
32 integer mythid
33
34 c == local variables ==
35 C msgBuf - Informational/error meesage buffer
36 C iUnit - Work variable for IO unit number
37 CHARACTER*(MAX_LEN_MBUF) msgBuf
38 INTEGER k, iUnit, num_file, num_var
39
40 c == end of interface ==
41
42 c-- Read the namelist input.
43 namelist /ecco_cost_nml/
44 & data_errfile,
45 & tbarfile, sbarfile,sstbarfile,
46 & psbarfile, bpbarfile,
47 & ubarfile, vbarfile, wbarfile,
48 & tauxbarfile, tauybarfile,
49 & hfluxbarfile, sfluxbarfile,
50 & costTranspDataFile,
51 & using_topex,
52 & topexstartdate1, topexstartdate2,
53 & topexperiod, topexfile, topexmeanfile,
54 & topexintercept, topexslope,
55 & using_ers,
56 & ersstartdate1, ersstartdate2,
57 & ersperiod, ersfile,
58 & ersintercept, ersslope,
59 & using_gfo,
60 & gfostartdate1, gfostartdate2,
61 & gfoperiod, gfofile,
62 & gfointercept, gfoslope,
63 & scatstartdate1, scatstartdate2,
64 & scatperiod, scatxdatfile, scatydatfile,
65 & scatx_errfile, scaty_errfile,
66 & ssh_errfile,
67 & tp_errfile, ers_errfile, gfo_errfile,
68 & tmistartdate1, tmistartdate2, tmidatfile,
69 & sststartdate1, sststartdate2, sstdatfile,
70 & sssstartdate1, sssstartdate2, sssdatfile,
71 & bpstartdate1, bpstartdate2, bpdatfile,
72 & tdatfile, sdatfile,
73 & ctdtfile, ctdsfile,
74 & ctdtclimfile, ctdsclimfile,
75 & xbtfile,
76 & argotstartdate1, argotstartdate2, argotfile,
77 & argosstartdate1, argosstartdate2, argosfile,
78 & udriftfile, vdriftfile,
79 & udrifterrfile, vdrifterrfile,
80 & curmtrufile,curmtrvfile,
81 & salterrfile, temperrfile, velerrfile,
82 & salt0errfile, temp0errfile, vel0errfile,
83 & hflux_errfile, sflux_errfile,
84 & tauu_errfile, tauv_errfile,
85 & atemp_errfile, aqh_errfile,
86 & precip_errfile, swflux_errfile, swdown_errfile,
87 & lwflux_errfile, lwdown_errfile, evap_errfile,
88 & snowprecip_errfile, apressure_errfile,
89 & uwind_errfile, vwind_errfile,
90 & geoid_errfile, geoid_covariancefile,
91 & bottomdrag_errfile,edtau_errfile,
92 & kapgm_errfile,kapredi_errfile,diffkr_errfile,
93 & gencost_datafile, gencost_errfile,
94 & mult_hflux, mult_sflux, mult_tauu, mult_tauv,
95 & mult_hfluxmm, mult_sfluxmm,
96 & mult_atemp, mult_aqh,
97 & mult_precip, mult_swflux, mult_swdown,
98 & mult_lwflux, mult_lwdown, mult_evap,
99 & mult_snowprecip, mult_apressure,
100 & mult_uwind, mult_vwind,
101 & mult_hmean, mult_h,
102 & mult_tp, mult_ers, mult_gfo,
103 & mult_temp, mult_salt,
104 & mult_tmi, mult_sst, mult_sss, mult_bp,
105 & mult_ctdt, mult_ctds,
106 & mult_ctdtclim, mult_ctdsclim,
107 & mult_xbt, mult_drift,
108 & mult_argot, mult_argos,
109 & mult_scatx, mult_scaty,
110 & mult_sdrift, mult_tdrift, mult_wdrift,
111 & mult_temp0, mult_salt0,
112 & mult_obcsn, mult_obcss,
113 & mult_obcsw, mult_obcse, mult_obcsvol,
114 & mult_curmtr, mult_ageos,
115 & mult_kapgm, mult_kapredi, mult_diffkr,
116 & mult_edtau, mult_bottomdrag,
117 & mult_gencost, mult_transp,
118 & mult_smooth_ic, mult_smooth_bc,
119 & whflux0, wsflux0, wtau0,
120 & wbottomdrag0,
121 & watemp0, waqh0,
122 & wprecip0, wswflux0, wswdown0, wwind0,
123 & wsnowprecip0, wlwflux0, wlwdown0, wevap0,
124 & wapressure0, wdiffkr0, wkapgm0, wedtau0,
125 & wkapredi0, wmean_hflux, wmean_sflux, wmean_tau,
126 & wmean_atemp, wmean_aqh, wmean_precip,
127 & wmean_swflux, wmean_swdown, wmean_wind,
128 & wmean_lwflux, wmean_lwdown, wmean_evap,
129 & wmean_snowprecip, wmean_apressure,
130 & cost_iprec, cost_yftype
131
132 _BEGIN_MASTER( myThid )
133
134 c-- Set default values.
135 data_errfile = ' '
136 tbarfile = 'tbar'
137 sbarfile = 'sbar'
138 sstbarfile = 'sstbar'
139 psbarfile = 'psbar'
140 bpbarfile = 'bpbar'
141 ubarfile = 'ubar'
142 vbarfile = 'vbar'
143 wbarfile = 'wbar'
144 tauxbarfile = 'tauxbar'
145 tauybarfile = 'tauybar'
146 hfluxbarfile = 'hfluxbar'
147 sfluxbarfile = 'sfluxbar'
148 costTranspDataFile = ' '
149 using_topex = .false.
150 topexstartdate1 = 0
151 topexstartdate2 = 0
152 topexperiod = 0. _d 0
153 topexintercept = 0. _d 0
154 topexslope = 0. _d 0
155 topexfile = ' '
156 topexmeanfile = ' '
157 using_ers = .false.
158 ersstartdate1 = 0
159 ersstartdate2 = 0
160 ersperiod = 0. _d 0
161 ersintercept = 0. _d 0
162 ersslope = 0. _d 0
163 ersfile = ' '
164 using_gfo = .false.
165 gfostartdate1 = 0
166 gfostartdate2 = 0
167 gfoperiod = 0. _d 0
168 gfointercept = 0. _d 0
169 gfoslope = 0. _d 0
170 gfofile = ' '
171 scatstartdate1 = 0
172 scatstartdate2 = 0
173 scatperiod = 0. _d 0
174 scatxdatfile = ' '
175 scatydatfile = ' '
176 ssh_errfile = ' '
177 tp_errfile = ' '
178 ers_errfile = ' '
179 gfo_errfile = ' '
180 scatx_errfile = ' '
181 scaty_errfile = ' '
182 tmistartdate1 = 0
183 tmistartdate2 = 0
184 tmidatfile = ' '
185 sststartdate1 = 0
186 sststartdate2 = 0
187 sstdatfile = ' '
188 sssstartdate1 = 0
189 sssstartdate2 = 0
190 sssdatfile = ' '
191 bpstartdate1 = 0
192 bpstartdate2 = 0
193 bpdatfile = ' '
194 tdatfile = ' '
195 sdatfile = ' '
196 ctdtfile = ' '
197 ctdsfile = ' '
198 ctdtclimfile = ' '
199 ctdsclimfile = ' '
200 curmtrufile = ' '
201 curmtrvfile = ' '
202 xbtfile = ' '
203 argotstartdate1 = 0
204 argotstartdate2 = 0
205 argotfile = ' '
206 argosstartdate1 = 0
207 argosstartdate2 = 0
208 argosfile = ' '
209 udriftfile = ' '
210 vdriftfile = ' '
211 udrifterrfile = ' '
212 vdrifterrfile = ' '
213 salterrfile = ' '
214 temperrfile = ' '
215 velerrfile = ' '
216 salt0errfile = ' '
217 temp0errfile = ' '
218 vel0errfile = ' '
219 hflux_errfile = ' '
220 sflux_errfile = ' '
221 tauu_errfile = ' '
222 tauv_errfile = ' '
223 atemp_errfile = ' '
224 aqh_errfile = ' '
225 precip_errfile = ' '
226 swflux_errfile = ' '
227 swdown_errfile = ' '
228 lwflux_errfile = ' '
229 lwdown_errfile = ' '
230 evap_errfile = ' '
231 snowprecip_errfile = ' '
232 apressure_errfile = ' '
233 uwind_errfile = ' '
234 vwind_errfile = ' '
235 geoid_errfile = ' '
236 geoid_covariancefile = ' '
237 bottomdrag_errfile = ' '
238 edtau_errfile = ' '
239 kapgm_errfile = ' '
240 kapredi_errfile = ' '
241 diffkr_errfile = ' '
242 do k=1,NGENCOST
243 gencost_datafile(k) = ' '
244 gencost_errfile(k) = ' '
245 enddo
246 mult_hflux = 0. _d 0
247 mult_sflux = 0. _d 0
248 mult_hfluxmm = 0. _d 0
249 mult_sfluxmm = 0. _d 0
250 mult_tauu = 0. _d 0
251 mult_tauv = 0. _d 0
252 mult_atemp = 0. _d 0
253 mult_aqh = 0. _d 0
254 mult_precip = 0. _d 0
255 mult_swflux = 0. _d 0
256 mult_swdown = 0. _d 0
257 mult_lwflux = 0. _d 0
258 mult_lwdown = 0. _d 0
259 mult_evap = 0. _d 0
260 mult_snowprecip = 0. _d 0
261 mult_apressure = 0. _d 0
262 mult_uwind = 0. _d 0
263 mult_vwind = 0. _d 0
264 mult_hmean = 0. _d 0
265 mult_h = 1. _d 0
266 mult_tp = 0. _d 0
267 mult_ers = 0. _d 0
268 mult_gfo = 0. _d 0
269 mult_temp = 0. _d 0
270 mult_salt = 0. _d 0
271 mult_temp0 = 0. _d 0
272 mult_salt0 = 0. _d 0
273 mult_tmi = 0. _d 0
274 mult_sst = 0. _d 0
275 mult_sss = 0. _d 0
276 mult_bp = 0. _d 0
277 mult_ctdt = 0. _d 0
278 mult_ctds = 0. _d 0
279 mult_ctdtclim = 0. _d 0
280 mult_ctdsclim = 0. _d 0
281 mult_xbt = 0. _d 0
282 mult_argot = 0. _d 0
283 mult_argos = 0. _d 0
284 mult_drift = 0. _d 0
285 mult_tdrift = 0. _d 0
286 mult_sdrift = 0. _d 0
287 mult_wdrift = 0. _d 0
288 mult_scatx = 0. _d 0
289 mult_scaty = 0. _d 0
290 mult_obcsn = 0. _d 0
291 mult_obcss = 0. _d 0
292 mult_obcsw = 0. _d 0
293 mult_obcse = 0. _d 0
294 mult_obcsvol = 0. _d 0
295 mult_ageos = 0. _d 0
296 mult_curmtr = 0. _d 0
297 mult_kapgm = 0. _d 0
298 mult_kapredi = 0. _d 0
299 mult_diffkr = 0. _d 0
300 mult_edtau = 0. _d 0
301 mult_bottomdrag = 0. _d 0
302 do k=1,NGENCOST
303 mult_gencost(k) = 0. _d 0
304 enddo
305 mult_smooth_ic = 0. _d 0
306 mult_smooth_bc = 0. _d 0
307 mult_transp = 0. _d 0
308 watemp0 = 0. _d 0
309 waqh0 = 0. _d 0
310 wprecip0 = 0. _d 0
311 wswflux0 = 0. _d 0
312 wswdown0 = 0. _d 0
313 wlwflux0 = 0. _d 0
314 wlwdown0 = 0. _d 0
315 wevap0 = 0. _d 0
316 wsnowprecip0 = 0. _d 0
317 wapressure0 = 0. _d 0
318 wwind0 = 0. _d 0
319 wdiffkr0 = 1. _d 0
320 wkapgm0 = 1. _d 0
321 wkapredi0 = 1. _d 0
322 wedtau0 = 1. _d 0
323 whflux0 = 0. _d 0
324 wsflux0 = 0. _d 0
325 wtau0 = 0. _d 0
326 wbottomdrag0 = 1. _d 0
327 wmean_atemp = 0. _d 0
328 wmean_aqh = 0. _d 0
329 wmean_precip = 0. _d 0
330 wmean_swflux = 0. _d 0
331 wmean_swdown = 0. _d 0
332 wmean_lwflux = 0. _d 0
333 wmean_lwdown = 0. _d 0
334 wmean_evap = 0. _d 0
335 wmean_snowprecip = 0. _d 0
336 wmean_apressure = 0. _d 0
337 wmean_wind = 0. _d 0
338 wmean_hflux = 0. _d 0
339 wmean_sflux = 0. _d 0
340 wmean_tau = 0. _d 0
341
342 c-- Next, read the cost data file.
343 WRITE(msgBuf,'(A)') 'ECCO_READPARMS: opening data.ecco'
344 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
345 & SQUEEZE_RIGHT , 1)
346
347 CALL OPEN_COPY_DATA_FILE(
348 I 'data.ecco', 'ECCO_READPARMS',
349 O iUnit,
350 I myThid )
351
352 READ( iUnit, nml = ecco_cost_nml )
353
354 WRITE(msgBuf,'(A)') 'ECCO_READPARMS: finished reading data.ecco'
355 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
356 & SQUEEZE_RIGHT , 1)
357
358 CLOSE( iUnit )
359
360 #ifdef ALLOW_CAL
361 c-- Get the complete dates of the ...
362 c-- ... SST data.
363 WRITE(msgBuf,'(A)') 'ECCO_READPARMS: start assigning cost dates'
364 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
365 & SQUEEZE_RIGHT , 1)
366 c-- ... SST data.
367 call cal_FullDate( sststartdate1, sststartdate2,
368 & sststartdate, mythid )
369 c-- ... TMI data.
370 call cal_FullDate( tmistartdate1, tmistartdate2,
371 & tmistartdate, mythid )
372 c-- ... SSS data.
373 call cal_FullDate( sssstartdate1, sssstartdate2,
374 & sssstartdate, mythid )
375 c-- ... BP data.
376 call cal_FullDate( bpstartdate1, bpstartdate2,
377 & bpstartdate, mythid )
378 c-- ... T/P data.
379 call cal_FullDate( topexstartdate1, topexstartdate2,
380 & topexstartdate, mythid )
381 c-- ... ERS data.
382 call cal_FullDate( ersstartdate1, ersstartdate2,
383 & ersstartdate, mythid )
384 c-- ... GFO data.
385 call cal_FullDate( gfostartdate1, gfostartdate2,
386 & gfostartdate, mythid )
387 c-- ... SCAT data.
388 call cal_FullDate( scatstartdate1, scatstartdate2,
389 & scatxstartdate, mythid )
390 call cal_FullDate( scatstartdate1, scatstartdate2,
391 & scatystartdate, mythid )
392
393 WRITE(msgBuf,'(A)') 'ECCO_READPARMS: end assigning cost dates'
394 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
395 & SQUEEZE_RIGHT , 1)
396 #endif
397
398 _END_MASTER( mythid )
399
400 _BARRIER
401
402 end

  ViewVC Help
Powered by ViewVC 1.1.22