63 |
integer i |
integer i |
64 |
integer date_array(4), difftime(4) |
integer date_array(4), difftime(4) |
65 |
|
|
|
c == external == |
|
|
|
|
|
integer ilnblnk |
|
|
external ilnblnk |
|
|
|
|
66 |
c == end of interface == |
c == end of interface == |
67 |
|
|
68 |
c Surface flux data. |
c Surface flux data. |
94 |
& uwindfile, vwindfile, |
& uwindfile, vwindfile, |
95 |
& swfluxfile, lwfluxfile, apressurefile, |
& swfluxfile, lwfluxfile, apressurefile, |
96 |
& swdownfile, lwdownfile, |
& swdownfile, lwdownfile, |
97 |
& exf_iprec, exf_yftype, |
& exf_iprec, exf_yftype, |
98 |
|
& useExfYearlyFields, useExfCheckRange, |
99 |
& exf_inscal_hflux, exf_inscal_sflux, |
& exf_inscal_hflux, exf_inscal_sflux, |
100 |
& exf_inscal_ustress, exf_inscal_vstress, |
& exf_inscal_ustress, exf_inscal_vstress, |
101 |
& exf_inscal_uwind, exf_inscal_vwind, exf_inscal_evap, |
& exf_inscal_uwind, exf_inscal_vwind, exf_inscal_evap, |
163 |
|
|
164 |
c Set default values. |
c Set default values. |
165 |
|
|
166 |
|
year2sec = 365.*86400. |
167 |
|
|
168 |
c Calendar data. |
c Calendar data. |
169 |
hfluxstartdate1 = 0 |
hfluxstartdate1 = 0 |
170 |
hfluxstartdate2 = 0 |
hfluxstartdate2 = 0 |
307 |
apressurestartdate = 0 |
apressurestartdate = 0 |
308 |
|
|
309 |
c Initialise file type and field precision |
c Initialise file type and field precision |
310 |
exf_iprec = 32 |
exf_iprec = 32 |
311 |
exf_yftype = 'RL' |
exf_yftype = 'RL' |
312 |
|
useExfYearlyFields = .FALSE. |
313 |
|
useExfCheckRange = .TRUE. |
314 |
|
|
315 |
c Input scaling factors. |
c Input scaling factors. |
316 |
exf_inscal_hflux = 1. _d 0 |
exf_inscal_hflux = 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 |
332 |
cds convert runoff from m/yr to m/s and change sign. |
cds convert runoff from m/yr to m/s and change sign. |
333 |
exf_inscal_runoff = -1.0/(86400.*365.0) |
cph do this later, in exf_init_runoff |
334 |
|
exf_inscal_runoff = 1. _d 0 |
335 |
exf_inscal_swdown = 1. _d 0 |
exf_inscal_swdown = 1. _d 0 |
336 |
exf_inscal_lwdown = 1. _d 0 |
exf_inscal_lwdown = 1. _d 0 |
337 |
|
|
483 |
read( scrunit1, nml = exf_nml ) |
read( scrunit1, nml = exf_nml ) |
484 |
close( scrunit1 ) |
close( scrunit1 ) |
485 |
|
|
486 |
|
call exf_check( mythid ) |
487 |
|
|
488 |
c Complete the start date specifications for the forcing |
c Complete the start date specifications for the forcing |
489 |
c fields to get a complete calendar date array. |
c fields to get a complete calendar date array. |
490 |
|
|
|
c check for consistency |
|
|
|
|
|
if (.NOT. |
|
|
& (exf_iprec .EQ. 32 .OR. exf_iprec .EQ. 64) |
|
|
& ) then |
|
|
stop 'stop in exf_readparms: value of exf_iprec not allowed' |
|
|
else if (.NOT. |
|
|
& (exf_yftype .EQ. 'RS' .OR. |
|
|
& exf_yftype .EQ. 'RL') |
|
|
& ) then |
|
|
stop 'stop in exf_readparms: value of exf_yftype not allowed' |
|
|
end if |
|
|
|
|
491 |
#ifdef ALLOW_ATM_WIND |
#ifdef ALLOW_ATM_WIND |
492 |
if ( uwindfile .NE. ' ' ) then |
if ( uwindfile .NE. ' ' ) then |
493 |
call cal_FullDate ( uwindstartdate1 , uwindstartdate2, |
call cal_FullDate ( uwindstartdate1 , uwindstartdate2, |