/[MITgcm]/MITgcm/pkg/exf/exf_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_readparms.F

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


Revision 1.47 - (show annotations) (download)
Tue May 8 03:49:33 2007 UTC (17 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.46: +48 -35 lines
- add fixed turbulent transfert Coeff over ice (as in Large&Yeager 2004)
- change default values of ice & snow emissivity (only used in thsice)

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.46 2007/05/02 22:31:35 heimbach Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5 #ifdef ALLOW_OBCS
6 # include "OBCS_OPTIONS.h"
7 #endif
8
9 subroutine exf_readparms( mythid )
10
11 c ==================================================================
12 c SUBROUTINE exf_readparms
13 c ==================================================================
14 c
15 c o This routine initialises the package that calculates external
16 c forcing fields for a given timestep of the MITgcmUV. Parameters
17 c for this package are set in "data.externalforcing". Some additional
18 c precompiler switches have to be specified in "EXF_OPTIONS.h".
19 c
20 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
21 c
22 c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
23 c - Restructured the code in order to create a package
24 c for the MITgcmUV.
25 c Christian Eckert eckert@mit.edu 12-Feb-2000
26 c - Changed Routine names (package prefix: exf_)
27 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
28 c - changed the handling of precip and sflux with respect
29 c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
30 c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
31 c - moved relaxation and climatology to extra routines
32 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
33 c - added obcs parameters
34 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
35 c - added new obcs parameters (for each boundaries)
36 c included runoff D. Stammer, Nov. 25, 2001
37 c included pressure forcing. heimbach@mit.edu 05-Nov-2002
38 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
39 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40 c
41 c ==================================================================
42 c SUBROUTINE exf_readparms
43 c ==================================================================
44
45 implicit none
46
47 c == global variables ==
48
49 #include "EEPARAMS.h"
50 #include "SIZE.h"
51 #include "PARAMS.h"
52 #include "cal.h"
53 #include "EXF_PARAM.h"
54 #include "EXF_CONSTANTS.h"
55
56 c == routine arguments ==
57
58 integer mythid
59
60 c == local variables ==
61
62 integer i, idummy
63 integer date_array(4), difftime(4)
64 integer iUnit
65
66 character*(max_len_mbuf) msgbuf
67
68 c == end of interface ==
69
70 c Surface flux data.
71 NAMELIST /EXF_NML_01/
72 & windstressmax, repeatPeriod, exf_albedo,
73 & ocean_emissivity, ice_emissivity, snow_emissivity,
74 & exf_iceCd, exf_iceCe, exf_iceCh,
75 & exf_scal_BulkCdn, climtempfreeze,
76 & exf_iprec, exf_yftype, exf_monFreq,
77 & useExfYearlyFields, twoDigitYear, useExfCheckRange,
78 & useStabilityFct_overIce, selectStressGridPosition,
79 & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
80 & cdrag_1, cdrag_2, cdrag_3, cstanton_1, cstanton_2, cdalton,
81 & flamb, flami, zolmin, zref,
82 & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
83 & humid_fac, gamma_blk, saltsat, psim_fac
84
85 NAMELIST /EXF_NML_02/
86 & hfluxfile, atempfile, aqhfile,
87 & sfluxfile, precipfile, runofffile,
88 & ustressfile, vstressfile, evapfile,
89 & snowprecipfile, uwindfile, vwindfile,
90 & wspeedfile, swfluxfile, lwfluxfile,
91 & apressurefile, swdownfile, lwdownfile,
92 & climsstfile, climsssfile,
93 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
94 & atempstartdate1, atempstartdate2, atempperiod,
95 & aqhstartdate1, aqhstartdate2, aqhperiod,
96 & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
97 & evapstartdate1, evapstartdate2, evapperiod,
98 & precipstartdate1, precipstartdate2, precipperiod,
99 & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
100 & runoffstartdate1, runoffstartdate2, runoffperiod,
101 & ustressstartdate1, ustressstartdate2, ustressperiod,
102 & vstressstartdate1, vstressstartdate2, vstressperiod,
103 & uwindstartdate1, uwindstartdate2, uwindperiod,
104 & vwindstartdate1, vwindstartdate2, vwindperiod,
105 & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
106 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
107 & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
108 & swdownstartdate1, swdownstartdate2, swdownperiod,
109 & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
110 &apressurestartdate1,apressurestartdate2,apressureperiod,
111 & climsststartdate1, climsststartdate2, climsstperiod,
112 & climsssstartdate1, climsssstartdate2, climsssperiod
113
114 NAMELIST /EXF_NML_03/
115 & exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap,
116 & exf_inscal_ustress, exf_inscal_vstress,
117 & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed,
118 & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
119 & exf_inscal_sst, exf_inscal_sss,
120 & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
121 & exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip,
122 & exf_inscal_swdown, exf_inscal_lwdown,
123 & exf_inscal_climsst, exf_inscal_climsss,
124 & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
125 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
126 & exf_outscal_sflux, exf_outscal_apressure,
127 & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
128 & precipconst, snowprecipconst, runoffconst, ustressconst,
129 & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
130 & lwfluxconst, swdownconst, lwdownconst, apressureconst,
131 & climsstconst, climsssconst,
132 & hflux_exfremo_intercept, hflux_exfremo_slope,
133 & atemp_exfremo_intercept, atemp_exfremo_slope,
134 & aqh_exfremo_intercept, aqh_exfremo_slope,
135 & sflux_exfremo_intercept, sflux_exfremo_slope,
136 & evap_exfremo_intercept, evap_exfremo_slope,
137 & precip_exfremo_intercept, precip_exfremo_slope,
138 & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
139 & runoff_exfremo_intercept, runoff_exfremo_slope,
140 & ustress_exfremo_intercept, ustress_exfremo_slope,
141 & vstress_exfremo_intercept, vstress_exfremo_slope,
142 & uwind_exfremo_intercept, uwind_exfremo_slope,
143 & vwind_exfremo_intercept, vwind_exfremo_slope,
144 & wspeed_exfremo_intercept, wspeed_exfremo_slope,
145 & swflux_exfremo_intercept, swflux_exfremo_slope,
146 & lwflux_exfremo_intercept, lwflux_exfremo_slope,
147 & swdown_exfremo_intercept, swdown_exfremo_slope,
148 & lwdown_exfremo_intercept, lwdown_exfremo_slope,
149 & apressure_exfremo_intercept, apressure_exfremo_slope,
150 & climsst_exfremo_intercept, climsst_exfremo_slope,
151 & climsss_exfremo_intercept, climsss_exfremo_slope
152
153 NAMELIST /EXF_NML_04/
154 & idummy
155 #ifdef USE_EXF_INTERPOLATION
156 & , ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
157 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
158 & ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat,
159 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
160 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
161 & hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat,
162 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
163 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
164 & swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat,
165 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
166 & atemp_nlon, atemp_nlat,
167 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
168 &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
169 & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
170 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
171 & precip_nlon, precip_nlat, runoff_nlon, runoff_nlat,
172 & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
173 & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
174 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
175 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
176 & uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat,
177 & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
178 & wspeed_nlon, wspeed_nlat,
179 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
180 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
181 & swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat,
182 & apressure_lon0,apressure_lon_inc,apressure_nlon,
183 & apressure_lat0,apressure_lat_inc,apressure_nlat,
184 & climsst_lon0, climsst_lon_inc, climsst_nlon,
185 & climsst_lat0, climsst_lat_inc, climsst_nlat,
186 & climsss_lon0, climsss_lon_inc, climsss_nlon,
187 & climsss_lat0, climsss_lat_inc, climsss_nlat
188 #endif
189
190 NAMELIST /EXF_NML_OBCS/
191 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
192 & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
193 & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
194 & obcsWstartdate1, obcsWstartdate2, obcsWperiod
195
196 _BEGIN_MASTER(mythid)
197
198 c Set default values.
199
200 year2sec = 365.*86400.
201 exf_monFreq = monitorFreq
202
203 C- default value should be set to main model parameter:
204 c cen2kel = celsius2K
205 c gravity_mks = gravity <- not yet a parameter
206 c atmcp = atm_Cp
207 c humid_fac = atm_Rq <- default is zero !!!
208
209 cen2kel = 273.150 _d 0
210 gravity_mks = 9.81 _d 0
211 atmrho = 1.200 _d 0
212 atmcp = 1005.000 _d 0
213 flamb = 2500000.000 _d 0
214 flami = 334000.000 _d 0
215 cvapor_fac = 640380.000 _d 0
216 cvapor_exp = 5107.400 _d 0
217 cvapor_fac_ice = 11637800.000 _d 0
218 cvapor_exp_ice = 5897.800 _d 0
219 humid_fac = 0.606 _d 0
220 gamma_blk = 0.010 _d 0
221 saltsat = 0.980 _d 0
222 cdrag_1 = 0.0027000 _d 0
223 cdrag_2 = 0.0001420 _d 0
224 cdrag_3 = 0.0000764 _d 0
225 cstanton_1 = 0.0327 _d 0
226 cstanton_2 = 0.0180 _d 0
227 cdalton = 0.0346 _d 0
228 zolmin = -100.000 _d 0
229 psim_fac = 5.000 _d 0
230 zref = 10.000 _d 0
231 hu = 10.000 _d 0
232 ht = 2.000 _d 0
233 umin = 0.5 _d 0
234 useStabilityFct_overIce = .FALSE.
235 exf_iceCd = 1.63 _d -3
236 exf_iceCe = 1.63 _d -3
237 exf_iceCh = 1.63 _d -3
238 exf_albedo = 0.1 _d 0
239 c-- this default is chosen to be backward compatible with
240 c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
241 ocean_emissivity = 5.50 _d-8 / 5.670 _d-8
242 ice_emissivity = 0.95 _d 0
243 snow_emissivity = 0.95 _d 0
244
245 c Calendar data.
246 hfluxstartdate1 = 0
247 hfluxstartdate2 = 0
248 hfluxperiod = 0.0 _d 0
249 hfluxconst = 0.0 _d 0
250 hflux_exfremo_intercept = 0.0 _d 0
251 hflux_exfremo_slope = 0.0 _d 0
252
253 atempstartdate1 = 0
254 atempstartdate2 = 0
255 atempperiod = 0.0 _d 0
256 atempconst = celsius2K
257 atemp_exfremo_intercept = 0.0 _d 0
258 atemp_exfremo_slope = 0.0 _d 0
259
260 aqhstartdate1 = 0
261 aqhstartdate2 = 0
262 aqhperiod = 0.0 _d 0
263 aqhconst = 0.0 _d 0
264 aqh_exfremo_intercept = 0.0 _d 0
265 aqh_exfremo_slope = 0.0 _d 0
266
267 sfluxstartdate1 = 0
268 sfluxstartdate2 = 0
269 sfluxperiod = 0.0 _d 0
270 sfluxconst = 0.0 _d 0
271 sflux_exfremo_intercept = 0.0 _d 0
272 sflux_exfremo_slope = 0.0 _d 0
273
274 evapstartdate1 = 0
275 evapstartdate2 = 0
276 evapperiod = 0.0 _d 0
277 evapconst = 0.0 _d 0
278 evap_exfremo_intercept = 0.0 _d 0
279 evap_exfremo_slope = 0.0 _d 0
280
281 precipstartdate1 = 0
282 precipstartdate2 = 0
283 precipperiod = 0.0 _d 0
284 precipconst = 0.0 _d 0
285 precip_exfremo_intercept = 0.0 _d 0
286 precip_exfremo_slope = 0.0 _d 0
287
288 snowprecipstartdate1 = 0
289 snowprecipstartdate2 = 0
290 snowprecipperiod = 0.0 _d 0
291 snowprecipconst = 0.0 _d 0
292 snowprecip_exfremo_intercept = 0.0 _d 0
293 snowprecip_exfremo_slope = 0.0 _d 0
294
295 runoffstartdate1 = 0
296 runoffstartdate2 = 0
297 runoffperiod = 0.0 _d 0
298 runoffconst = 0.0 _d 0
299 runoff_exfremo_intercept = 0.0 _d 0
300 runoff_exfremo_slope = 0.0 _d 0
301
302 ustressstartdate1 = 0
303 ustressstartdate2 = 0
304 ustressperiod = 0.0 _d 0
305 ustressconst = 0.0 _d 0
306 ustress_exfremo_intercept = 0.0 _d 0
307 ustress_exfremo_slope = 0.0 _d 0
308
309 vstressstartdate1 = 0
310 vstressstartdate2 = 0
311 vstressperiod = 0.0 _d 0
312 vstressconst = 0.0 _d 0
313 vstress_exfremo_intercept = 0.0 _d 0
314 vstress_exfremo_slope = 0.0 _d 0
315
316 uwindstartdate1 = 0
317 uwindstartdate2 = 0
318 uwindperiod = 0.0 _d 0
319 uwindconst = 0.0 _d 0
320 uwind_exfremo_intercept = 0.0 _d 0
321 uwind_exfremo_slope = 0.0 _d 0
322
323 vwindstartdate1 = 0
324 vwindstartdate2 = 0
325 vwindperiod = 0.0 _d 0
326 vwindconst = 0.0 _d 0
327 vwind_exfremo_intercept = 0.0 _d 0
328 vwind_exfremo_slope = 0.0 _d 0
329
330 wspeedstartdate1 = 0
331 wspeedstartdate2 = 0
332 wspeedperiod = 0.0 _d 0
333 wspeedconst = 0.0 _d 0
334 wspeed_exfremo_intercept = 0.0 _d 0
335 wspeed_exfremo_slope = 0.0 _d 0
336
337 swfluxstartdate1 = 0
338 swfluxstartdate2 = 0
339 swfluxperiod = 0.0 _d 0
340 swfluxconst = 0.0 _d 0
341 swflux_exfremo_intercept = 0.0 _d 0
342 swflux_exfremo_slope = 0.0 _d 0
343
344 lwfluxstartdate1 = 0
345 lwfluxstartdate2 = 0
346 lwfluxperiod = 0.0 _d 0
347 lwfluxconst = 0.0 _d 0
348 lwflux_exfremo_intercept = 0.0 _d 0
349 lwflux_exfremo_slope = 0.0 _d 0
350
351 swdownstartdate1 = 0
352 swdownstartdate2 = 0
353 swdownperiod = 0.0 _d 0
354 swdownconst = 0.0 _d 0
355 swdown_exfremo_intercept = 0.0 _d 0
356 swdown_exfremo_slope = 0.0 _d 0
357
358 lwdownstartdate1 = 0
359 lwdownstartdate2 = 0
360 lwdownperiod = 0.0 _d 0
361 lwdownconst = 0.0 _d 0
362 lwdown_exfremo_intercept = 0.0 _d 0
363 lwdown_exfremo_slope = 0.0 _d 0
364
365 apressurestartdate1 = 0
366 apressurestartdate2 = 0
367 apressureperiod = 0.0 _d 0
368 apressureconst = 0.0 _d 0
369 apressure_exfremo_intercept = 0.0 _d 0
370 apressure_exfremo_slope = 0.0 _d 0
371
372 climsststartdate1 = 0
373 climsststartdate2 = 0
374 climsstperiod = 0
375 climsstconst = 0.0 _d 0
376 climsst_exfremo_intercept = 0.0 _d 0
377 climsst_exfremo_slope = 0.0 _d 0
378
379 climsssstartdate1 = 0
380 climsssstartdate2 = 0
381 climsssperiod = 0
382 climsssconst = 0.0 _d 0
383 climsss_exfremo_intercept = 0.0 _d 0
384 climsss_exfremo_slope = 0.0 _d 0
385
386 obcsNstartdate1 = 0
387 obcsNstartdate2 = 0
388 obcsNperiod = 0.0 _d 0
389
390 obcsSstartdate1 = 0
391 obcsSstartdate2 = 0
392 obcsSperiod = 0.0 _d 0
393
394 obcsEstartdate1 = 0
395 obcsEstartdate2 = 0
396 obcsEperiod = 0.0 _d 0
397
398 obcsWstartdate1 = 0
399 obcsWstartdate2 = 0
400 obcsWperiod = 0.0 _d 0
401
402 repeatPeriod = 0.0 _d 0
403 windstressmax = 2.0 _d 0
404
405 exf_scal_BulkCdn = 1.0 _d 0
406
407 c Initialise freezing temperature of sea water
408 climtempfreeze = -1.9 _d 0
409
410 c Data files.
411 hfluxfile = ' '
412 atempfile = ' '
413 aqhfile = ' '
414 evapfile = ' '
415 precipfile = ' '
416 snowprecipfile = ' '
417 sfluxfile = ' '
418 runofffile = ' '
419 ustressfile = ' '
420 vstressfile = ' '
421 uwindfile = ' '
422 vwindfile = ' '
423 wspeedfile = ' '
424 swfluxfile = ' '
425 lwfluxfile = ' '
426 swdownfile = ' '
427 lwdownfile = ' '
428 apressurefile = ' '
429 climsstfile = ' '
430 climsssfile = ' '
431
432 c Start dates.
433 hfluxstartdate = 0.
434 atempstartdate = 0.
435 aqhstartdate = 0.
436 evapstartdate = 0.
437 precipstartdate = 0.
438 snowprecipstartdate = 0.
439 sfluxstartdate = 0.
440 runoffstartdate = 0.
441 ustressstartdate = 0.
442 vstressstartdate = 0.
443 uwindstartdate = 0.
444 vwindstartdate = 0.
445 wspeedstartdate = 0.
446 swfluxstartdate = 0.
447 lwfluxstartdate = 0.
448 swdownstartdate = 0.
449 lwdownstartdate = 0.
450 obcsNstartdate = 0.
451 obcsSstartdate = 0.
452 obcsEstartdate = 0.
453 obcsWstartdate = 0.
454 apressurestartdate = 0.
455 climsststartdate = 0.
456 climsssstartdate = 0.
457
458 c Initialise file type and field precision
459 exf_iprec = 32
460 exf_yftype = 'RL'
461 useExfYearlyFields = .FALSE.
462 twoDigitYear = .FALSE.
463 useExfCheckRange = .TRUE.
464 selectStressGridPosition = UNSET_I
465
466 c Input scaling factors.
467 exf_inscal_hflux = 1. _d 0
468 exf_inscal_sflux = 1. _d 0
469 exf_inscal_ustress = 1. _d 0
470 exf_inscal_vstress = 1. _d 0
471 exf_inscal_uwind = 1. _d 0
472 exf_inscal_vwind = 1. _d 0
473 exf_inscal_wspeed = 1. _d 0
474 exf_inscal_swflux = 1. _d 0
475 exf_inscal_lwflux = 1. _d 0
476 exf_inscal_precip = 1. _d 0
477 exf_inscal_snowprecip = 1. _d 0
478 exf_inscal_sst = 1. _d 0
479 exf_inscal_sss = 1. _d 0
480 exf_inscal_atemp = 1. _d 0
481 exf_offset_atemp = 0. _d 0
482 exf_inscal_aqh = 1. _d 0
483 exf_inscal_evap = 1. _d 0
484 exf_inscal_apressure = 1. _d 0
485 exf_inscal_runoff = 1. _d 0
486 exf_inscal_swdown = 1. _d 0
487 exf_inscal_lwdown = 1. _d 0
488 exf_inscal_climsst = 1. _d 0
489 exf_inscal_climsss = 1. _d 0
490
491 c Output scaling factors.
492 exf_outscal_hflux = 1. _d 0
493 exf_outscal_sflux = 1. _d 0
494 exf_outscal_ustress = 1. _d 0
495 exf_outscal_vstress = 1. _d 0
496 exf_outscal_swflux = 1. _d 0
497 exf_outscal_sst = 1. _d 0
498 exf_outscal_sss = 1. _d 0
499 exf_outscal_apressure= 1. _d 0
500
501 #ifdef USE_EXF_INTERPOLATION
502 ustress_lon0 = thetaMin
503 uwind_lon0 = thetaMin
504 vstress_lon0 = thetaMin + delX(1) / 2
505 hflux_lon0 = thetaMin + delX(1) / 2
506 sflux_lon0 = thetaMin + delX(1) / 2
507 swflux_lon0 = thetaMin + delX(1) / 2
508 runoff_lon0 = thetaMin + delX(1) / 2
509 atemp_lon0 = thetaMin + delX(1) / 2
510 aqh_lon0 = thetaMin + delX(1) / 2
511 evap_lon0 = thetaMin + delX(1) / 2
512 precip_lon0 = thetaMin + delX(1) / 2
513 snowprecip_lon0 = thetaMin + delX(1) / 2
514 vwind_lon0 = thetaMin + delX(1) / 2
515 wspeed_lon0 = thetaMin + delX(1) / 2
516 lwflux_lon0 = thetaMin + delX(1) / 2
517 swdown_lon0 = thetaMin + delX(1) / 2
518 lwdown_lon0 = thetaMin + delX(1) / 2
519 apressure_lon0 = thetaMin + delX(1) / 2
520 vstress_lat0 = phimin
521 vwind_lat0 = phimin
522 wspeed_lat0 = phimin
523 ustress_lat0 = phimin + delY(1) / 2
524 hflux_lat0 = phimin + delY(1) / 2
525 sflux_lat0 = phimin + delY(1) / 2
526 runoff_lat0 = phimin + delY(1) / 2
527 swflux_lat0 = phimin + delY(1) / 2
528 atemp_lat0 = phimin + delY(1) / 2
529 aqh_lat0 = phimin + delY(1) / 2
530 evap_lat0 = phimin + delY(1) / 2
531 precip_lat0 = phimin + delY(1) / 2
532 snowprecip_lat0 = phimin + delY(1) / 2
533 uwind_lat0 = phimin + delY(1) / 2
534 lwflux_lat0 = phimin + delY(1) / 2
535 swdown_lat0 = phimin + delY(1) / 2
536 lwdown_lat0 = phimin + delY(1) / 2
537 apressure_lat0 = phimin + delY(1) / 2
538 ustress_nlon = Nx
539 ustress_nlat = Ny
540 vstress_nlon = Nx
541 vstress_nlat = Ny
542 hflux_nlon = Nx
543 hflux_nlat = Ny
544 sflux_nlon = Nx
545 sflux_nlat = Ny
546 swflux_nlon = Nx
547 swflux_nlat = Ny
548 runoff_nlon = Nx
549 runoff_nlat = Ny
550 atemp_nlon = Nx
551 atemp_nlat = Ny
552 aqh_nlon = Nx
553 aqh_nlat = Ny
554 evap_nlon = Nx
555 evap_nlat = Ny
556 precip_nlon = Nx
557 snowprecip_nlon = Nx
558 precip_nlat = Ny
559 snowprecip_nlat = Ny
560 uwind_nlon = Nx
561 uwind_nlat = Ny
562 vwind_nlon = Nx
563 vwind_nlat = Ny
564 wspeed_nlon = Nx
565 wspeed_nlat = Ny
566 lwflux_nlon = Nx
567 lwflux_nlat = Ny
568 swdown_nlon = Nx
569 swdown_nlat = Ny
570 lwdown_nlon = Nx
571 lwdown_nlat = Ny
572 apressure_nlon = Nx
573 apressure_nlat = Ny
574 Ustress_lon_inc = delX(1)
575 vstress_lon_inc = delX(1)
576 hflux_lon_inc = delX(1)
577 sflux_lon_inc = delX(1)
578 swflux_lon_inc = delX(1)
579 runoff_lon_inc = delX(1)
580 atemp_lon_inc = delX(1)
581 aqh_lon_inc = delX(1)
582 evap_lon_inc = delX(1)
583 precip_lon_inc = delX(1)
584 snowprecip_lon_inc = delX(1)
585 uwind_lon_inc = delX(1)
586 vwind_lon_inc = delX(1)
587 wspeed_lon_inc = delX(1)
588 lwflux_lon_inc = delX(1)
589 swdown_lon_inc = delX(1)
590 lwdown_lon_inc = delX(1)
591 apressure_lon_inc = delX(1)
592 climsst_lon0 = thetaMin + delX(1) / 2
593 climsss_lon0 = thetaMin + delX(1) / 2
594 climsst_lat0 = phimin + delY(1) / 2
595 climsss_lat0 = phimin + delY(1) / 2
596 climsst_nlon = Nx
597 climsst_nlat = Ny
598 climsss_nlon = Nx
599 climsss_nlat = Ny
600 climsst_lon_inc = delX(1)
601 climsss_lon_inc = delX(1)
602 DO i=1,MAX_LAT_INC
603 IF (i.LT.Ny) THEN
604 vstress_lat_inc(i) = delY(i)
605 vwind_lat_inc(i) = delY(i)
606 wspeed_lat_inc(i) = delY(i)
607 ustress_lat_inc(i) = (delY(i) + delY(i)) / 2.
608 hflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
609 sflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
610 swflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
611 runoff_lat_inc(i) = (delY(i) + delY(i)) / 2.
612 atemp_lat_inc(i) = (delY(i) + delY(i)) / 2.
613 aqh_lat_inc(i) = (delY(i) + delY(i)) / 2.
614 evap_lat_inc(i) = (delY(i) + delY(i)) / 2.
615 precip_lat_inc(i) = (delY(i) + delY(i)) / 2.
616 snowprecip_lat_inc(i) = (delY(i) + delY(i)) / 2.
617 uwind_lat_inc(i) = (delY(i) + delY(i)) / 2.
618 lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
619 swdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
620 lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
621 apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.
622 climsst_lat_inc(i) = (delY(i) + delY(i)) / 2.
623 climsss_lat_inc(i) = (delY(i) + delY(i)) / 2.
624 ELSE
625 ustress_lat_inc(i) = 0.
626 vstress_lat_inc(i) = 0.
627 hflux_lat_inc(i) = 0.
628 sflux_lat_inc(i) = 0.
629 swflux_lat_inc(i) = 0.
630 runoff_lat_inc(i) = 0.
631 atemp_lat_inc(i) = 0.
632 aqh_lat_inc(i) = 0.
633 evap_lat_inc(i) = 0.
634 precip_lat_inc(i) = 0.
635 snowprecip_lat_inc(i) = 0.
636 uwind_lat_inc(i) = 0.
637 vwind_lat_inc(i) = 0.
638 wspeed_lat_inc(i) = 0.
639 lwflux_lat_inc(i) = 0.
640 swdown_lat_inc(i) = 0.
641 lwdown_lat_inc(i) = 0.
642 apressure_lat_inc(i) = 0.
643 climsst_lat_inc(i) = 0.
644 climsss_lat_inc(i) = 0.
645 ENDIF
646 ENDDO
647 #endif /* USE_EXF_INTERPOLATION */
648
649 c Next, read the forcing data file.
650 WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
651 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
652 & SQUEEZE_RIGHT , 1)
653
654 CALL OPEN_COPY_DATA_FILE(
655 I 'data.exf', 'EXF_READPARMS',
656 O iUnit,
657 I myThid )
658
659 WRITE(msgBuf,'(A)')
660 & 'EXF_READPARMS: reading EXF_NML_01'
661 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
662 & SQUEEZE_RIGHT , 1)
663 READ( iUnit, nml = EXF_NML_01 )
664 WRITE(msgBuf,'(A)')
665 & 'EXF_READPARMS: reading EXF_NML_02'
666 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
667 & SQUEEZE_RIGHT , 1)
668 READ( iUnit, nml = EXF_NML_02 )
669 WRITE(msgBuf,'(A)')
670 & 'EXF_READPARMS: reading EXF_NML_03'
671 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
672 & SQUEEZE_RIGHT , 1)
673 READ( iUnit, nml = EXF_NML_03 )
674 WRITE(msgBuf,'(A)')
675 & 'EXF_READPARMS: reading EXF_NML_04'
676 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
677 & SQUEEZE_RIGHT , 1)
678 READ( iUnit, nml = EXF_NML_04 )
679 #ifdef ALLOW_OBCS
680 WRITE(msgBuf,'(A)')
681 & 'EXF_READPARMS: reading EXF_NML_OBCS'
682 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
683 & SQUEEZE_RIGHT , 1)
684 READ( iUnit, nml = EXF_NML_OBCS )
685 #endif
686
687 WRITE(msgBuf,'(A)')
688 & 'EXF_READPARMS: finished reading data.exf'
689 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
690 & SQUEEZE_RIGHT , 1)
691
692 CLOSE( iUnit )
693
694 c Hard-wire certain parameters
695 hq = ht
696
697 call exf_check( mythid )
698
699 c Complete the start date specifications for the forcing
700 c fields to get a complete calendar date array.
701
702 #ifdef ALLOW_ATM_WIND
703 if ( uwindfile .NE. ' ' .and. uwindperiod .gt. 0. ) then
704 call cal_FullDate ( uwindstartdate1 , uwindstartdate2,
705 & date_array ,mythid )
706 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
707 call cal_ToSeconds ( difftime, uwindstartdate ,mythid )
708 uwindstartdate = modelstart + uwindstartdate
709 endif
710 if ( vwindfile .NE. ' ' .and. vwindperiod .gt. 0. ) then
711 call cal_FullDate ( vwindstartdate1 , vwindstartdate2,
712 & date_array ,mythid )
713 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
714 call cal_ToSeconds ( difftime, vwindstartdate ,mythid )
715 vwindstartdate = modelstart + vwindstartdate
716 endif
717 if ( wspeedfile .NE. ' ' .and. wspeedperiod .gt. 0. ) then
718 call cal_FullDate ( wspeedstartdate1, wspeedstartdate2,
719 & date_array ,mythid )
720 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
721 call cal_ToSeconds ( difftime, wspeedstartdate ,mythid )
722 wspeedstartdate = modelstart + wspeedstartdate
723 endif
724 #else
725 if ( ustressfile .NE. ' ' .and. ustressperiod .gt. 0. ) then
726 call cal_FullDate ( ustressstartdate1 , ustressstartdate2,
727 & date_array ,mythid )
728 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
729 call cal_ToSeconds ( difftime, ustressstartdate ,mythid )
730 ustressstartdate = modelstart + ustressstartdate
731 endif
732 if ( vstressfile .NE. ' ' .and. vstressperiod .gt. 0. ) then
733 call cal_FullDate ( vstressstartdate1 , vstressstartdate2,
734 & date_array ,mythid )
735 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
736 call cal_ToSeconds ( difftime, vstressstartdate ,mythid )
737 vstressstartdate = modelstart + vstressstartdate
738 endif
739 #endif
740
741 #ifdef ALLOW_ATM_TEMP
742 if ( atempfile .NE. ' ' .and. atempperiod .gt. 0. ) then
743 call cal_FullDate ( atempstartdate1 , atempstartdate2,
744 & date_array ,mythid )
745 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
746 call cal_ToSeconds ( difftime, atempstartdate ,mythid )
747 atempstartdate = modelstart + atempstartdate
748 endif
749 if ( aqhfile .NE. ' ' .and. aqhperiod .gt. 0. ) then
750 call cal_FullDate ( aqhstartdate1 , aqhstartdate2,
751 & date_array ,mythid )
752 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
753 call cal_ToSeconds ( difftime, aqhstartdate ,mythid )
754 aqhstartdate = modelstart + aqhstartdate
755 endif
756 if ( lwfluxfile .NE. ' ' .and. lwfluxperiod .gt. 0. ) then
757 call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2,
758 & date_array ,mythid )
759 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
760 call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid )
761 lwfluxstartdate = modelstart + lwfluxstartdate
762 endif
763 if ( precipfile .NE. ' ' .and. precipperiod .gt. 0. ) then
764 call cal_FullDate ( precipstartdate1 , precipstartdate2,
765 & date_array ,mythid )
766 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
767 call cal_ToSeconds ( difftime, precipstartdate ,mythid )
768 precipstartdate = modelstart + precipstartdate
769 endif
770 if ( snowprecipfile .NE. ' ' .and. snowprecipperiod .gt. 0. ) then
771 call cal_FullDate( snowprecipstartdate1, snowprecipstartdate2,
772 & date_array ,mythid )
773 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
774 call cal_ToSeconds ( difftime, snowprecipstartdate, mythid )
775 snowprecipstartdate = modelstart + snowprecipstartdate
776 endif
777 #else
778 if ( hfluxfile .NE. ' ' .and. hfluxperiod .gt. 0. ) then
779 call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2,
780 & date_array ,mythid )
781 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
782 call cal_ToSeconds ( difftime, hfluxstartdate ,mythid )
783 hfluxstartdate = modelstart + hfluxstartdate
784 endif
785 if ( sfluxfile .NE. ' ' .and. sfluxperiod .gt. 0. ) then
786 call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2,
787 & date_array ,mythid )
788 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
789 call cal_ToSeconds ( difftime, sfluxstartdate ,mythid )
790 sfluxstartdate = modelstart + sfluxstartdate
791 endif
792 #endif
793
794 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
795 if ( swfluxfile .NE. ' ' .and. swfluxperiod .gt. 0. ) then
796 call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2,
797 & date_array ,mythid )
798 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
799 call cal_ToSeconds ( difftime, swfluxstartdate ,mythid )
800 swfluxstartdate = modelstart + swfluxstartdate
801 endif
802 #endif
803
804 #ifdef EXF_READ_EVAP
805 if ( evapfile .NE. ' ' .and. evapperiod .gt. 0. ) then
806 call cal_FullDate ( evapstartdate1 , evapstartdate2,
807 & date_array ,mythid )
808 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
809 call cal_ToSeconds ( difftime, evapstartdate ,mythid )
810 evapstartdate = modelstart + evapstartdate
811 endif
812 #endif
813
814 #ifdef ALLOW_RUNOFF
815 if ( runofffile .NE. ' ' .AND. runoffperiod .gt. 0. ) then
816 call cal_FullDate ( runoffstartdate1 , runoffstartdate2,
817 & date_array ,mythid )
818 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
819 call cal_ToSeconds ( difftime, runoffstartdate ,mythid )
820 runoffstartdate = modelstart + runoffstartdate
821 endif
822 #endif
823
824 #ifdef ALLOW_DOWNWARD_RADIATION
825 if ( swdownfile .NE. ' ' .and. swdownperiod .gt. 0. ) then
826 call cal_FullDate ( swdownstartdate1 , swdownstartdate2,
827 & date_array ,mythid )
828 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
829 call cal_ToSeconds ( difftime, swdownstartdate ,mythid )
830 swdownstartdate = modelstart + swdownstartdate
831 endif
832 if ( lwdownfile .NE. ' ' .and. lwdownperiod .gt. 0. ) then
833 call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2,
834 & date_array ,mythid )
835 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
836 call cal_ToSeconds ( difftime, lwdownstartdate ,mythid )
837 lwdownstartdate = modelstart + lwdownstartdate
838 endif
839 #endif
840
841 #ifdef ATMOSPHERIC_LOADING
842 if ( apressurefile .NE. ' ' .and. apressureperiod .gt. 0. ) then
843 call cal_FullDate ( apressurestartdate1, apressurestartdate2,
844 & date_array ,mythid )
845 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
846 call cal_ToSeconds ( difftime, apressurestartdate ,mythid )
847 apressurestartdate = modelstart + apressurestartdate
848 endif
849 #endif
850
851 #ifdef ALLOW_OBCS
852 #ifdef ALLOW_OBCS_NORTH
853 if ( obcsNperiod .gt. 0 ) then
854 call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2,
855 & date_array ,mythid )
856 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
857 call cal_ToSeconds ( difftime, obcsNstartdate ,mythid )
858 obcsNstartdate = modelstart + obcsNstartdate
859 endif
860 #endif
861 #ifdef ALLOW_OBCS_SOUTH
862 if ( obcsSperiod .gt. 0 ) then
863 call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2,
864 & date_array ,mythid )
865 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
866 call cal_ToSeconds ( difftime, obcsSstartdate ,mythid )
867 obcsSstartdate = modelstart + obcsSstartdate
868 endif
869 #endif
870 #ifdef ALLOW_OBCS_EAST
871 if ( obcsEperiod .gt. 0 ) then
872 call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2,
873 & date_array ,mythid )
874 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
875 call cal_ToSeconds ( difftime, obcsEstartdate ,mythid )
876 obcsEstartdate = modelstart + obcsEstartdate
877 endif
878 #endif
879 #ifdef ALLOW_OBCS_WEST
880 if ( obcsWperiod .gt. 0 ) then
881 call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2,
882 & date_array ,mythid )
883 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
884 call cal_ToSeconds ( difftime, obcsWstartdate ,mythid )
885 obcsWstartdate = modelstart + obcsWstartdate
886 endif
887 #endif
888 #endif /* ALLOW_OBCS */
889
890 #ifdef USE_EXF_INTERPOLATION
891 if ( climsst_nlat .GT. MAX_LAT_INC )
892 & stop 'stopped in exf_clim_readparms: climsst_nlat > MAX_LAT_INC'
893 if ( climsss_nlat .GT. MAX_LAT_INC )
894 & stop 'stopped in exf_clim_readparms: climsss_nlat > MAX_LAT_INC'
895 #endif
896
897 #ifdef ALLOW_CLIMSST_RELAXATION
898 if ( climsstfile .NE. ' ' .AND. climsstperiod .NE. 0. ) then
899 call cal_FullDate( climsststartdate1, climsststartdate2,
900 & date_array, mythid )
901 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
902 call cal_ToSeconds (difftime, climsststartdate ,mythid)
903 climsststartdate=modelstart+climsststartdate
904 endif
905 #endif
906
907 #ifdef ALLOW_CLIMSSS_RELAXATION
908 if ( climsssfile .NE. ' ' .AND. climsssperiod .NE. 0. ) then
909 call cal_FullDate( climsssstartdate1, climsssstartdate2,
910 & date_array, mythid )
911 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
912 call cal_ToSeconds (difftime, climsssstartdate ,mythid)
913 climsssstartdate=modelstart+climsssstartdate
914 endif
915 #endif
916
917 _END_MASTER( mythid )
918
919 _BARRIER
920
921 c-- Summarize the External forcing's setup.
922 call exf_summary( mythid )
923
924 RETURN
925 END

  ViewVC Help
Powered by ViewVC 1.1.22