/[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.51 - (show annotations) (download)
Wed Jun 11 18:55:10 2008 UTC (15 years, 11 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint61e, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.50: +23 -6 lines
Adding a capability to exf: read ice area from file.

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.50 2008/02/22 20:25:54 dimitri 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 integer i, idummy
60 integer iUnit
61
62 character*(max_len_mbuf) msgbuf
63
64 c == end of interface ==
65
66 c Surface flux data.
67 NAMELIST /EXF_NML_01/
68 & windstressmax, repeatPeriod, exf_albedo,
69 & ocean_emissivity, ice_emissivity, snow_emissivity,
70 & exf_iceCd, exf_iceCe, exf_iceCh,
71 & exf_scal_BulkCdn, climtempfreeze,
72 & exf_iprec, exf_yftype, exf_monFreq,
73 & useExfYearlyFields, twoDigitYear, useExfCheckRange,
74 & useStabilityFct_overIce, readStressOnAgrid, readStressOnCgrid,
75 & useRelativeWind,
76 & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
77 & cdrag_1, cdrag_2, cdrag_3, cstanton_1, cstanton_2, cdalton,
78 & flamb, flami, zolmin, zref,
79 & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
80 & humid_fac, gamma_blk, saltsat, psim_fac
81
82 NAMELIST /EXF_NML_02/
83 & hfluxfile, atempfile, aqhfile,
84 & sfluxfile, precipfile, runofffile,
85 & ustressfile, vstressfile, evapfile,
86 & snowprecipfile, uwindfile, vwindfile,
87 & wspeedfile, swfluxfile, lwfluxfile,
88 & apressurefile, swdownfile, lwdownfile,
89 & areamaskfile, climsstfile, climsssfile,
90 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
91 & atempstartdate1, atempstartdate2, atempperiod,
92 & aqhstartdate1, aqhstartdate2, aqhperiod,
93 & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
94 & evapstartdate1, evapstartdate2, evapperiod,
95 & precipstartdate1, precipstartdate2, precipperiod,
96 & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
97 & runoffstartdate1, runoffstartdate2, runoffperiod,
98 & ustressstartdate1, ustressstartdate2, ustressperiod,
99 & vstressstartdate1, vstressstartdate2, vstressperiod,
100 & uwindstartdate1, uwindstartdate2, uwindperiod,
101 & vwindstartdate1, vwindstartdate2, vwindperiod,
102 & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
103 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
104 & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
105 & swdownstartdate1, swdownstartdate2, swdownperiod,
106 & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
107 &apressurestartdate1,apressurestartdate2,apressureperiod,
108 & areamaskstartdate1,areamaskstartdate2,areamaskperiod,
109 & climsststartdate1, climsststartdate2, climsstperiod,
110 & climsssstartdate1, climsssstartdate2, climsssperiod
111
112 NAMELIST /EXF_NML_03/
113 & exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap,
114 & exf_inscal_ustress, exf_inscal_vstress,
115 & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed,
116 & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
117 & exf_inscal_sst, exf_inscal_sss,
118 & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
119 & exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip,
120 & exf_inscal_swdown, exf_inscal_lwdown,
121 & exf_inscal_climsst, exf_inscal_climsss,
122 & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
123 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
124 & exf_outscal_sflux, exf_outscal_apressure,
125 & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
126 & precipconst, snowprecipconst, runoffconst, ustressconst,
127 & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
128 & lwfluxconst, swdownconst, lwdownconst, apressureconst,
129 & areamaskconst, climsstconst, climsssconst,
130 & hflux_exfremo_intercept, hflux_exfremo_slope,
131 & atemp_exfremo_intercept, atemp_exfremo_slope,
132 & aqh_exfremo_intercept, aqh_exfremo_slope,
133 & sflux_exfremo_intercept, sflux_exfremo_slope,
134 & evap_exfremo_intercept, evap_exfremo_slope,
135 & precip_exfremo_intercept, precip_exfremo_slope,
136 & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
137 & runoff_exfremo_intercept, runoff_exfremo_slope,
138 & ustress_exfremo_intercept, ustress_exfremo_slope,
139 & vstress_exfremo_intercept, vstress_exfremo_slope,
140 & uwind_exfremo_intercept, uwind_exfremo_slope,
141 & vwind_exfremo_intercept, vwind_exfremo_slope,
142 & wspeed_exfremo_intercept, wspeed_exfremo_slope,
143 & swflux_exfremo_intercept, swflux_exfremo_slope,
144 & lwflux_exfremo_intercept, lwflux_exfremo_slope,
145 & swdown_exfremo_intercept, swdown_exfremo_slope,
146 & lwdown_exfremo_intercept, lwdown_exfremo_slope,
147 & apressure_exfremo_intercept, apressure_exfremo_slope,
148 & climsst_exfremo_intercept, climsst_exfremo_slope,
149 & climsss_exfremo_intercept, climsss_exfremo_slope
150
151 NAMELIST /EXF_NML_04/
152 & idummy
153 #ifdef USE_EXF_INTERPOLATION
154 & , ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
155 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
156 & ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat,
157 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
158 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
159 & hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat,
160 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
161 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
162 & swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat,
163 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
164 & atemp_nlon, atemp_nlat,
165 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
166 &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
167 & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
168 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
169 & precip_nlon, precip_nlat, runoff_nlon, runoff_nlat,
170 & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
171 & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
172 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
173 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
174 & uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat,
175 & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
176 & wspeed_nlon, wspeed_nlat,
177 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
178 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
179 & swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat,
180 & apressure_lon0,apressure_lon_inc,apressure_nlon,
181 & apressure_lat0,apressure_lat_inc,apressure_nlat,
182 & areamask_lon0,areamask_lon_inc,areamask_nlon,
183 & areamask_lat0,areamask_lat_inc,areamask_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 & siobNstartdate1, siobNstartdate2, siobNperiod,
196 & siobSstartdate1, siobSstartdate2, siobSperiod,
197 & siobEstartdate1, siobEstartdate2, siobEperiod,
198 & siobWstartdate1, siobWstartdate2, siobWperiod
199
200 _BEGIN_MASTER(mythid)
201
202 c Set default values.
203
204 year2sec = 365.*86400.
205 exf_monFreq = monitorFreq
206 useExfCheckRange = .TRUE.
207 readStressOnAgrid = .FALSE.
208 readStressOnCgrid = .FALSE.
209 useRelativeWind = .FALSE.
210
211 C- default value should be set to main model parameter:
212 c cen2kel = celsius2K
213 c gravity_mks = gravity
214 c atmcp = atm_Cp
215 c humid_fac = atm_Rq <- default is zero !!!
216
217 cen2kel = 273.150 _d 0
218 gravity_mks = 9.81 _d 0
219 atmrho = 1.200 _d 0
220 atmcp = 1005.000 _d 0
221 flamb = 2500000.000 _d 0
222 flami = 334000.000 _d 0
223 cvapor_fac = 640380.000 _d 0
224 cvapor_exp = 5107.400 _d 0
225 cvapor_fac_ice = 11637800.000 _d 0
226 cvapor_exp_ice = 5897.800 _d 0
227 humid_fac = 0.606 _d 0
228 gamma_blk = 0.010 _d 0
229 saltsat = 0.980 _d 0
230 cdrag_1 = 0.0027000 _d 0
231 cdrag_2 = 0.0001420 _d 0
232 cdrag_3 = 0.0000764 _d 0
233 cstanton_1 = 0.0327 _d 0
234 cstanton_2 = 0.0180 _d 0
235 cdalton = 0.0346 _d 0
236 zolmin = -100.000 _d 0
237 psim_fac = 5.000 _d 0
238 zref = 10.000 _d 0
239 hu = 10.000 _d 0
240 ht = 2.000 _d 0
241 umin = 0.5 _d 0
242 useStabilityFct_overIce = .FALSE.
243 exf_iceCd = 1.63 _d -3
244 exf_iceCe = 1.63 _d -3
245 exf_iceCh = 1.63 _d -3
246 exf_albedo = 0.1 _d 0
247 c-- this default is chosen to be backward compatible with
248 c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
249 ocean_emissivity = 5.50 _d-8 / 5.670 _d-8
250 ice_emissivity = 0.95 _d 0
251 snow_emissivity = 0.95 _d 0
252
253 c Calendar data.
254 hfluxstartdate1 = 0
255 hfluxstartdate2 = 0
256 hfluxperiod = 0.0 _d 0
257 hfluxconst = 0.0 _d 0
258 hflux_exfremo_intercept = 0.0 _d 0
259 hflux_exfremo_slope = 0.0 _d 0
260
261 atempstartdate1 = 0
262 atempstartdate2 = 0
263 atempperiod = 0.0 _d 0
264 atempconst = celsius2K
265 atemp_exfremo_intercept = 0.0 _d 0
266 atemp_exfremo_slope = 0.0 _d 0
267
268 aqhstartdate1 = 0
269 aqhstartdate2 = 0
270 aqhperiod = 0.0 _d 0
271 aqhconst = 0.0 _d 0
272 aqh_exfremo_intercept = 0.0 _d 0
273 aqh_exfremo_slope = 0.0 _d 0
274
275 sfluxstartdate1 = 0
276 sfluxstartdate2 = 0
277 sfluxperiod = 0.0 _d 0
278 sfluxconst = 0.0 _d 0
279 sflux_exfremo_intercept = 0.0 _d 0
280 sflux_exfremo_slope = 0.0 _d 0
281
282 evapstartdate1 = 0
283 evapstartdate2 = 0
284 evapperiod = 0.0 _d 0
285 evapconst = 0.0 _d 0
286 evap_exfremo_intercept = 0.0 _d 0
287 evap_exfremo_slope = 0.0 _d 0
288
289 precipstartdate1 = 0
290 precipstartdate2 = 0
291 precipperiod = 0.0 _d 0
292 precipconst = 0.0 _d 0
293 precip_exfremo_intercept = 0.0 _d 0
294 precip_exfremo_slope = 0.0 _d 0
295
296 snowprecipstartdate1 = 0
297 snowprecipstartdate2 = 0
298 snowprecipperiod = 0.0 _d 0
299 snowprecipconst = 0.0 _d 0
300 snowprecip_exfremo_intercept = 0.0 _d 0
301 snowprecip_exfremo_slope = 0.0 _d 0
302
303 runoffstartdate1 = 0
304 runoffstartdate2 = 0
305 runoffperiod = 0.0 _d 0
306 runoffconst = 0.0 _d 0
307 runoff_exfremo_intercept = 0.0 _d 0
308 runoff_exfremo_slope = 0.0 _d 0
309
310 ustressstartdate1 = 0
311 ustressstartdate2 = 0
312 ustressperiod = 0.0 _d 0
313 ustressconst = 0.0 _d 0
314 ustress_exfremo_intercept = 0.0 _d 0
315 ustress_exfremo_slope = 0.0 _d 0
316
317 vstressstartdate1 = 0
318 vstressstartdate2 = 0
319 vstressperiod = 0.0 _d 0
320 vstressconst = 0.0 _d 0
321 vstress_exfremo_intercept = 0.0 _d 0
322 vstress_exfremo_slope = 0.0 _d 0
323
324 uwindstartdate1 = 0
325 uwindstartdate2 = 0
326 uwindperiod = 0.0 _d 0
327 uwindconst = 0.0 _d 0
328 uwind_exfremo_intercept = 0.0 _d 0
329 uwind_exfremo_slope = 0.0 _d 0
330
331 vwindstartdate1 = 0
332 vwindstartdate2 = 0
333 vwindperiod = 0.0 _d 0
334 vwindconst = 0.0 _d 0
335 vwind_exfremo_intercept = 0.0 _d 0
336 vwind_exfremo_slope = 0.0 _d 0
337
338 wspeedstartdate1 = 0
339 wspeedstartdate2 = 0
340 wspeedperiod = 0.0 _d 0
341 wspeedconst = 0.0 _d 0
342 wspeed_exfremo_intercept = 0.0 _d 0
343 wspeed_exfremo_slope = 0.0 _d 0
344
345 swfluxstartdate1 = 0
346 swfluxstartdate2 = 0
347 swfluxperiod = 0.0 _d 0
348 swfluxconst = 0.0 _d 0
349 swflux_exfremo_intercept = 0.0 _d 0
350 swflux_exfremo_slope = 0.0 _d 0
351
352 lwfluxstartdate1 = 0
353 lwfluxstartdate2 = 0
354 lwfluxperiod = 0.0 _d 0
355 lwfluxconst = 0.0 _d 0
356 lwflux_exfremo_intercept = 0.0 _d 0
357 lwflux_exfremo_slope = 0.0 _d 0
358
359 swdownstartdate1 = 0
360 swdownstartdate2 = 0
361 swdownperiod = 0.0 _d 0
362 swdownconst = 0.0 _d 0
363 swdown_exfremo_intercept = 0.0 _d 0
364 swdown_exfremo_slope = 0.0 _d 0
365
366 lwdownstartdate1 = 0
367 lwdownstartdate2 = 0
368 lwdownperiod = 0.0 _d 0
369 lwdownconst = 0.0 _d 0
370 lwdown_exfremo_intercept = 0.0 _d 0
371 lwdown_exfremo_slope = 0.0 _d 0
372
373 apressurestartdate1 = 0
374 apressurestartdate2 = 0
375 apressureperiod = 0.0 _d 0
376 apressureconst = 0.0 _d 0
377 apressure_exfremo_intercept = 0.0 _d 0
378 apressure_exfremo_slope = 0.0 _d 0
379
380 areamaskstartdate1 = 0
381 areamaskstartdate2 = 0
382 areamaskperiod = 0.0 _d 0
383 areamaskconst = 0.0 _d 0
384
385 climsststartdate1 = 0
386 climsststartdate2 = 0
387 climsstperiod = 0
388 climsstconst = 0.0 _d 0
389 climsst_exfremo_intercept = 0.0 _d 0
390 climsst_exfremo_slope = 0.0 _d 0
391
392 climsssstartdate1 = 0
393 climsssstartdate2 = 0
394 climsssperiod = 0
395 climsssconst = 0.0 _d 0
396 climsss_exfremo_intercept = 0.0 _d 0
397 climsss_exfremo_slope = 0.0 _d 0
398
399 obcsNstartdate1 = 0
400 obcsNstartdate2 = 0
401 obcsNperiod = 0.0 _d 0
402 obcsSstartdate1 = 0
403 obcsSstartdate2 = 0
404 obcsSperiod = 0.0 _d 0
405 obcsEstartdate1 = 0
406 obcsEstartdate2 = 0
407 obcsEperiod = 0.0 _d 0
408 obcsWstartdate1 = 0
409 obcsWstartdate2 = 0
410 obcsWperiod = 0.0 _d 0
411
412 siobNstartdate1 = UNSET_I
413 siobNstartdate2 = UNSET_I
414 siobNperiod = UNSET_RL
415 siobSstartdate1 = UNSET_I
416 siobSstartdate2 = UNSET_I
417 siobSperiod = UNSET_RL
418 siobEstartdate1 = UNSET_I
419 siobEstartdate2 = UNSET_I
420 siobEperiod = UNSET_RL
421 siobWstartdate1 = UNSET_I
422 siobWstartdate2 = UNSET_I
423 siobWperiod = UNSET_RL
424
425 repeatPeriod = 0.0 _d 0
426 windstressmax = 2.0 _d 0
427
428 exf_scal_BulkCdn = 1.0 _d 0
429
430 c Initialise freezing temperature of sea water
431 climtempfreeze = -1.9 _d 0
432
433 c Data files.
434 hfluxfile = ' '
435 atempfile = ' '
436 aqhfile = ' '
437 evapfile = ' '
438 precipfile = ' '
439 snowprecipfile = ' '
440 sfluxfile = ' '
441 runofffile = ' '
442 ustressfile = ' '
443 vstressfile = ' '
444 uwindfile = ' '
445 vwindfile = ' '
446 wspeedfile = ' '
447 swfluxfile = ' '
448 lwfluxfile = ' '
449 swdownfile = ' '
450 lwdownfile = ' '
451 apressurefile = ' '
452 areamaskfile = ' '
453 climsstfile = ' '
454 climsssfile = ' '
455
456 c Start dates.
457 hfluxstartdate = 0.
458 atempstartdate = 0.
459 aqhstartdate = 0.
460 evapstartdate = 0.
461 precipstartdate = 0.
462 snowprecipstartdate= 0.
463 sfluxstartdate = 0.
464 runoffstartdate = 0.
465 ustressstartdate = 0.
466 vstressstartdate = 0.
467 uwindstartdate = 0.
468 vwindstartdate = 0.
469 wspeedstartdate = 0.
470 swfluxstartdate = 0.
471 lwfluxstartdate = 0.
472 swdownstartdate = 0.
473 lwdownstartdate = 0.
474 obcsNstartdate = 0.
475 obcsSstartdate = 0.
476 obcsEstartdate = 0.
477 obcsWstartdate = 0.
478 siobNstartdate = 0.
479 siobSstartdate = 0.
480 siobEstartdate = 0.
481 siobWstartdate = 0.
482 apressurestartdate = 0.
483 areamaskstartdate = 0.
484 climsststartdate = 0.
485 climsssstartdate = 0.
486
487 c Initialise file type and field precision
488 exf_iprec = 32
489 exf_yftype = 'RL'
490 useExfYearlyFields = .FALSE.
491 twoDigitYear = .FALSE.
492
493 c Input scaling factors.
494 exf_inscal_hflux = 1. _d 0
495 exf_inscal_sflux = 1. _d 0
496 exf_inscal_ustress = 1. _d 0
497 exf_inscal_vstress = 1. _d 0
498 exf_inscal_uwind = 1. _d 0
499 exf_inscal_vwind = 1. _d 0
500 exf_inscal_wspeed = 1. _d 0
501 exf_inscal_swflux = 1. _d 0
502 exf_inscal_lwflux = 1. _d 0
503 exf_inscal_precip = 1. _d 0
504 exf_inscal_snowprecip= 1. _d 0
505 exf_inscal_sst = 1. _d 0
506 exf_inscal_sss = 1. _d 0
507 exf_inscal_atemp = 1. _d 0
508 exf_offset_atemp = 0. _d 0
509 exf_inscal_aqh = 1. _d 0
510 exf_inscal_evap = 1. _d 0
511 exf_inscal_apressure = 1. _d 0
512 exf_inscal_runoff = 1. _d 0
513 exf_inscal_swdown = 1. _d 0
514 exf_inscal_lwdown = 1. _d 0
515 exf_inscal_climsst = 1. _d 0
516 exf_inscal_climsss = 1. _d 0
517
518 c Output scaling factors.
519 exf_outscal_hflux = 1. _d 0
520 exf_outscal_sflux = 1. _d 0
521 exf_outscal_ustress = 1. _d 0
522 exf_outscal_vstress = 1. _d 0
523 exf_outscal_swflux = 1. _d 0
524 exf_outscal_sst = 1. _d 0
525 exf_outscal_sss = 1. _d 0
526 exf_outscal_apressure= 1. _d 0
527
528 #ifdef USE_EXF_INTERPOLATION
529 ustress_lon0 = thetaMin
530 uwind_lon0 = thetaMin
531 vstress_lon0 = thetaMin + delX(1)*exf_half
532 hflux_lon0 = thetaMin + delX(1)*exf_half
533 sflux_lon0 = thetaMin + delX(1)*exf_half
534 swflux_lon0 = thetaMin + delX(1)*exf_half
535 runoff_lon0 = thetaMin + delX(1)*exf_half
536 atemp_lon0 = thetaMin + delX(1)*exf_half
537 aqh_lon0 = thetaMin + delX(1)*exf_half
538 evap_lon0 = thetaMin + delX(1)*exf_half
539 precip_lon0 = thetaMin + delX(1)*exf_half
540 snowprecip_lon0= thetaMin + delX(1)*exf_half
541 vwind_lon0 = thetaMin + delX(1)*exf_half
542 wspeed_lon0 = thetaMin + delX(1)*exf_half
543 lwflux_lon0 = thetaMin + delX(1)*exf_half
544 swdown_lon0 = thetaMin + delX(1)*exf_half
545 lwdown_lon0 = thetaMin + delX(1)*exf_half
546 apressure_lon0 = thetaMin + delX(1)*exf_half
547 areamask_lon0 = thetaMin + delX(1)*exf_half
548 vstress_lat0 = phimin
549 vwind_lat0 = phimin
550 wspeed_lat0 = phimin
551 ustress_lat0 = phimin + delY(1)*exf_half
552 hflux_lat0 = phimin + delY(1)*exf_half
553 sflux_lat0 = phimin + delY(1)*exf_half
554 runoff_lat0 = phimin + delY(1)*exf_half
555 swflux_lat0 = phimin + delY(1)*exf_half
556 atemp_lat0 = phimin + delY(1)*exf_half
557 aqh_lat0 = phimin + delY(1)*exf_half
558 evap_lat0 = phimin + delY(1)*exf_half
559 precip_lat0 = phimin + delY(1)*exf_half
560 snowprecip_lat0= phimin + delY(1)*exf_half
561 uwind_lat0 = phimin + delY(1)*exf_half
562 lwflux_lat0 = phimin + delY(1)*exf_half
563 swdown_lat0 = phimin + delY(1)*exf_half
564 lwdown_lat0 = phimin + delY(1)*exf_half
565 apressure_lat0 = phimin + delY(1)*exf_half
566 areamask_lat0 = phimin + delY(1)*exf_half
567 ustress_nlon = Nx
568 ustress_nlat = Ny
569 vstress_nlon = Nx
570 vstress_nlat = Ny
571 hflux_nlon = Nx
572 hflux_nlat = Ny
573 sflux_nlon = Nx
574 sflux_nlat = Ny
575 swflux_nlon = Nx
576 swflux_nlat = Ny
577 runoff_nlon = Nx
578 runoff_nlat = Ny
579 atemp_nlon = Nx
580 atemp_nlat = Ny
581 aqh_nlon = Nx
582 aqh_nlat = Ny
583 evap_nlon = Nx
584 evap_nlat = Ny
585 precip_nlon = Nx
586 snowprecip_nlon= Nx
587 precip_nlat = Ny
588 snowprecip_nlat= Ny
589 uwind_nlon = Nx
590 uwind_nlat = Ny
591 vwind_nlon = Nx
592 vwind_nlat = Ny
593 wspeed_nlon = Nx
594 wspeed_nlat = Ny
595 lwflux_nlon = Nx
596 lwflux_nlat = Ny
597 swdown_nlon = Nx
598 swdown_nlat = Ny
599 lwdown_nlon = Nx
600 lwdown_nlat = Ny
601 apressure_nlon = Nx
602 apressure_nlat = Ny
603 areamask_nlon = Nx
604 areamask_nlat = Ny
605 Ustress_lon_inc = delX(1)
606 vstress_lon_inc = delX(1)
607 hflux_lon_inc = delX(1)
608 sflux_lon_inc = delX(1)
609 swflux_lon_inc = delX(1)
610 runoff_lon_inc = delX(1)
611 atemp_lon_inc = delX(1)
612 aqh_lon_inc = delX(1)
613 evap_lon_inc = delX(1)
614 precip_lon_inc = delX(1)
615 snowprecip_lon_inc= delX(1)
616 uwind_lon_inc = delX(1)
617 vwind_lon_inc = delX(1)
618 wspeed_lon_inc = delX(1)
619 lwflux_lon_inc = delX(1)
620 swdown_lon_inc = delX(1)
621 lwdown_lon_inc = delX(1)
622 apressure_lon_inc = delX(1)
623 areamask_lon_inc = delX(1)
624 climsst_lon0 = thetaMin + delX(1)*exf_half
625 climsss_lon0 = thetaMin + delX(1)*exf_half
626 climsst_lat0 = phimin + delY(1)*exf_half
627 climsss_lat0 = phimin + delY(1)*exf_half
628 climsst_nlon = Nx
629 climsst_nlat = Ny
630 climsss_nlon = Nx
631 climsss_nlat = Ny
632 climsst_lon_inc = delX(1)
633 climsss_lon_inc = delX(1)
634 DO i=1,MAX_LAT_INC
635 IF (i.LT.Ny) THEN
636 vstress_lat_inc(i) = delY(i)
637 vwind_lat_inc(i) = delY(i)
638 wspeed_lat_inc(i) = delY(i)
639 ustress_lat_inc(i) = (delY(i) + delY(i))*exf_half
640 hflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
641 sflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
642 swflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
643 runoff_lat_inc(i) = (delY(i) + delY(i))*exf_half
644 atemp_lat_inc(i) = (delY(i) + delY(i))*exf_half
645 aqh_lat_inc(i) = (delY(i) + delY(i))*exf_half
646 evap_lat_inc(i) = (delY(i) + delY(i))*exf_half
647 precip_lat_inc(i) = (delY(i) + delY(i))*exf_half
648 snowprecip_lat_inc(i)= (delY(i) + delY(i))*exf_half
649 uwind_lat_inc(i) = (delY(i) + delY(i))*exf_half
650 lwflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
651 swdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
652 lwdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
653 apressure_lat_inc(i) = (delY(i) + delY(i))*exf_half
654 areamask_lat_inc(i) = (delY(i) + delY(i))*exf_half
655 climsst_lat_inc(i) = (delY(i) + delY(i))*exf_half
656 climsss_lat_inc(i) = (delY(i) + delY(i))*exf_half
657 ELSE
658 ustress_lat_inc(i) = 0.
659 vstress_lat_inc(i) = 0.
660 hflux_lat_inc(i) = 0.
661 sflux_lat_inc(i) = 0.
662 swflux_lat_inc(i) = 0.
663 runoff_lat_inc(i) = 0.
664 atemp_lat_inc(i) = 0.
665 aqh_lat_inc(i) = 0.
666 evap_lat_inc(i) = 0.
667 precip_lat_inc(i) = 0.
668 snowprecip_lat_inc(i)= 0.
669 uwind_lat_inc(i) = 0.
670 vwind_lat_inc(i) = 0.
671 wspeed_lat_inc(i) = 0.
672 lwflux_lat_inc(i) = 0.
673 swdown_lat_inc(i) = 0.
674 lwdown_lat_inc(i) = 0.
675 apressure_lat_inc(i) = 0.
676 areamask_lat_inc(i) = 0.
677 climsst_lat_inc(i) = 0.
678 climsss_lat_inc(i) = 0.
679 ENDIF
680 ENDDO
681 #endif /* USE_EXF_INTERPOLATION */
682
683 c Next, read the forcing data file.
684 WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
685 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
686 & SQUEEZE_RIGHT , 1)
687
688 CALL OPEN_COPY_DATA_FILE(
689 I 'data.exf', 'EXF_READPARMS',
690 O iUnit,
691 I myThid )
692
693 WRITE(msgBuf,'(A)')
694 & 'EXF_READPARMS: reading EXF_NML_01'
695 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
696 & SQUEEZE_RIGHT , 1)
697 READ( iUnit, nml = EXF_NML_01 )
698 WRITE(msgBuf,'(A)')
699 & 'EXF_READPARMS: reading EXF_NML_02'
700 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
701 & SQUEEZE_RIGHT , 1)
702 READ( iUnit, nml = EXF_NML_02 )
703 WRITE(msgBuf,'(A)')
704 & 'EXF_READPARMS: reading EXF_NML_03'
705 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
706 & SQUEEZE_RIGHT , 1)
707 READ( iUnit, nml = EXF_NML_03 )
708 WRITE(msgBuf,'(A)')
709 & 'EXF_READPARMS: reading EXF_NML_04'
710 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
711 & SQUEEZE_RIGHT , 1)
712 READ( iUnit, nml = EXF_NML_04 )
713 #ifdef ALLOW_OBCS
714 WRITE(msgBuf,'(A)')
715 & 'EXF_READPARMS: reading EXF_NML_OBCS'
716 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
717 & SQUEEZE_RIGHT , 1)
718 READ( iUnit, nml = EXF_NML_OBCS )
719 IF(siobNstartdate1.EQ.UNSET_I ) siobNstartdate1 = obcsNstartdate1
720 IF(siobNstartdate2.EQ.UNSET_I ) siobNstartdate2 = obcsNstartdate2
721 IF(siobNperiod .EQ.UNSET_RL) siobNperiod = obcsNperiod
722 IF(siobSstartdate1.EQ.UNSET_I ) siobSstartdate1 = obcsSstartdate1
723 IF(siobSstartdate2.EQ.UNSET_I ) siobSstartdate2 = obcsSstartdate2
724 IF(siobSperiod .EQ.UNSET_RL) siobSperiod = obcsSperiod
725 IF(siobEstartdate1.EQ.UNSET_I ) siobEstartdate1 = obcsEstartdate1
726 IF(siobEstartdate2.EQ.UNSET_I ) siobEstartdate2 = obcsEstartdate2
727 IF(siobEperiod .EQ.UNSET_RL) siobEperiod = obcsEperiod
728 IF(siobWstartdate1.EQ.UNSET_I ) siobWstartdate1 = obcsWstartdate1
729 IF(siobWstartdate2.EQ.UNSET_I ) siobWstartdate2 = obcsWstartdate2
730 IF(siobWperiod .EQ.UNSET_RL) siobWperiod = obcsWperiod
731 #endif
732
733 WRITE(msgBuf,'(A)')
734 & 'EXF_READPARMS: finished reading data.exf'
735 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
736 & SQUEEZE_RIGHT , 1)
737
738 CLOSE( iUnit )
739
740 C-- Derive other parameters:
741 hq = ht
742 #if ( ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) ) \
743 || defined (USE_EXF_INTERPOLATION) )
744 stressIsOnCgrid = .FALSE.
745 #else
746 stressIsOnCgrid = readStressOnCgrid
747 #endif
748
749 CALL EXF_CHECK( myThid )
750
751 c Complete the start date specifications for the forcing
752 c fields to get a complete calendar date array.
753 C => moved to EXF_INIT_FIXED
754
755 _END_MASTER( mythid )
756 _BARRIER
757
758 RETURN
759 END

  ViewVC Help
Powered by ViewVC 1.1.22