/[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.54 - (show annotations) (download)
Tue Jun 2 14:59:55 2009 UTC (15 years ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint61q, checkpoint61r, checkpoint61p
Changes since 1.53: +5 -1 lines
  - add a separate exf_iprec_obcs to exf_set_obcs (by default equal to
    exf_iprec) as part of namelist EXF_NML_01

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

  ViewVC Help
Powered by ViewVC 1.1.22