/[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.65 - (show annotations) (download)
Wed May 25 00:33:32 2011 UTC (13 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62z, checkpoint62y, checkpoint63
Changes since 1.64: +3 -1 lines
move "useOBCSYearlyFields" from "data.obcs" (holf in OBCS_PARAMS.h)
to parameter file "data.exf", namelist EXF_NML_OBCS (in EXF_PARAM.h)

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

  ViewVC Help
Powered by ViewVC 1.1.22