1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "EXF_CPPOPTIONS.h" |
#include "EXF_OPTIONS.h" |
5 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
6 |
# include "OBCS_OPTIONS.h" |
# include "OBCS_OPTIONS.h" |
7 |
#endif |
#endif |
15 |
c o This routine initialises the package that calculates external |
c o This routine initialises the package that calculates external |
16 |
c forcing fields for a given timestep of the MITgcmUV. Parameters |
c forcing fields for a given timestep of the MITgcmUV. Parameters |
17 |
c for this package are set in "data.externalforcing". Some additional |
c for this package are set in "data.externalforcing". Some additional |
18 |
c precompiler switches have to be specified in "EXF_CPPOPTIONS.h". |
c precompiler switches have to be specified in "EXF_OPTIONS.h". |
19 |
c |
c |
20 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
21 |
c |
c |
48 |
|
|
49 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
50 |
#include "SIZE.h" |
#include "SIZE.h" |
51 |
|
#include "PARAMS.h" |
52 |
#include "cal.h" |
#include "cal.h" |
53 |
#include "exf.h" |
#include "exf.h" |
54 |
#include "exf_param.h" |
#include "exf_param.h" |
61 |
c == local variables == |
c == local variables == |
62 |
|
|
63 |
integer i |
integer i |
64 |
|
integer date_array(4), difftime(4) |
65 |
|
|
66 |
c == external == |
c == external == |
67 |
|
|
72 |
|
|
73 |
c Surface flux data. |
c Surface flux data. |
74 |
namelist /exf_nml/ |
namelist /exf_nml/ |
75 |
& repeatPeriod, |
& windstressmax, repeatPeriod, exf_albedo, |
76 |
& hfluxstartdate1, hfluxstartdate2, hfluxperiod, |
& hfluxstartdate1, hfluxstartdate2, hfluxperiod, |
77 |
& atempstartdate1, atempstartdate2, atempperiod, |
& atempstartdate1, atempstartdate2, atempperiod, |
78 |
& aqhstartdate1, aqhstartdate2, aqhperiod, |
& aqhstartdate1, aqhstartdate2, aqhperiod, |
100 |
& swfluxfile, lwfluxfile, apressurefile, |
& swfluxfile, lwfluxfile, apressurefile, |
101 |
& swdownfile, lwdownfile, |
& swdownfile, lwdownfile, |
102 |
& exf_iprec, exf_yftype, |
& exf_iprec, exf_yftype, |
103 |
& exf_inscal_hflux, exf_inscal_sflux, |
& exf_inscal_hflux, exf_inscal_sflux, |
104 |
& exf_inscal_ustress, exf_inscal_vstress, |
& exf_inscal_ustress, exf_inscal_vstress, |
105 |
& exf_inscal_uwind, exf_inscal_vwind, |
& exf_inscal_uwind, exf_inscal_vwind, exf_inscal_evap, |
106 |
& exf_inscal_evap, exf_inscal_atemp, exf_inscal_aqh, |
& exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh, |
107 |
& exf_inscal_sst, exf_inscal_sss, |
& exf_inscal_sst, exf_inscal_sss, |
108 |
& exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip, |
& exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip, |
109 |
& exf_inscal_runoff, exf_inscal_apressure, |
& exf_inscal_runoff, exf_inscal_apressure, |
110 |
& exf_inscal_swdown, exf_inscal_lwdown, |
& exf_inscal_swdown, exf_inscal_lwdown, |
111 |
& exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress, |
& exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress, |
112 |
& exf_outscal_swflux, exf_outscal_sst,exf_outscal_sss, |
& exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss, |
113 |
& exf_outscal_sflux, exf_outscal_apressure, |
& exf_outscal_sflux, exf_outscal_apressure, |
114 |
& hfluxconst, |
& hfluxconst, |
115 |
& atempconst, |
& atempconst, |
176 |
atempstartdate1 = 0 |
atempstartdate1 = 0 |
177 |
atempstartdate2 = 0 |
atempstartdate2 = 0 |
178 |
atempperiod = 0.0 _d 0 |
atempperiod = 0.0 _d 0 |
179 |
atempconst = 0.0 _d 0 |
atempconst = celsius2K |
180 |
|
|
181 |
aqhstartdate1 = 0 |
aqhstartdate1 = 0 |
182 |
aqhstartdate2 = 0 |
aqhstartdate2 = 0 |
265 |
apressureconst = 0.0 _d 0 |
apressureconst = 0.0 _d 0 |
266 |
|
|
267 |
repeatPeriod = 0.0 _d 0 |
repeatPeriod = 0.0 _d 0 |
268 |
|
exf_albedo = 0.1 _d 0 |
269 |
|
windstressmax = 2.0 _d 0 |
270 |
|
|
271 |
c Data files. |
c Data files. |
272 |
hfluxfile = ' ' |
hfluxfile = ' ' |
286 |
lwdownfile = ' ' |
lwdownfile = ' ' |
287 |
apressurefile = ' ' |
apressurefile = ' ' |
288 |
|
|
289 |
c Initialise the date arrays. |
c Start dates. |
290 |
do i = 1,4 |
hfluxstartdate = 0 |
291 |
hfluxstartdate(i) = 0 |
atempstartdate = 0 |
292 |
atempstartdate(i) = 0 |
aqhstartdate = 0 |
293 |
aqhstartdate(i) = 0 |
evapstartdate = 0 |
294 |
evapstartdate(i) = 0 |
precipstartdate = 0 |
295 |
precipstartdate(i) = 0 |
sfluxstartdate = 0 |
296 |
sfluxstartdate(i) = 0 |
runoffstartdate = 0 |
297 |
runoffstartdate(i) = 0 |
ustressstartdate = 0 |
298 |
ustressstartdate(i) = 0 |
vstressstartdate = 0 |
299 |
vstressstartdate(i) = 0 |
uwindstartdate = 0 |
300 |
uwindstartdate(i) = 0 |
vwindstartdate = 0 |
301 |
vwindstartdate(i) = 0 |
swfluxstartdate = 0 |
302 |
swfluxstartdate(i) = 0 |
lwfluxstartdate = 0 |
303 |
lwfluxstartdate(i) = 0 |
swdownstartdate = 0 |
304 |
swdownstartdate(i) = 0 |
lwdownstartdate = 0 |
305 |
lwdownstartdate(i) = 0 |
obcsNstartdate = 0 |
306 |
obcsNstartdate(i) = 0 |
obcsSstartdate = 0 |
307 |
obcsSstartdate(i) = 0 |
obcsEstartdate = 0 |
308 |
obcsEstartdate(i) = 0 |
obcsWstartdate = 0 |
309 |
obcsWstartdate(i) = 0 |
apressurestartdate = 0 |
|
apressurestartdate(i)= 0 |
|
|
enddo |
|
310 |
|
|
311 |
c Initialise file type and field precision |
c Initialise file type and field precision |
312 |
exf_iprec = 32 |
exf_iprec = 32 |
325 |
exf_inscal_sst = 1. _d 0 |
exf_inscal_sst = 1. _d 0 |
326 |
exf_inscal_sss = 1. _d 0 |
exf_inscal_sss = 1. _d 0 |
327 |
exf_inscal_atemp = 1. _d 0 |
exf_inscal_atemp = 1. _d 0 |
328 |
|
exf_offset_atemp = 0. _d 0 |
329 |
exf_inscal_aqh = 1. _d 0 |
exf_inscal_aqh = 1. _d 0 |
330 |
exf_inscal_evap = 1. _d 0 |
exf_inscal_evap = 1. _d 0 |
331 |
exf_inscal_apressure = 1. _d 0 |
exf_inscal_apressure = 1. _d 0 |
344 |
exf_outscal_sss = 1. _d 0 |
exf_outscal_sss = 1. _d 0 |
345 |
exf_outscal_apressure= 1. _d 0 |
exf_outscal_apressure= 1. _d 0 |
346 |
|
|
347 |
|
#ifdef USE_EXF_INTERPOLATION |
348 |
|
ustress_lon0 = thetaMin |
349 |
|
uwind_lon0 = thetaMin |
350 |
|
vstress_lon0 = thetaMin + delX(1) / 2 |
351 |
|
hflux_lon0 = thetaMin + delX(1) / 2 |
352 |
|
sflux_lon0 = thetaMin + delX(1) / 2 |
353 |
|
swflux_lon0 = thetaMin + delX(1) / 2 |
354 |
|
runoff_lon0 = thetaMin + delX(1) / 2 |
355 |
|
atemp_lon0 = thetaMin + delX(1) / 2 |
356 |
|
aqh_lon0 = thetaMin + delX(1) / 2 |
357 |
|
evap_lon0 = thetaMin + delX(1) / 2 |
358 |
|
precip_lon0 = thetaMin + delX(1) / 2 |
359 |
|
vwind_lon0 = thetaMin + delX(1) / 2 |
360 |
|
lwflux_lon0 = thetaMin + delX(1) / 2 |
361 |
|
swdown_lon0 = thetaMin + delX(1) / 2 |
362 |
|
lwdown_lon0 = thetaMin + delX(1) / 2 |
363 |
|
apressure_lon0 = thetaMin + delX(1) / 2 |
364 |
|
vstress_lat0 = phimin |
365 |
|
vwind_lat0 = phimin |
366 |
|
ustress_lat0 = phimin + delY(1) / 2 |
367 |
|
hflux_lat0 = phimin + delY(1) / 2 |
368 |
|
sflux_lat0 = phimin + delY(1) / 2 |
369 |
|
runoff_lat0 = phimin + delY(1) / 2 |
370 |
|
swflux_lat0 = phimin + delY(1) / 2 |
371 |
|
atemp_lat0 = phimin + delY(1) / 2 |
372 |
|
aqh_lat0 = phimin + delY(1) / 2 |
373 |
|
evap_lat0 = phimin + delY(1) / 2 |
374 |
|
precip_lat0 = phimin + delY(1) / 2 |
375 |
|
uwind_lat0 = phimin + delY(1) / 2 |
376 |
|
lwflux_lat0 = phimin + delY(1) / 2 |
377 |
|
swdown_lat0 = phimin + delY(1) / 2 |
378 |
|
lwdown_lat0 = phimin + delY(1) / 2 |
379 |
|
apressure_lat0 = phimin + delY(1) / 2 |
380 |
|
ustress_nlon = Nx |
381 |
|
ustress_nlat = Ny |
382 |
|
vstress_nlon = Nx |
383 |
|
vstress_nlat = Ny |
384 |
|
hflux_nlon = Nx |
385 |
|
hflux_nlat = Ny |
386 |
|
sflux_nlon = Nx |
387 |
|
sflux_nlat = Ny |
388 |
|
swflux_nlon = Nx |
389 |
|
swflux_nlat = Ny |
390 |
|
runoff_nlon = Nx |
391 |
|
runoff_nlat = Ny |
392 |
|
atemp_nlon = Nx |
393 |
|
atemp_nlat = Ny |
394 |
|
aqh_nlon = Nx |
395 |
|
aqh_nlat = Ny |
396 |
|
evap_nlon = Nx |
397 |
|
evap_nlat = Ny |
398 |
|
precip_nlon = Nx |
399 |
|
precip_nlat = Ny |
400 |
|
uwind_nlon = Nx |
401 |
|
uwind_nlat = Ny |
402 |
|
vwind_nlon = Nx |
403 |
|
vwind_nlat = Ny |
404 |
|
lwflux_nlon = Nx |
405 |
|
lwflux_nlat = Ny |
406 |
|
swdown_nlon = Nx |
407 |
|
swdown_nlat = Ny |
408 |
|
lwdown_nlon = Nx |
409 |
|
lwdown_nlat = Ny |
410 |
|
apressure_nlon = Nx |
411 |
|
apressure_nlat = Ny |
412 |
|
Ustress_lon_inc = delX(1) |
413 |
|
vstress_lon_inc = delX(1) |
414 |
|
hflux_lon_inc = delX(1) |
415 |
|
sflux_lon_inc = delX(1) |
416 |
|
swflux_lon_inc = delX(1) |
417 |
|
runoff_lon_inc = delX(1) |
418 |
|
atemp_lon_inc = delX(1) |
419 |
|
aqh_lon_inc = delX(1) |
420 |
|
evap_lon_inc = delX(1) |
421 |
|
precip_lon_inc = delX(1) |
422 |
|
uwind_lon_inc = delX(1) |
423 |
|
vwind_lon_inc = delX(1) |
424 |
|
lwflux_lon_inc = delX(1) |
425 |
|
swdown_lon_inc = delX(1) |
426 |
|
lwdown_lon_inc = delX(1) |
427 |
|
apressure_lon_inc = delX(1) |
428 |
|
DO i=1,MAX_LAT_INC |
429 |
|
IF (i.LT.Ny) THEN |
430 |
|
vstress_lat_inc(i) = delY(i) |
431 |
|
vwind_lat_inc(i) = delY(i) |
432 |
|
ustress_lat_inc(i) = (delY(i) + delY(i)) / 2. |
433 |
|
hflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
434 |
|
sflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
435 |
|
swflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
436 |
|
runoff_lat_inc(i) = (delY(i) + delY(i)) / 2. |
437 |
|
atemp_lat_inc(i) = (delY(i) + delY(i)) / 2. |
438 |
|
aqh_lat_inc(i) = (delY(i) + delY(i)) / 2. |
439 |
|
evap_lat_inc(i) = (delY(i) + delY(i)) / 2. |
440 |
|
precip_lat_inc(i) = (delY(i) + delY(i)) / 2. |
441 |
|
uwind_lat_inc(i) = (delY(i) + delY(i)) / 2. |
442 |
|
lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
443 |
|
swdown_lat_inc(i) = (delY(i) + delY(i)) / 2. |
444 |
|
lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2. |
445 |
|
apressure_lat_inc(i) = (delY(i) + delY(i)) / 2. |
446 |
|
ELSE |
447 |
|
ustress_lat_inc(i) = 0. |
448 |
|
vstress_lat_inc(i) = 0. |
449 |
|
hflux_lat_inc(i) = 0. |
450 |
|
sflux_lat_inc(i) = 0. |
451 |
|
swflux_lat_inc(i) = 0. |
452 |
|
runoff_lat_inc(i) = 0. |
453 |
|
atemp_lat_inc(i) = 0. |
454 |
|
aqh_lat_inc(i) = 0. |
455 |
|
evap_lat_inc(i) = 0. |
456 |
|
precip_lat_inc(i) = 0. |
457 |
|
uwind_lat_inc(i) = 0. |
458 |
|
vwind_lat_inc(i) = 0. |
459 |
|
lwflux_lat_inc(i) = 0. |
460 |
|
swdown_lat_inc(i) = 0. |
461 |
|
lwdown_lat_inc(i) = 0. |
462 |
|
apressure_lat_inc(i) = 0. |
463 |
|
ENDIF |
464 |
|
ENDDO |
465 |
|
#endif /* USE_EXF_INTERPOLATION */ |
466 |
|
|
467 |
c Check for the availability of the right calendar version. |
c Check for the availability of the right calendar version. |
468 |
if ( calendarversion .ne. usescalendarversion ) then |
if ( calendarversion .ne. usescalendarversion ) then |
469 |
print*,' exf_readparms: You are not using the appropriate' |
print*,' exf_readparms: You are not using the appropriate' |
499 |
end if |
end if |
500 |
|
|
501 |
#ifdef ALLOW_ATM_WIND |
#ifdef ALLOW_ATM_WIND |
502 |
call cal_FullDate( uwindstartdate1, uwindstartdate2, |
if ( uwindfile .NE. ' ' ) then |
503 |
& uwindstartdate , mythid ) |
call cal_FullDate ( uwindstartdate1 , uwindstartdate2, |
504 |
call cal_FullDate( vwindstartdate1, vwindstartdate2, |
& date_array ,mythid ) |
505 |
& vwindstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
506 |
|
call cal_ToSeconds ( difftime, uwindstartdate ,mythid ) |
507 |
|
uwindstartdate = modelstart + uwindstartdate |
508 |
|
endif |
509 |
|
if ( vwindfile .NE. ' ' ) then |
510 |
|
call cal_FullDate ( vwindstartdate1 , vwindstartdate2, |
511 |
|
& date_array ,mythid ) |
512 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
513 |
|
call cal_ToSeconds ( difftime, vwindstartdate ,mythid ) |
514 |
|
vwindstartdate = modelstart + vwindstartdate |
515 |
|
endif |
516 |
#else |
#else |
517 |
call cal_FullDate( ustressstartdate1, ustressstartdate2, |
if ( ustressfile .NE. ' ' ) then |
518 |
& ustressstartdate , mythid ) |
call cal_FullDate ( ustressstartdate1 , ustressstartdate2, |
519 |
call cal_FullDate( vstressstartdate1, vstressstartdate2, |
& date_array ,mythid ) |
520 |
& vstressstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
521 |
|
call cal_ToSeconds ( difftime, ustressstartdate ,mythid ) |
522 |
|
ustressstartdate = modelstart + ustressstartdate |
523 |
|
endif |
524 |
|
if ( vstressfile .NE. ' ' ) then |
525 |
|
call cal_FullDate ( vstressstartdate1 , vstressstartdate2, |
526 |
|
& date_array ,mythid ) |
527 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
528 |
|
call cal_ToSeconds ( difftime, vstressstartdate ,mythid ) |
529 |
|
vstressstartdate = modelstart + vstressstartdate |
530 |
|
endif |
531 |
#endif |
#endif |
532 |
|
|
533 |
#ifdef ALLOW_ATM_TEMP |
#ifdef ALLOW_ATM_TEMP |
534 |
call cal_FullDate( atempstartdate1, atempstartdate2, |
if ( atempfile .NE. ' ' ) then |
535 |
& atempstartdate , mythid ) |
call cal_FullDate ( atempstartdate1 , atempstartdate2, |
536 |
call cal_FullDate( aqhstartdate1, aqhstartdate2, |
& date_array ,mythid ) |
537 |
& aqhstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
538 |
call cal_FullDate( lwfluxstartdate1, lwfluxstartdate2, |
call cal_ToSeconds ( difftime, atempstartdate ,mythid ) |
539 |
& lwfluxstartdate , mythid ) |
atempstartdate = modelstart + atempstartdate |
540 |
call cal_FullDate( precipstartdate1, precipstartdate2, |
endif |
541 |
& precipstartdate , mythid ) |
if ( aqhfile .NE. ' ' ) then |
542 |
|
call cal_FullDate ( aqhstartdate1 , aqhstartdate2, |
543 |
|
& date_array ,mythid ) |
544 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
545 |
|
call cal_ToSeconds ( difftime, aqhstartdate ,mythid ) |
546 |
|
aqhstartdate = modelstart + aqhstartdate |
547 |
|
endif |
548 |
|
if ( lwfluxfile .NE. ' ' ) then |
549 |
|
call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2, |
550 |
|
& date_array ,mythid ) |
551 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
552 |
|
call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid ) |
553 |
|
lwfluxstartdate = modelstart + lwfluxstartdate |
554 |
|
endif |
555 |
|
if ( precipfile .NE. ' ' ) then |
556 |
|
call cal_FullDate ( precipstartdate1 , precipstartdate2, |
557 |
|
& date_array ,mythid ) |
558 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
559 |
|
call cal_ToSeconds ( difftime, precipstartdate ,mythid ) |
560 |
|
precipstartdate = modelstart + precipstartdate |
561 |
|
endif |
562 |
#else |
#else |
563 |
call cal_FullDate( hfluxstartdate1, hfluxstartdate2, |
if ( hfluxfile .NE. ' ' ) then |
564 |
& hfluxstartdate , mythid ) |
call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2, |
565 |
call cal_FullDate( sfluxstartdate1, sfluxstartdate2, |
& date_array ,mythid ) |
566 |
& sfluxstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
567 |
|
call cal_ToSeconds ( difftime, hfluxstartdate ,mythid ) |
568 |
|
hfluxstartdate = modelstart + hfluxstartdate |
569 |
|
endif |
570 |
|
if ( sfluxfile .NE. ' ' ) then |
571 |
|
call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2, |
572 |
|
& date_array ,mythid ) |
573 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
574 |
|
call cal_ToSeconds ( difftime, sfluxstartdate ,mythid ) |
575 |
|
sfluxstartdate = modelstart + sfluxstartdate |
576 |
|
endif |
577 |
#endif |
#endif |
578 |
|
|
579 |
#if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) |
#if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) |
580 |
call cal_FullDate( swfluxstartdate1, swfluxstartdate2, |
if ( swfluxfile .NE. ' ' ) then |
581 |
& swfluxstartdate , mythid ) |
call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2, |
582 |
|
& date_array ,mythid ) |
583 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
584 |
|
call cal_ToSeconds ( difftime, swfluxstartdate ,mythid ) |
585 |
|
swfluxstartdate = modelstart + swfluxstartdate |
586 |
|
endif |
587 |
#endif |
#endif |
588 |
|
|
589 |
#ifdef EXF_READ_EVAP |
#ifdef EXF_READ_EVAP |
590 |
call cal_FullDate( evapstartdate1, evapstartdate2, |
if ( evapfile .NE. ' ' ) then |
591 |
& evapstartdate , mythid ) |
call cal_FullDate ( evapstartdate1 , evapstartdate2, |
592 |
|
& date_array ,mythid ) |
593 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
594 |
|
call cal_ToSeconds ( difftime, evapstartdate ,mythid ) |
595 |
|
evapstartdate = modelstart + evapstartdate |
596 |
|
endif |
597 |
#endif |
#endif |
598 |
|
|
599 |
#ifdef ALLOW_RUNOFF |
#ifdef ALLOW_RUNOFF |
600 |
call cal_FullDate( runoffstartdate1, runoffstartdate2, |
if ( runofffile .NE. ' ' ) then |
601 |
& runoffstartdate , mythid ) |
call cal_FullDate ( runoffstartdate1 , runoffstartdate2, |
602 |
|
& date_array ,mythid ) |
603 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
604 |
|
call cal_ToSeconds ( difftime, runoffstartdate ,mythid ) |
605 |
|
runoffstartdate = modelstart + runoffstartdate |
606 |
|
endif |
607 |
#endif |
#endif |
608 |
|
|
609 |
#ifdef ALLOW_DOWNWARD_RADIATION |
#ifdef ALLOW_DOWNWARD_RADIATION |
610 |
call cal_FullDate( swdownstartdate1, swdownstartdate2, |
if ( swdownfile .NE. ' ' ) then |
611 |
& swdownstartdate , mythid ) |
call cal_FullDate ( swdownstartdate1 , swdownstartdate2, |
612 |
call cal_FullDate( lwdownstartdate1, lwdownstartdate2, |
& date_array ,mythid ) |
613 |
& lwdownstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
614 |
|
call cal_ToSeconds ( difftime, swdownstartdate ,mythid ) |
615 |
|
swdownstartdate = modelstart + swdownstartdate |
616 |
|
endif |
617 |
|
if ( lwdownfile .NE. ' ' ) then |
618 |
|
call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2, |
619 |
|
& date_array ,mythid ) |
620 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
621 |
|
call cal_ToSeconds ( difftime, lwdownstartdate ,mythid ) |
622 |
|
lwdownstartdate = modelstart + lwdownstartdate |
623 |
|
endif |
624 |
|
#endif |
625 |
|
|
626 |
|
#ifdef ATMOSPHERIC_LOADING |
627 |
|
if ( apressurefile .NE. ' ' ) then |
628 |
|
call cal_FullDate ( apressurestartdate1, apressurestartdate2, |
629 |
|
& date_array ,mythid ) |
630 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
631 |
|
call cal_ToSeconds ( difftime, apressurestartdate ,mythid ) |
632 |
|
apressurestartdate = modelstart + apressurestartdate |
633 |
|
endif |
634 |
#endif |
#endif |
635 |
|
|
636 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
637 |
#ifdef ALLOW_OBCS_NORTH |
#ifdef ALLOW_OBCS_NORTH |
638 |
call cal_FullDate( obcsNstartdate1, obcsNstartdate2, |
if ( obcsNperiod .NE. 0 ) then |
639 |
& obcsNstartdate , mythid ) |
call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2, |
640 |
|
& date_array ,mythid ) |
641 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
642 |
|
call cal_ToSeconds ( difftime, obcsNstartdate ,mythid ) |
643 |
|
obcsNstartdate = modelstart + obcsNstartdate |
644 |
|
endif |
645 |
#endif |
#endif |
646 |
#ifdef ALLOW_OBCS_SOUTH |
#ifdef ALLOW_OBCS_SOUTH |
647 |
call cal_FullDate( obcsSstartdate1, obcsSstartdate2, |
if ( obcsSperiod .NE. 0 ) then |
648 |
& obcsSstartdate , mythid ) |
call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2, |
649 |
|
& date_array ,mythid ) |
650 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
651 |
|
call cal_ToSeconds ( difftime, obcsSstartdate ,mythid ) |
652 |
|
obcsSstartdate = modelstart + obcsSstartdate |
653 |
|
endif |
654 |
#endif |
#endif |
655 |
#ifdef ALLOW_OBCS_EAST |
#ifdef ALLOW_OBCS_EAST |
656 |
call cal_FullDate( obcsEstartdate1, obcsEstartdate2, |
if ( obcsEperiod .NE. 0 ) then |
657 |
& obcsEstartdate , mythid ) |
call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2, |
658 |
|
& date_array ,mythid ) |
659 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
660 |
|
call cal_ToSeconds ( difftime, obcsEstartdate ,mythid ) |
661 |
|
obcsEstartdate = modelstart + obcsEstartdate |
662 |
|
endif |
663 |
#endif |
#endif |
664 |
#ifdef ALLOW_OBCS_WEST |
#ifdef ALLOW_OBCS_WEST |
665 |
call cal_FullDate( obcsWstartdate1, obcsWstartdate2, |
if ( obcsNperiod .NE. 0 ) then |
666 |
& obcsWstartdate , mythid ) |
call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2, |
667 |
|
& date_array ,mythid ) |
668 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
669 |
|
call cal_ToSeconds ( difftime, obcsWstartdate ,mythid ) |
670 |
|
obcsWstartdate = modelstart + obcsWstartdate |
671 |
|
endif |
672 |
#endif |
#endif |
673 |
#endif /* ALLOW_OBCS */ |
#endif /* ALLOW_OBCS */ |
674 |
|
|
|
#ifdef ATMOSPHERIC_LOADING |
|
|
call cal_FullDate(apressurestartdate1,apressurestartdate2, |
|
|
& apressurestartdate , mythid ) |
|
|
#endif |
|
|
|
|
675 |
_END_MASTER( mythid ) |
_END_MASTER( mythid ) |
676 |
|
|
677 |
_BARRIER |
_BARRIER |