/[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.64 - (show annotations) (download)
Tue Jan 25 22:40:41 2011 UTC (13 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62w, checkpoint62x
Changes since 1.63: +19 -24 lines
-move call to S/R EXF_CHECK from exf_readparms.F to packages_check.F
-print warning msg when resetting tauThetaClimRelax/tauSaltClimRelax

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

  ViewVC Help
Powered by ViewVC 1.1.22