/[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.26 - (show annotations) (download)
Mon May 23 19:28:45 2005 UTC (19 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57s_post, checkpoint57y_post, checkpoint57r_post, checkpoint57i_post, checkpoint58, checkpoint57n_post, checkpoint58a_post, checkpoint57z_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57y_pre, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, checkpoint57j_post, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint57x_post
Changes since 1.25: +21 -7 lines
Replace call to nml_filter by open_copy_data_file
(dont know why it hasnt always been that way in the first place).

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

  ViewVC Help
Powered by ViewVC 1.1.22