/[MITgcm]/MITgcm/pkg/exf/exf_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/exf/exf_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.22 - (hide annotations) (download)
Mon Nov 22 20:47:34 2004 UTC (19 years, 6 months ago) by heimbach
Branch: MAIN
Changes since 1.21: +2 -2 lines
exf_check_range:
* default changed to .TRUE.
* will check values for niter0 if debLevA, every timestep if debLevB
* STOP in exf_check_range if 'out of range'
* range chosen generous to allow for potential extema
TBD: a version with stricter range
     permitted range would be runtime parameters

1 heimbach 1.22 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.21 2004/11/11 02:23:18 heimbach Exp $
2 jmc 1.11 C $Name: $
3 heimbach 1.1
4 edhill 1.12 #include "EXF_OPTIONS.h"
5 heimbach 1.3 #ifdef ALLOW_OBCS
6     # include "OBCS_OPTIONS.h"
7     #endif
8 heimbach 1.1
9 heimbach 1.3 subroutine exf_readparms( mythid )
10 heimbach 1.1
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 edhill 1.12 c precompiler switches have to be specified in "EXF_OPTIONS.h".
19 heimbach 1.1 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 heimbach 1.2 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
28 heimbach 1.1 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 heimbach 1.2 c - moved relaxation and climatology to extra routines
32 heimbach 1.1 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
33     c - added obcs parameters
34 heimbach 1.2 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
35     c - added new obcs parameters (for each boundaries)
36 heimbach 1.3 c included runoff D. Stammer, Nov. 25, 2001
37     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
38 dimitri 1.5 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
39 dimitri 1.6 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40 heimbach 1.1 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 heimbach 1.15 #include "PARAMS.h"
52 heimbach 1.1 #include "cal.h"
53     #include "exf.h"
54     #include "exf_param.h"
55     #include "exf_constants.h"
56    
57     c == routine arguments ==
58    
59     integer mythid
60    
61     c == local variables ==
62    
63     integer i
64 dimitri 1.13 integer date_array(4), difftime(4)
65 heimbach 1.1
66     c == end of interface ==
67    
68     c Surface flux data.
69     namelist /exf_nml/
70 mlosch 1.17 & windstressmax, repeatPeriod, exf_albedo,
71 heimbach 1.1 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
72     & atempstartdate1, atempstartdate2, atempperiod,
73     & aqhstartdate1, aqhstartdate2, aqhperiod,
74     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
75 dimitri 1.5 & evapstartdate1, evapstartdate2, evapperiod,
76 heimbach 1.1 & precipstartdate1, precipstartdate2, precipperiod,
77 heimbach 1.3 & runoffstartdate1, runoffstartdate2, runoffperiod,
78 heimbach 1.1 & ustressstartdate1, ustressstartdate2, ustressperiod,
79     & vstressstartdate1, vstressstartdate2, vstressperiod,
80     & uwindstartdate1, uwindstartdate2, uwindperiod,
81     & vwindstartdate1, vwindstartdate2, vwindperiod,
82     & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
83     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
84 dimitri 1.6 & swdownstartdate1, swdownstartdate2, swdownperiod,
85     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
86 heimbach 1.2 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
87     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
88     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
89     & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
90 heimbach 1.3 &apressurestartdate1,apressurestartdate2,apressureperiod,
91 heimbach 1.1 & hfluxfile, atempfile, aqhfile,
92 heimbach 1.3 & sfluxfile, precipfile, runofffile,
93 dimitri 1.5 & ustressfile, vstressfile, evapfile,
94 heimbach 1.3 & uwindfile, vwindfile,
95     & swfluxfile, lwfluxfile, apressurefile,
96 dimitri 1.6 & swdownfile, lwdownfile,
97 heimbach 1.20 & exf_iprec, exf_yftype,
98     & useExfYearlyFields, useExfCheckRange,
99 dimitri 1.14 & exf_inscal_hflux, exf_inscal_sflux,
100     & exf_inscal_ustress, exf_inscal_vstress,
101     & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_evap,
102     & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
103     & exf_inscal_sst, exf_inscal_sss,
104     & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
105     & exf_inscal_runoff, exf_inscal_apressure,
106 heimbach 1.8 & exf_inscal_swdown, exf_inscal_lwdown,
107     & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
108 dimitri 1.14 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
109 heimbach 1.8 & exf_outscal_sflux, exf_outscal_apressure,
110 heimbach 1.7 & hfluxconst,
111     & atempconst,
112     & aqhconst,
113     & sfluxconst,
114     & evapconst,
115     & precipconst,
116     & runoffconst,
117     & ustressconst,
118     & vstressconst,
119     & uwindconst,
120     & vwindconst,
121     & swfluxconst,
122     & lwfluxconst,
123     & swdownconst,
124     & lwdownconst,
125 dimitri 1.10 & apressureconst
126 dimitri 1.9 #ifdef USE_EXF_INTERPOLATION
127 jmc 1.11 & ,ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
128 dimitri 1.9 & ustress_nlon, ustress_nlat,
129 jmc 1.11 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
130 dimitri 1.9 & vstress_nlon, vstress_nlat,
131 jmc 1.11 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
132 dimitri 1.9 & hflux_nlon, hflux_nlat,
133 jmc 1.11 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
134 dimitri 1.9 & sflux_nlon, sflux_nlat,
135 jmc 1.11 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
136 dimitri 1.9 & swflux_nlon, swflux_nlat,
137 jmc 1.11 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
138 dimitri 1.9 & runoff_nlon, runoff_nlat,
139 jmc 1.11 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
140 dimitri 1.9 & atemp_nlon, atemp_nlat,
141 jmc 1.11 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc,
142 dimitri 1.9 & aqh_nlon, aqh_nlat,
143 jmc 1.11 & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,
144 dimitri 1.9 & evap_nlon, evap_nlat,
145 jmc 1.11 & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
146 dimitri 1.9 & precip_nlon, precip_nlat,
147 jmc 1.11 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
148 dimitri 1.9 & uwind_nlon, uwind_nlat,
149 jmc 1.11 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
150 dimitri 1.9 & vwind_nlon, vwind_nlat,
151 jmc 1.11 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
152 dimitri 1.9 & lwflux_nlon, lwflux_nlat,
153 jmc 1.11 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
154 dimitri 1.9 & swdown_nlon, swdown_nlat,
155 jmc 1.11 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
156 dimitri 1.9 & lwdown_nlon, lwdown_nlat,
157 jmc 1.11 & apressure_lon0,apressure_lon_inc,
158 dimitri 1.9 & apressure_lat0,apressure_lat_inc,
159     & apressure_nlon,apressure_nlat
160     #endif
161 heimbach 1.1
162     _BEGIN_MASTER(mythid)
163    
164     c Set default values.
165    
166 heimbach 1.21 year2sec = 365.*86400.
167    
168 heimbach 1.1 c Calendar data.
169     hfluxstartdate1 = 0
170     hfluxstartdate2 = 0
171     hfluxperiod = 0.0 _d 0
172 heimbach 1.7 hfluxconst = 0.0 _d 0
173 heimbach 1.1
174     atempstartdate1 = 0
175     atempstartdate2 = 0
176     atempperiod = 0.0 _d 0
177 heimbach 1.15 atempconst = celsius2K
178 heimbach 1.1
179     aqhstartdate1 = 0
180     aqhstartdate2 = 0
181     aqhperiod = 0.0 _d 0
182 heimbach 1.7 aqhconst = 0.0 _d 0
183 heimbach 1.1
184     sfluxstartdate1 = 0
185     sfluxstartdate2 = 0
186     sfluxperiod = 0.0 _d 0
187 heimbach 1.7 sfluxconst = 0.0 _d 0
188 heimbach 1.1
189 dimitri 1.5 evapstartdate1 = 0
190     evapstartdate2 = 0
191     evapperiod = 0.0 _d 0
192 heimbach 1.7 evapconst = 0.0 _d 0
193 dimitri 1.5
194 heimbach 1.1 precipstartdate1 = 0
195     precipstartdate2 = 0
196     precipperiod = 0.0 _d 0
197 heimbach 1.7 precipconst = 0.0 _d 0
198 heimbach 1.1
199 heimbach 1.3 runoffstartdate1 = 0
200     runoffstartdate2 = 0
201     runoffperiod = 0.0 _d 0
202 heimbach 1.7 runoffconst = 0.0 _d 0
203 heimbach 1.3
204 heimbach 1.1 ustressstartdate1 = 0
205     ustressstartdate2 = 0
206     ustressperiod = 0.0 _d 0
207 heimbach 1.7 ustressconst = 0.0 _d 0
208 heimbach 1.1
209     vstressstartdate1 = 0
210     vstressstartdate2 = 0
211     vstressperiod = 0.0 _d 0
212 heimbach 1.7 vstressconst = 0.0 _d 0
213 heimbach 1.1
214     uwindstartdate1 = 0
215     uwindstartdate2 = 0
216     uwindperiod = 0.0 _d 0
217 heimbach 1.7 uwindconst = 0.0 _d 0
218 heimbach 1.1
219     vwindstartdate1 = 0
220     vwindstartdate2 = 0
221     vwindperiod = 0.0 _d 0
222 heimbach 1.7 vwindconst = 0.0 _d 0
223 heimbach 1.1
224     swfluxstartdate1 = 0
225     swfluxstartdate2 = 0
226     swfluxperiod = 0.0 _d 0
227 heimbach 1.7 swfluxconst = 0.0 _d 0
228 heimbach 1.1
229     lwfluxstartdate1 = 0
230     lwfluxstartdate2 = 0
231     lwfluxperiod = 0.0 _d 0
232 heimbach 1.7 lwfluxconst = 0.0 _d 0
233 heimbach 1.1
234 dimitri 1.6 swdownstartdate1 = 0
235     swdownstartdate2 = 0
236     swdownperiod = 0.0 _d 0
237 heimbach 1.7 swdownconst = 0.0 _d 0
238 dimitri 1.6
239     lwdownstartdate1 = 0
240     lwdownstartdate2 = 0
241     lwdownperiod = 0.0 _d 0
242 heimbach 1.7 lwdownconst = 0.0 _d 0
243 dimitri 1.6
244 heimbach 1.2 obcsNstartdate1 = 0
245     obcsNstartdate2 = 0
246     obcsNperiod = 0.0 _d 0
247    
248     obcsSstartdate1 = 0
249     obcsSstartdate2 = 0
250     obcsSperiod = 0.0 _d 0
251    
252     obcsEstartdate1 = 0
253     obcsEstartdate2 = 0
254     obcsEperiod = 0.0 _d 0
255    
256     obcsWstartdate1 = 0
257     obcsWstartdate2 = 0
258     obcsWperiod = 0.0 _d 0
259 heimbach 1.1
260 heimbach 1.3 apressurestartdate1 = 0
261     apressurestartdate2 = 0
262     apressureperiod = 0.0 _d 0
263 heimbach 1.7 apressureconst = 0.0 _d 0
264 cheisey 1.4
265     repeatPeriod = 0.0 _d 0
266 dimitri 1.16 exf_albedo = 0.1 _d 0
267 mlosch 1.17 windstressmax = 2.0 _d 0
268 cheisey 1.4
269 heimbach 1.1 c Data files.
270     hfluxfile = ' '
271     atempfile = ' '
272     aqhfile = ' '
273 dimitri 1.5 evapfile = ' '
274 heimbach 1.1 precipfile = ' '
275     sfluxfile = ' '
276 heimbach 1.3 runofffile = ' '
277 heimbach 1.1 ustressfile = ' '
278     vstressfile = ' '
279     uwindfile = ' '
280     vwindfile = ' '
281     swfluxfile = ' '
282     lwfluxfile = ' '
283 dimitri 1.6 swdownfile = ' '
284     lwdownfile = ' '
285 heimbach 1.3 apressurefile = ' '
286 heimbach 1.1
287 dimitri 1.13 c Start dates.
288     hfluxstartdate = 0
289     atempstartdate = 0
290     aqhstartdate = 0
291     evapstartdate = 0
292     precipstartdate = 0
293     sfluxstartdate = 0
294     runoffstartdate = 0
295     ustressstartdate = 0
296     vstressstartdate = 0
297     uwindstartdate = 0
298     vwindstartdate = 0
299     swfluxstartdate = 0
300     lwfluxstartdate = 0
301     swdownstartdate = 0
302     lwdownstartdate = 0
303     obcsNstartdate = 0
304     obcsSstartdate = 0
305     obcsEstartdate = 0
306     obcsWstartdate = 0
307     apressurestartdate = 0
308 heimbach 1.1
309     c Initialise file type and field precision
310 heimbach 1.20 exf_iprec = 32
311     exf_yftype = 'RL'
312     useExfYearlyFields = .FALSE.
313 heimbach 1.22 useExfCheckRange = .TRUE.
314 heimbach 1.1
315 dimitri 1.6 c Input scaling factors.
316 heimbach 1.8 exf_inscal_hflux = 1. _d 0
317     exf_inscal_sflux = 1. _d 0
318     exf_inscal_ustress = 1. _d 0
319     exf_inscal_vstress = 1. _d 0
320     exf_inscal_uwind = 1. _d 0
321     exf_inscal_vwind = 1. _d 0
322     exf_inscal_swflux = 1. _d 0
323     exf_inscal_lwflux = 1. _d 0
324     exf_inscal_precip = 1. _d 0
325 dimitri 1.6 exf_inscal_sst = 1. _d 0
326     exf_inscal_sss = 1. _d 0
327 heimbach 1.8 exf_inscal_atemp = 1. _d 0
328 dimitri 1.14 exf_offset_atemp = 0. _d 0
329 heimbach 1.8 exf_inscal_aqh = 1. _d 0
330     exf_inscal_evap = 1. _d 0
331 dimitri 1.6 exf_inscal_apressure = 1. _d 0
332     cds convert runoff from m/yr to m/s and change sign.
333 heimbach 1.21 cph do this later, in exf_init_runoff
334     exf_inscal_runoff = 1. _d 0
335 heimbach 1.8 exf_inscal_swdown = 1. _d 0
336     exf_inscal_lwdown = 1. _d 0
337 dimitri 1.6
338     c Output scaling factors.
339 heimbach 1.8 exf_outscal_hflux = 1. _d 0
340     exf_outscal_sflux = 1. _d 0
341     exf_outscal_ustress = 1. _d 0
342     exf_outscal_vstress = 1. _d 0
343     exf_outscal_swflux = 1. _d 0
344 dimitri 1.6 exf_outscal_sst = 1. _d 0
345     exf_outscal_sss = 1. _d 0
346     exf_outscal_apressure= 1. _d 0
347 heimbach 1.3
348 dimitri 1.19 #ifdef USE_EXF_INTERPOLATION
349     ustress_lon0 = thetaMin
350     uwind_lon0 = thetaMin
351     vstress_lon0 = thetaMin + delX(1) / 2
352     hflux_lon0 = thetaMin + delX(1) / 2
353     sflux_lon0 = thetaMin + delX(1) / 2
354     swflux_lon0 = thetaMin + delX(1) / 2
355     runoff_lon0 = thetaMin + delX(1) / 2
356     atemp_lon0 = thetaMin + delX(1) / 2
357     aqh_lon0 = thetaMin + delX(1) / 2
358     evap_lon0 = thetaMin + delX(1) / 2
359     precip_lon0 = thetaMin + delX(1) / 2
360     vwind_lon0 = thetaMin + delX(1) / 2
361     lwflux_lon0 = thetaMin + delX(1) / 2
362     swdown_lon0 = thetaMin + delX(1) / 2
363     lwdown_lon0 = thetaMin + delX(1) / 2
364     apressure_lon0 = thetaMin + delX(1) / 2
365     vstress_lat0 = phimin
366     vwind_lat0 = phimin
367     ustress_lat0 = phimin + delY(1) / 2
368     hflux_lat0 = phimin + delY(1) / 2
369     sflux_lat0 = phimin + delY(1) / 2
370     runoff_lat0 = phimin + delY(1) / 2
371     swflux_lat0 = phimin + delY(1) / 2
372     atemp_lat0 = phimin + delY(1) / 2
373     aqh_lat0 = phimin + delY(1) / 2
374     evap_lat0 = phimin + delY(1) / 2
375     precip_lat0 = phimin + delY(1) / 2
376     uwind_lat0 = phimin + delY(1) / 2
377     lwflux_lat0 = phimin + delY(1) / 2
378     swdown_lat0 = phimin + delY(1) / 2
379     lwdown_lat0 = phimin + delY(1) / 2
380     apressure_lat0 = phimin + delY(1) / 2
381     ustress_nlon = Nx
382     ustress_nlat = Ny
383     vstress_nlon = Nx
384     vstress_nlat = Ny
385     hflux_nlon = Nx
386     hflux_nlat = Ny
387     sflux_nlon = Nx
388     sflux_nlat = Ny
389     swflux_nlon = Nx
390     swflux_nlat = Ny
391     runoff_nlon = Nx
392     runoff_nlat = Ny
393     atemp_nlon = Nx
394     atemp_nlat = Ny
395     aqh_nlon = Nx
396     aqh_nlat = Ny
397     evap_nlon = Nx
398     evap_nlat = Ny
399     precip_nlon = Nx
400     precip_nlat = Ny
401     uwind_nlon = Nx
402     uwind_nlat = Ny
403     vwind_nlon = Nx
404     vwind_nlat = Ny
405     lwflux_nlon = Nx
406     lwflux_nlat = Ny
407     swdown_nlon = Nx
408     swdown_nlat = Ny
409     lwdown_nlon = Nx
410     lwdown_nlat = Ny
411     apressure_nlon = Nx
412     apressure_nlat = Ny
413     Ustress_lon_inc = delX(1)
414     vstress_lon_inc = delX(1)
415     hflux_lon_inc = delX(1)
416     sflux_lon_inc = delX(1)
417     swflux_lon_inc = delX(1)
418     runoff_lon_inc = delX(1)
419     atemp_lon_inc = delX(1)
420     aqh_lon_inc = delX(1)
421     evap_lon_inc = delX(1)
422     precip_lon_inc = delX(1)
423     uwind_lon_inc = delX(1)
424     vwind_lon_inc = delX(1)
425     lwflux_lon_inc = delX(1)
426     swdown_lon_inc = delX(1)
427     lwdown_lon_inc = delX(1)
428     apressure_lon_inc = delX(1)
429     DO i=1,MAX_LAT_INC
430     IF (i.LT.Ny) THEN
431     vstress_lat_inc(i) = delY(i)
432     vwind_lat_inc(i) = delY(i)
433     ustress_lat_inc(i) = (delY(i) + delY(i)) / 2.
434     hflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
435     sflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
436     swflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
437     runoff_lat_inc(i) = (delY(i) + delY(i)) / 2.
438     atemp_lat_inc(i) = (delY(i) + delY(i)) / 2.
439     aqh_lat_inc(i) = (delY(i) + delY(i)) / 2.
440     evap_lat_inc(i) = (delY(i) + delY(i)) / 2.
441     precip_lat_inc(i) = (delY(i) + delY(i)) / 2.
442     uwind_lat_inc(i) = (delY(i) + delY(i)) / 2.
443     lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
444     swdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
445     lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
446     apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.
447     ELSE
448     ustress_lat_inc(i) = 0.
449     vstress_lat_inc(i) = 0.
450     hflux_lat_inc(i) = 0.
451     sflux_lat_inc(i) = 0.
452     swflux_lat_inc(i) = 0.
453     runoff_lat_inc(i) = 0.
454     atemp_lat_inc(i) = 0.
455     aqh_lat_inc(i) = 0.
456     evap_lat_inc(i) = 0.
457     precip_lat_inc(i) = 0.
458     uwind_lat_inc(i) = 0.
459     vwind_lat_inc(i) = 0.
460     lwflux_lat_inc(i) = 0.
461     swdown_lat_inc(i) = 0.
462     lwdown_lat_inc(i) = 0.
463     apressure_lat_inc(i) = 0.
464     ENDIF
465     ENDDO
466     #endif /* USE_EXF_INTERPOLATION */
467    
468 heimbach 1.1 c Check for the availability of the right calendar version.
469     if ( calendarversion .ne. usescalendarversion ) then
470     print*,' exf_readparms: You are not using the appropriate'
471     print*,' version of the calendar package.'
472     print*
473     print*,' You are using Calendar version: ', calendarversion
474     print*,' Please use Calendar version: ', usescalendarversion
475     stop ' stopped in exf_readparms.'
476     endif
477    
478     c Next, read the forcing data file.
479     call nml_filter( 'data.exf', scrunit1, myThid )
480     if (scrunit1 .eq. 0) then
481     stop 'exf_readparms: reading namelist failed'
482     end if
483     read( scrunit1, nml = exf_nml )
484     close( scrunit1 )
485    
486 heimbach 1.20 call exf_check( mythid )
487    
488 heimbach 1.1 c Complete the start date specifications for the forcing
489     c fields to get a complete calendar date array.
490    
491 dimitri 1.6 #ifdef ALLOW_ATM_WIND
492 heimbach 1.18 if ( uwindfile .NE. ' ' ) then
493     call cal_FullDate ( uwindstartdate1 , uwindstartdate2,
494     & date_array ,mythid )
495     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
496     call cal_ToSeconds ( difftime, uwindstartdate ,mythid )
497     uwindstartdate = modelstart + uwindstartdate
498     endif
499     if ( vwindfile .NE. ' ' ) then
500     call cal_FullDate ( vwindstartdate1 , vwindstartdate2,
501     & date_array ,mythid )
502     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
503     call cal_ToSeconds ( difftime, vwindstartdate ,mythid )
504     vwindstartdate = modelstart + vwindstartdate
505     endif
506 dimitri 1.6 #else
507 heimbach 1.18 if ( ustressfile .NE. ' ' ) then
508     call cal_FullDate ( ustressstartdate1 , ustressstartdate2,
509     & date_array ,mythid )
510     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
511     call cal_ToSeconds ( difftime, ustressstartdate ,mythid )
512     ustressstartdate = modelstart + ustressstartdate
513     endif
514     if ( vstressfile .NE. ' ' ) then
515     call cal_FullDate ( vstressstartdate1 , vstressstartdate2,
516     & date_array ,mythid )
517     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
518     call cal_ToSeconds ( difftime, vstressstartdate ,mythid )
519     vstressstartdate = modelstart + vstressstartdate
520     endif
521 heimbach 1.3 #endif
522    
523 heimbach 1.1 #ifdef ALLOW_ATM_TEMP
524 heimbach 1.18 if ( atempfile .NE. ' ' ) then
525     call cal_FullDate ( atempstartdate1 , atempstartdate2,
526     & date_array ,mythid )
527     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
528     call cal_ToSeconds ( difftime, atempstartdate ,mythid )
529     atempstartdate = modelstart + atempstartdate
530     endif
531     if ( aqhfile .NE. ' ' ) then
532     call cal_FullDate ( aqhstartdate1 , aqhstartdate2,
533     & date_array ,mythid )
534     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
535     call cal_ToSeconds ( difftime, aqhstartdate ,mythid )
536     aqhstartdate = modelstart + aqhstartdate
537     endif
538     if ( lwfluxfile .NE. ' ' ) then
539     call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2,
540     & date_array ,mythid )
541     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
542     call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid )
543     lwfluxstartdate = modelstart + lwfluxstartdate
544     endif
545     if ( precipfile .NE. ' ' ) then
546     call cal_FullDate ( precipstartdate1 , precipstartdate2,
547     & date_array ,mythid )
548     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
549     call cal_ToSeconds ( difftime, precipstartdate ,mythid )
550     precipstartdate = modelstart + precipstartdate
551     endif
552 heimbach 1.1 #else
553 heimbach 1.18 if ( hfluxfile .NE. ' ' ) then
554     call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2,
555     & date_array ,mythid )
556     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
557     call cal_ToSeconds ( difftime, hfluxstartdate ,mythid )
558     hfluxstartdate = modelstart + hfluxstartdate
559     endif
560     if ( sfluxfile .NE. ' ' ) then
561     call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2,
562     & date_array ,mythid )
563     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
564     call cal_ToSeconds ( difftime, sfluxstartdate ,mythid )
565     sfluxstartdate = modelstart + sfluxstartdate
566     endif
567 heimbach 1.1 #endif
568    
569 dimitri 1.6 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
570 heimbach 1.18 if ( swfluxfile .NE. ' ' ) then
571     call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2,
572     & date_array ,mythid )
573     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
574     call cal_ToSeconds ( difftime, swfluxstartdate ,mythid )
575     swfluxstartdate = modelstart + swfluxstartdate
576     endif
577 heimbach 1.1 #endif
578    
579 dimitri 1.6 #ifdef EXF_READ_EVAP
580 heimbach 1.18 if ( evapfile .NE. ' ' ) then
581     call cal_FullDate ( evapstartdate1 , evapstartdate2,
582     & date_array ,mythid )
583     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
584     call cal_ToSeconds ( difftime, evapstartdate ,mythid )
585     evapstartdate = modelstart + evapstartdate
586     endif
587 heimbach 1.1 #endif
588    
589 dimitri 1.6 #ifdef ALLOW_RUNOFF
590 heimbach 1.18 if ( runofffile .NE. ' ' ) then
591     call cal_FullDate ( runoffstartdate1 , runoffstartdate2,
592     & date_array ,mythid )
593     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
594     call cal_ToSeconds ( difftime, runoffstartdate ,mythid )
595     runoffstartdate = modelstart + runoffstartdate
596     endif
597 heimbach 1.1 #endif
598    
599 dimitri 1.6 #ifdef ALLOW_DOWNWARD_RADIATION
600 heimbach 1.18 if ( swdownfile .NE. ' ' ) then
601     call cal_FullDate ( swdownstartdate1 , swdownstartdate2,
602     & date_array ,mythid )
603     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
604     call cal_ToSeconds ( difftime, swdownstartdate ,mythid )
605     swdownstartdate = modelstart + swdownstartdate
606     endif
607     if ( lwdownfile .NE. ' ' ) then
608     call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2,
609     & date_array ,mythid )
610     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
611     call cal_ToSeconds ( difftime, lwdownstartdate ,mythid )
612     lwdownstartdate = modelstart + lwdownstartdate
613     endif
614     #endif
615    
616     #ifdef ATMOSPHERIC_LOADING
617     if ( apressurefile .NE. ' ' ) then
618     call cal_FullDate ( apressurestartdate1, apressurestartdate2,
619     & date_array ,mythid )
620     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
621     call cal_ToSeconds ( difftime, apressurestartdate ,mythid )
622     apressurestartdate = modelstart + apressurestartdate
623     endif
624 heimbach 1.1 #endif
625    
626     #ifdef ALLOW_OBCS
627 heimbach 1.2 #ifdef ALLOW_OBCS_NORTH
628 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
629     call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2,
630     & date_array ,mythid )
631     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
632     call cal_ToSeconds ( difftime, obcsNstartdate ,mythid )
633     obcsNstartdate = modelstart + obcsNstartdate
634     endif
635 heimbach 1.2 #endif
636     #ifdef ALLOW_OBCS_SOUTH
637 heimbach 1.18 if ( obcsSperiod .NE. 0 ) then
638     call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2,
639     & date_array ,mythid )
640     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
641     call cal_ToSeconds ( difftime, obcsSstartdate ,mythid )
642     obcsSstartdate = modelstart + obcsSstartdate
643     endif
644 heimbach 1.2 #endif
645     #ifdef ALLOW_OBCS_EAST
646 heimbach 1.18 if ( obcsEperiod .NE. 0 ) then
647     call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2,
648     & date_array ,mythid )
649     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
650     call cal_ToSeconds ( difftime, obcsEstartdate ,mythid )
651     obcsEstartdate = modelstart + obcsEstartdate
652     endif
653 heimbach 1.2 #endif
654     #ifdef ALLOW_OBCS_WEST
655 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
656     call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2,
657     & date_array ,mythid )
658     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
659     call cal_ToSeconds ( difftime, obcsWstartdate ,mythid )
660     obcsWstartdate = modelstart + obcsWstartdate
661     endif
662 heimbach 1.3 #endif
663 dimitri 1.6 #endif /* ALLOW_OBCS */
664 heimbach 1.3
665 heimbach 1.1 _END_MASTER( mythid )
666    
667     _BARRIER
668    
669     c-- Summarize the External forcing's setup.
670     call exf_summary( mythid )
671    
672     c-- set climatology parameters
673     call exf_clim_readparms( mythid )
674    
675     c-- summarize climatologic forcing configuration
676     call exf_clim_summary( mythid )
677    
678     end

  ViewVC Help
Powered by ViewVC 1.1.22