/[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.68 - (show annotations) (download)
Mon Dec 12 19:02:45 2011 UTC (12 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63g
Changes since 1.67: +71 -50 lines
move delX,delY to new header file (SET_GRID.h) and adjust length to 1rst
face dimensions.

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

  ViewVC Help
Powered by ViewVC 1.1.22