/[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.24 - (hide annotations) (download)
Tue Jan 4 04:18:36 2005 UTC (19 years, 5 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint57d_post, checkpoint57c_post, checkpoint57c_pre
Changes since 1.23: +22 -22 lines
pkg/exf: changed sw limit for exf_check_range and fixed
 initialization of unused variables for exf_readparms.F

1 dimitri 1.24 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.23 2004/11/27 09:19:25 dimitri 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 dimitri 1.24 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 heimbach 1.21 exf_inscal_runoff = 1. _d 0
333 heimbach 1.8 exf_inscal_swdown = 1. _d 0
334     exf_inscal_lwdown = 1. _d 0
335 dimitri 1.6
336     c Output scaling factors.
337 heimbach 1.8 exf_outscal_hflux = 1. _d 0
338     exf_outscal_sflux = 1. _d 0
339     exf_outscal_ustress = 1. _d 0
340     exf_outscal_vstress = 1. _d 0
341     exf_outscal_swflux = 1. _d 0
342 dimitri 1.6 exf_outscal_sst = 1. _d 0
343     exf_outscal_sss = 1. _d 0
344     exf_outscal_apressure= 1. _d 0
345 heimbach 1.3
346 dimitri 1.19 #ifdef USE_EXF_INTERPOLATION
347     ustress_lon0 = thetaMin
348     uwind_lon0 = thetaMin
349     vstress_lon0 = thetaMin + delX(1) / 2
350     hflux_lon0 = thetaMin + delX(1) / 2
351     sflux_lon0 = thetaMin + delX(1) / 2
352     swflux_lon0 = thetaMin + delX(1) / 2
353     runoff_lon0 = thetaMin + delX(1) / 2
354     atemp_lon0 = thetaMin + delX(1) / 2
355     aqh_lon0 = thetaMin + delX(1) / 2
356     evap_lon0 = thetaMin + delX(1) / 2
357     precip_lon0 = thetaMin + delX(1) / 2
358     vwind_lon0 = thetaMin + delX(1) / 2
359     lwflux_lon0 = thetaMin + delX(1) / 2
360     swdown_lon0 = thetaMin + delX(1) / 2
361     lwdown_lon0 = thetaMin + delX(1) / 2
362     apressure_lon0 = thetaMin + delX(1) / 2
363     vstress_lat0 = phimin
364     vwind_lat0 = phimin
365     ustress_lat0 = phimin + delY(1) / 2
366     hflux_lat0 = phimin + delY(1) / 2
367     sflux_lat0 = phimin + delY(1) / 2
368     runoff_lat0 = phimin + delY(1) / 2
369     swflux_lat0 = phimin + delY(1) / 2
370     atemp_lat0 = phimin + delY(1) / 2
371     aqh_lat0 = phimin + delY(1) / 2
372     evap_lat0 = phimin + delY(1) / 2
373     precip_lat0 = phimin + delY(1) / 2
374     uwind_lat0 = phimin + delY(1) / 2
375     lwflux_lat0 = phimin + delY(1) / 2
376     swdown_lat0 = phimin + delY(1) / 2
377     lwdown_lat0 = phimin + delY(1) / 2
378     apressure_lat0 = phimin + delY(1) / 2
379     ustress_nlon = Nx
380     ustress_nlat = Ny
381     vstress_nlon = Nx
382     vstress_nlat = Ny
383     hflux_nlon = Nx
384     hflux_nlat = Ny
385     sflux_nlon = Nx
386     sflux_nlat = Ny
387     swflux_nlon = Nx
388     swflux_nlat = Ny
389     runoff_nlon = Nx
390     runoff_nlat = Ny
391     atemp_nlon = Nx
392     atemp_nlat = Ny
393     aqh_nlon = Nx
394     aqh_nlat = Ny
395     evap_nlon = Nx
396     evap_nlat = Ny
397     precip_nlon = Nx
398     precip_nlat = Ny
399     uwind_nlon = Nx
400     uwind_nlat = Ny
401     vwind_nlon = Nx
402     vwind_nlat = Ny
403     lwflux_nlon = Nx
404     lwflux_nlat = Ny
405     swdown_nlon = Nx
406     swdown_nlat = Ny
407     lwdown_nlon = Nx
408     lwdown_nlat = Ny
409     apressure_nlon = Nx
410     apressure_nlat = Ny
411     Ustress_lon_inc = delX(1)
412     vstress_lon_inc = delX(1)
413     hflux_lon_inc = delX(1)
414     sflux_lon_inc = delX(1)
415     swflux_lon_inc = delX(1)
416     runoff_lon_inc = delX(1)
417     atemp_lon_inc = delX(1)
418     aqh_lon_inc = delX(1)
419     evap_lon_inc = delX(1)
420     precip_lon_inc = delX(1)
421     uwind_lon_inc = delX(1)
422     vwind_lon_inc = delX(1)
423     lwflux_lon_inc = delX(1)
424     swdown_lon_inc = delX(1)
425     lwdown_lon_inc = delX(1)
426     apressure_lon_inc = delX(1)
427     DO i=1,MAX_LAT_INC
428     IF (i.LT.Ny) THEN
429     vstress_lat_inc(i) = delY(i)
430     vwind_lat_inc(i) = delY(i)
431     ustress_lat_inc(i) = (delY(i) + delY(i)) / 2.
432     hflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
433     sflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
434     swflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
435     runoff_lat_inc(i) = (delY(i) + delY(i)) / 2.
436     atemp_lat_inc(i) = (delY(i) + delY(i)) / 2.
437     aqh_lat_inc(i) = (delY(i) + delY(i)) / 2.
438     evap_lat_inc(i) = (delY(i) + delY(i)) / 2.
439     precip_lat_inc(i) = (delY(i) + delY(i)) / 2.
440     uwind_lat_inc(i) = (delY(i) + delY(i)) / 2.
441     lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
442     swdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
443     lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
444     apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.
445     ELSE
446     ustress_lat_inc(i) = 0.
447     vstress_lat_inc(i) = 0.
448     hflux_lat_inc(i) = 0.
449     sflux_lat_inc(i) = 0.
450     swflux_lat_inc(i) = 0.
451     runoff_lat_inc(i) = 0.
452     atemp_lat_inc(i) = 0.
453     aqh_lat_inc(i) = 0.
454     evap_lat_inc(i) = 0.
455     precip_lat_inc(i) = 0.
456     uwind_lat_inc(i) = 0.
457     vwind_lat_inc(i) = 0.
458     lwflux_lat_inc(i) = 0.
459     swdown_lat_inc(i) = 0.
460     lwdown_lat_inc(i) = 0.
461     apressure_lat_inc(i) = 0.
462     ENDIF
463     ENDDO
464     #endif /* USE_EXF_INTERPOLATION */
465    
466 heimbach 1.1 c Check for the availability of the right calendar version.
467     if ( calendarversion .ne. usescalendarversion ) then
468     print*,' exf_readparms: You are not using the appropriate'
469     print*,' version of the calendar package.'
470     print*
471     print*,' You are using Calendar version: ', calendarversion
472     print*,' Please use Calendar version: ', usescalendarversion
473     stop ' stopped in exf_readparms.'
474     endif
475    
476     c Next, read the forcing data file.
477     call nml_filter( 'data.exf', scrunit1, myThid )
478     if (scrunit1 .eq. 0) then
479     stop 'exf_readparms: reading namelist failed'
480     end if
481     read( scrunit1, nml = exf_nml )
482     close( scrunit1 )
483    
484 heimbach 1.20 call exf_check( mythid )
485    
486 heimbach 1.1 c Complete the start date specifications for the forcing
487     c fields to get a complete calendar date array.
488    
489 dimitri 1.6 #ifdef ALLOW_ATM_WIND
490 heimbach 1.18 if ( uwindfile .NE. ' ' ) then
491     call cal_FullDate ( uwindstartdate1 , uwindstartdate2,
492     & date_array ,mythid )
493     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
494     call cal_ToSeconds ( difftime, uwindstartdate ,mythid )
495     uwindstartdate = modelstart + uwindstartdate
496     endif
497     if ( vwindfile .NE. ' ' ) then
498     call cal_FullDate ( vwindstartdate1 , vwindstartdate2,
499     & date_array ,mythid )
500     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
501     call cal_ToSeconds ( difftime, vwindstartdate ,mythid )
502     vwindstartdate = modelstart + vwindstartdate
503     endif
504 dimitri 1.6 #else
505 heimbach 1.18 if ( ustressfile .NE. ' ' ) then
506     call cal_FullDate ( ustressstartdate1 , ustressstartdate2,
507     & date_array ,mythid )
508     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
509     call cal_ToSeconds ( difftime, ustressstartdate ,mythid )
510     ustressstartdate = modelstart + ustressstartdate
511     endif
512     if ( vstressfile .NE. ' ' ) then
513     call cal_FullDate ( vstressstartdate1 , vstressstartdate2,
514     & date_array ,mythid )
515     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
516     call cal_ToSeconds ( difftime, vstressstartdate ,mythid )
517     vstressstartdate = modelstart + vstressstartdate
518     endif
519 heimbach 1.3 #endif
520    
521 heimbach 1.1 #ifdef ALLOW_ATM_TEMP
522 heimbach 1.18 if ( atempfile .NE. ' ' ) then
523     call cal_FullDate ( atempstartdate1 , atempstartdate2,
524     & date_array ,mythid )
525     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
526     call cal_ToSeconds ( difftime, atempstartdate ,mythid )
527     atempstartdate = modelstart + atempstartdate
528     endif
529     if ( aqhfile .NE. ' ' ) then
530     call cal_FullDate ( aqhstartdate1 , aqhstartdate2,
531     & date_array ,mythid )
532     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
533     call cal_ToSeconds ( difftime, aqhstartdate ,mythid )
534     aqhstartdate = modelstart + aqhstartdate
535     endif
536     if ( lwfluxfile .NE. ' ' ) then
537     call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2,
538     & date_array ,mythid )
539     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
540     call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid )
541     lwfluxstartdate = modelstart + lwfluxstartdate
542     endif
543     if ( precipfile .NE. ' ' ) then
544     call cal_FullDate ( precipstartdate1 , precipstartdate2,
545     & date_array ,mythid )
546     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
547     call cal_ToSeconds ( difftime, precipstartdate ,mythid )
548     precipstartdate = modelstart + precipstartdate
549     endif
550 heimbach 1.1 #else
551 heimbach 1.18 if ( hfluxfile .NE. ' ' ) then
552     call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2,
553     & date_array ,mythid )
554     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
555     call cal_ToSeconds ( difftime, hfluxstartdate ,mythid )
556     hfluxstartdate = modelstart + hfluxstartdate
557     endif
558     if ( sfluxfile .NE. ' ' ) then
559     call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2,
560     & date_array ,mythid )
561     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
562     call cal_ToSeconds ( difftime, sfluxstartdate ,mythid )
563     sfluxstartdate = modelstart + sfluxstartdate
564     endif
565 heimbach 1.1 #endif
566    
567 dimitri 1.6 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
568 heimbach 1.18 if ( swfluxfile .NE. ' ' ) then
569     call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2,
570     & date_array ,mythid )
571     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
572     call cal_ToSeconds ( difftime, swfluxstartdate ,mythid )
573     swfluxstartdate = modelstart + swfluxstartdate
574     endif
575 heimbach 1.1 #endif
576    
577 dimitri 1.6 #ifdef EXF_READ_EVAP
578 heimbach 1.18 if ( evapfile .NE. ' ' ) then
579     call cal_FullDate ( evapstartdate1 , evapstartdate2,
580     & date_array ,mythid )
581     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
582     call cal_ToSeconds ( difftime, evapstartdate ,mythid )
583     evapstartdate = modelstart + evapstartdate
584     endif
585 heimbach 1.1 #endif
586    
587 dimitri 1.6 #ifdef ALLOW_RUNOFF
588 dimitri 1.24 if ( runofffile .NE. ' ' .AND. runoffperiod .NE. 0. ) then
589 heimbach 1.18 call cal_FullDate ( runoffstartdate1 , runoffstartdate2,
590     & date_array ,mythid )
591     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
592     call cal_ToSeconds ( difftime, runoffstartdate ,mythid )
593     runoffstartdate = modelstart + runoffstartdate
594     endif
595 heimbach 1.1 #endif
596    
597 dimitri 1.6 #ifdef ALLOW_DOWNWARD_RADIATION
598 heimbach 1.18 if ( swdownfile .NE. ' ' ) then
599     call cal_FullDate ( swdownstartdate1 , swdownstartdate2,
600     & date_array ,mythid )
601     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
602     call cal_ToSeconds ( difftime, swdownstartdate ,mythid )
603     swdownstartdate = modelstart + swdownstartdate
604     endif
605     if ( lwdownfile .NE. ' ' ) then
606     call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2,
607     & date_array ,mythid )
608     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
609     call cal_ToSeconds ( difftime, lwdownstartdate ,mythid )
610     lwdownstartdate = modelstart + lwdownstartdate
611     endif
612     #endif
613    
614     #ifdef ATMOSPHERIC_LOADING
615     if ( apressurefile .NE. ' ' ) then
616     call cal_FullDate ( apressurestartdate1, apressurestartdate2,
617     & date_array ,mythid )
618     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
619     call cal_ToSeconds ( difftime, apressurestartdate ,mythid )
620     apressurestartdate = modelstart + apressurestartdate
621     endif
622 heimbach 1.1 #endif
623    
624     #ifdef ALLOW_OBCS
625 heimbach 1.2 #ifdef ALLOW_OBCS_NORTH
626 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
627     call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2,
628     & date_array ,mythid )
629     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
630     call cal_ToSeconds ( difftime, obcsNstartdate ,mythid )
631     obcsNstartdate = modelstart + obcsNstartdate
632     endif
633 heimbach 1.2 #endif
634     #ifdef ALLOW_OBCS_SOUTH
635 heimbach 1.18 if ( obcsSperiod .NE. 0 ) then
636     call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2,
637     & date_array ,mythid )
638     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
639     call cal_ToSeconds ( difftime, obcsSstartdate ,mythid )
640     obcsSstartdate = modelstart + obcsSstartdate
641     endif
642 heimbach 1.2 #endif
643     #ifdef ALLOW_OBCS_EAST
644 heimbach 1.18 if ( obcsEperiod .NE. 0 ) then
645     call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2,
646     & date_array ,mythid )
647     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
648     call cal_ToSeconds ( difftime, obcsEstartdate ,mythid )
649     obcsEstartdate = modelstart + obcsEstartdate
650     endif
651 heimbach 1.2 #endif
652     #ifdef ALLOW_OBCS_WEST
653 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
654     call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2,
655     & date_array ,mythid )
656     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
657     call cal_ToSeconds ( difftime, obcsWstartdate ,mythid )
658     obcsWstartdate = modelstart + obcsWstartdate
659     endif
660 heimbach 1.3 #endif
661 dimitri 1.6 #endif /* ALLOW_OBCS */
662 heimbach 1.3
663 heimbach 1.1 _END_MASTER( mythid )
664    
665     _BARRIER
666    
667     c-- Summarize the External forcing's setup.
668     call exf_summary( mythid )
669    
670     c-- set climatology parameters
671     call exf_clim_readparms( mythid )
672    
673     c-- summarize climatologic forcing configuration
674     call exf_clim_summary( mythid )
675    
676     end

  ViewVC Help
Powered by ViewVC 1.1.22