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

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

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

revision 1.5 by dimitri, Sat Dec 28 10:11:11 2002 UTC revision 1.18 by heimbach, Wed Jul 7 19:59:41 2004 UTC
# Line 1  Line 1 
1  c $Header$  C $Header$
2    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
# Line 14  c Line 15  c
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
# Line 35  c              - added new obcs paramete Line 36  c              - added new obcs paramete
36  c     included runoff D. Stammer, Nov. 25, 2001  c     included runoff D. Stammer, Nov. 25, 2001
37  c     included pressure forcing. heimbach@mit.edu 05-Nov-2002  c     included pressure forcing. heimbach@mit.edu 05-Nov-2002
38  c     added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002  c     added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
39  c     added option EXF_READ_EVAP. menemenlis@jpl.nasa.gov 20-Dec-2002  c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40  c  c
41  c     ==================================================================  c     ==================================================================
42  c     SUBROUTINE exf_readparms  c     SUBROUTINE exf_readparms
# Line 47  c     == global variables == Line 48  c     == global variables ==
48    
49  #include "EEPARAMS.h"  #include "EEPARAMS.h"
50  #include "SIZE.h"  #include "SIZE.h"
51    #include "PARAMS.h"
52    
53  #include "cal.h"  #include "cal.h"
54  #include "exf.h"  #include "exf.h"
55  #include "exf_param.h"  #include "exf_param.h"
# Line 59  c     == routine arguments == Line 62  c     == routine arguments ==
62  c     == local variables ==  c     == local variables ==
63    
64        integer i        integer i
65          integer date_array(4), difftime(4)
66    
67  c     == external ==  c     == external ==
68    
# Line 69  c     == end of interface == Line 73  c     == end of interface ==
73    
74  c     Surface flux data.  c     Surface flux data.
75        namelist /exf_nml/        namelist /exf_nml/
76       &    repeatPeriod,       &      windstressmax,       repeatPeriod,    exf_albedo,
77       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,
78       &    atempstartdate1,    atempstartdate2,   atempperiod,       &    atempstartdate1,    atempstartdate2,   atempperiod,
79       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,
# Line 83  c     Surface flux data. Line 87  c     Surface flux data.
87       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,
88       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,
89       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,
90         &   swdownstartdate1,   swdownstartdate2,  swdownperiod,
91         &   lwdownstartdate1,   lwdownstartdate2,  lwdownperiod,
92       &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,       &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,
93       &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,       &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,
94       &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,       &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,
# Line 93  c     Surface flux data. Line 99  c     Surface flux data.
99       &        ustressfile,        vstressfile,      evapfile,       &        ustressfile,        vstressfile,      evapfile,
100       &          uwindfile,          vwindfile,       &          uwindfile,          vwindfile,
101       &         swfluxfile,         lwfluxfile, apressurefile,       &         swfluxfile,         lwfluxfile, apressurefile,
102         &         swdownfile,         lwdownfile,
103       &          exf_iprec,         exf_yftype,       &          exf_iprec,         exf_yftype,
104       &           scal_hfl,           scal_ust,       scal_vst,       &   exf_inscal_hflux,  exf_inscal_sflux,
105       &           scal_swf,           scal_sst,       scal_sss,       & exf_inscal_ustress,  exf_inscal_vstress,
106       &     scal_apressure,           scal_sfl       &   exf_inscal_uwind,  exf_inscal_vwind,    exf_inscal_evap,
107         &   exf_inscal_atemp,  exf_offset_atemp,    exf_inscal_aqh,
108         &     exf_inscal_sst,  exf_inscal_sss,
109         &  exf_inscal_swflux,  exf_inscal_lwflux,   exf_inscal_precip,
110         &  exf_inscal_runoff,  exf_inscal_apressure,
111         &  exf_inscal_swdown,  exf_inscal_lwdown,
112         &  exf_outscal_hflux,  exf_outscal_ustress, exf_outscal_vstress,
113         & exf_outscal_swflux,  exf_outscal_sst,     exf_outscal_sss,
114         &  exf_outscal_sflux,  exf_outscal_apressure,
115         &         hfluxconst,
116         &         atempconst,
117         &         aqhconst,
118         &         sfluxconst,
119         &         evapconst,
120         &         precipconst,
121         &         runoffconst,
122         &         ustressconst,
123         &         vstressconst,
124         &         uwindconst,
125         &         vwindconst,
126         &         swfluxconst,
127         &         lwfluxconst,
128         &         swdownconst,
129         &         lwdownconst,
130         &         apressureconst
131    #ifdef USE_EXF_INTERPOLATION
132         & ,ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
133         & ustress_nlon, ustress_nlat,
134         & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
135         & vstress_nlon, vstress_nlat,
136         & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
137         & hflux_nlon, hflux_nlat,
138         & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
139         & sflux_nlon, sflux_nlat,
140         & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
141         & swflux_nlon, swflux_nlat,
142         & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
143         & runoff_nlon, runoff_nlat,
144         & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
145         & atemp_nlon, atemp_nlat,
146         & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc,
147         & aqh_nlon, aqh_nlat,
148         & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,
149         & evap_nlon, evap_nlat,
150         & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
151         & precip_nlon, precip_nlat,
152         & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
153         & uwind_nlon, uwind_nlat,
154         & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
155         & vwind_nlon, vwind_nlat,
156         & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
157         & lwflux_nlon, lwflux_nlat,
158         & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
159         & swdown_nlon, swdown_nlat,
160         & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
161         & lwdown_nlon, lwdown_nlat,
162         & apressure_lon0,apressure_lon_inc,
163         & apressure_lat0,apressure_lat_inc,
164         & apressure_nlon,apressure_nlat
165    #endif
166    
167        _BEGIN_MASTER(mythid)        _BEGIN_MASTER(mythid)
168    
# Line 106  c     Calendar data. Line 172  c     Calendar data.
172        hfluxstartdate1    = 0        hfluxstartdate1    = 0
173        hfluxstartdate2    = 0        hfluxstartdate2    = 0
174        hfluxperiod        = 0.0 _d 0        hfluxperiod        = 0.0 _d 0
175          hfluxconst         = 0.0 _d 0
176    
177        atempstartdate1    = 0        atempstartdate1    = 0
178        atempstartdate2    = 0        atempstartdate2    = 0
179        atempperiod        = 0.0 _d 0        atempperiod        = 0.0 _d 0
180          atempconst         = celsius2K
181    
182        aqhstartdate1      = 0        aqhstartdate1      = 0
183        aqhstartdate2      = 0        aqhstartdate2      = 0
184        aqhperiod          = 0.0 _d 0        aqhperiod          = 0.0 _d 0
185          aqhconst           = 0.0 _d 0
186    
187        sfluxstartdate1    = 0        sfluxstartdate1    = 0
188        sfluxstartdate2    = 0        sfluxstartdate2    = 0
189        sfluxperiod        = 0.0 _d 0        sfluxperiod        = 0.0 _d 0
190          sfluxconst         = 0.0 _d 0
191    
192        evapstartdate1   = 0        evapstartdate1   = 0
193        evapstartdate2   = 0        evapstartdate2   = 0
194        evapperiod       = 0.0 _d 0        evapperiod       = 0.0 _d 0
195          evapconst        = 0.0 _d 0
196    
197        precipstartdate1   = 0        precipstartdate1   = 0
198        precipstartdate2   = 0        precipstartdate2   = 0
199        precipperiod       = 0.0 _d 0        precipperiod       = 0.0 _d 0
200          precipconst        = 0.0 _d 0
201    
202        runoffstartdate1   = 0        runoffstartdate1   = 0
203        runoffstartdate2   = 0        runoffstartdate2   = 0
204        runoffperiod       = 0.0 _d 0        runoffperiod       = 0.0 _d 0
205          runoffconst        = 0.0 _d 0
206    
207        ustressstartdate1  = 0        ustressstartdate1  = 0
208        ustressstartdate2  = 0        ustressstartdate2  = 0
209        ustressperiod      = 0.0 _d 0        ustressperiod      = 0.0 _d 0
210          ustressconst       = 0.0 _d 0
211    
212        vstressstartdate1  = 0        vstressstartdate1  = 0
213        vstressstartdate2  = 0        vstressstartdate2  = 0
214        vstressperiod      = 0.0 _d 0        vstressperiod      = 0.0 _d 0
215          vstressconst       = 0.0 _d 0
216    
217        uwindstartdate1    = 0        uwindstartdate1    = 0
218        uwindstartdate2    = 0        uwindstartdate2    = 0
219        uwindperiod        = 0.0 _d 0        uwindperiod        = 0.0 _d 0
220          uwindconst         = 0.0 _d 0
221    
222        vwindstartdate1    = 0        vwindstartdate1    = 0
223        vwindstartdate2    = 0        vwindstartdate2    = 0
224        vwindperiod        = 0.0 _d 0        vwindperiod        = 0.0 _d 0
225          vwindconst         = 0.0 _d 0
226    
227        swfluxstartdate1   = 0        swfluxstartdate1   = 0
228        swfluxstartdate2   = 0        swfluxstartdate2   = 0
229        swfluxperiod       = 0.0 _d 0        swfluxperiod       = 0.0 _d 0
230          swfluxconst        = 0.0 _d 0
231    
232        lwfluxstartdate1   = 0        lwfluxstartdate1   = 0
233        lwfluxstartdate2   = 0        lwfluxstartdate2   = 0
234        lwfluxperiod       = 0.0 _d 0        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        obcsNstartdate1    = 0
248        obcsNstartdate2    = 0        obcsNstartdate2    = 0
# Line 174  c     Calendar data. Line 263  c     Calendar data.
263        apressurestartdate1    = 0        apressurestartdate1    = 0
264        apressurestartdate2    = 0        apressurestartdate2    = 0
265        apressureperiod        = 0.0 _d 0        apressureperiod        = 0.0 _d 0
266          apressureconst         = 0.0 _d 0
267    
268        repeatPeriod           = 0.0 _d 0        repeatPeriod           = 0.0 _d 0
269          exf_albedo             = 0.1 _d 0
270          windstressmax          = 2.0 _d 0
271    
272  c     Data files.  c     Data files.
273        hfluxfile          = ' '        hfluxfile          = ' '
# Line 191  c     Data files. Line 283  c     Data files.
283        vwindfile          = ' '        vwindfile          = ' '
284        swfluxfile         = ' '        swfluxfile         = ' '
285        lwfluxfile         = ' '        lwfluxfile         = ' '
286          swdownfile         = ' '
287          lwdownfile         = ' '
288        apressurefile      = ' '        apressurefile      = ' '
289    
290  c     Initialise the date arrays.  c     Start dates.
291        do i = 1,4        hfluxstartdate     = 0
292           hfluxstartdate(i)    = 0        atempstartdate     = 0
293           atempstartdate(i)    = 0        aqhstartdate       = 0
294           aqhstartdate(i)      = 0        evapstartdate      = 0
295           evapstartdate(i)     = 0        precipstartdate    = 0
296           precipstartdate(i)   = 0        sfluxstartdate     = 0
297           sfluxstartdate(i)    = 0        runoffstartdate    = 0
298           runoffstartdate(i)   = 0        ustressstartdate   = 0
299           ustressstartdate(i)  = 0        vstressstartdate   = 0
300           vstressstartdate(i)  = 0        uwindstartdate     = 0
301           uwindstartdate(i)    = 0        vwindstartdate     = 0
302           vwindstartdate(i)    = 0        swfluxstartdate    = 0
303           swfluxstartdate(i)   = 0        lwfluxstartdate    = 0
304           lwfluxstartdate(i)   = 0        swdownstartdate    = 0
305           obcsNstartdate(i)    = 0        lwdownstartdate    = 0
306           obcsSstartdate(i)    = 0        obcsNstartdate     = 0
307           obcsEstartdate(i)    = 0        obcsSstartdate     = 0
308           obcsWstartdate(i)    = 0        obcsEstartdate     = 0
309           apressurestartdate(i)= 0        obcsWstartdate     = 0
310        enddo        apressurestartdate = 0
311    
312  c     Initialise file type and field precision  c     Initialise file type and field precision
313        exf_iprec       = 32        exf_iprec       = 32
314        exf_yftype      = 'RL'        exf_yftype      = 'RL'
315    
316  c     scaling between exf units and MITgcm units  c     Input scaling factors.
317        scal_hfl       =  1. _d 0        exf_inscal_hflux     =  1. _d 0
318        scal_ust       =  1. _d 0        exf_inscal_sflux     =  1. _d 0
319        scal_vst       =  1. _d 0        exf_inscal_ustress   =  1. _d 0
320        scal_swf       =  1. _d 0        exf_inscal_vstress   =  1. _d 0
321        scal_sst       =  1. _d 0        exf_inscal_uwind     =  1. _d 0
322        scal_sss       =  1. _d 0        exf_inscal_vwind     =  1. _d 0
323        scal_apressure =  1. _d 0        exf_inscal_swflux    =  1. _d 0
324        scal_sfl       =  1. _d 0            exf_inscal_lwflux    =  1. _d 0
325          exf_inscal_precip    =  1. _d 0
326          exf_inscal_sst       =  1. _d 0
327          exf_inscal_sss       =  1. _d 0
328          exf_inscal_atemp     =  1. _d 0
329          exf_offset_atemp     =  0. _d 0
330          exf_inscal_aqh       =  1. _d 0
331          exf_inscal_evap      =  1. _d 0
332          exf_inscal_apressure =  1. _d 0
333    cds   convert runoff from m/yr to m/s and change sign.
334          exf_inscal_runoff    = -1.0/(86400.*365.0)
335          exf_inscal_swdown    =  1. _d 0
336          exf_inscal_lwdown    =  1. _d 0
337    
338    c     Output scaling factors.
339          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          exf_outscal_sst      =  1. _d 0
345          exf_outscal_sss      =  1. _d 0
346          exf_outscal_apressure=  1. _d 0
347    
348  c     Check for the availability of the right calendar version.  c     Check for the availability of the right calendar version.
349        if ( calendarversion .ne. usescalendarversion ) then        if ( calendarversion .ne. usescalendarversion ) then
# Line 263  c     check for consistency Line 379  c     check for consistency
379           stop 'stop in exf_readparms: value of exf_yftype not allowed'           stop 'stop in exf_readparms: value of exf_yftype not allowed'
380        end if        end if
381    
382  #ifdef EXF_READ_EVAP  #ifdef ALLOW_ATM_WIND
383        call cal_FullDate(  evapstartdate1,    evapstartdate2,        if ( uwindfile .NE. ' ' ) then
384       &                    evapstartdate,              mythid )           call cal_FullDate  ( uwindstartdate1    ,      uwindstartdate2,
385  #endif EXF_READ_EVAP       &        date_array                        ,mythid )
386             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
387  #ifdef ALLOW_RUNOFF           call cal_ToSeconds ( difftime,    uwindstartdate     ,mythid )
388        call cal_FullDate(  runoffstartdate1,  runoffstartdate2,           uwindstartdate     = modelstart   + uwindstartdate
389       &                    runoffstartdate,            mythid )        endif
390          if ( vwindfile .NE. ' ' ) then
391             call cal_FullDate  ( vwindstartdate1    ,      vwindstartdate2,
392         &        date_array                        ,mythid )
393             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
394             call cal_ToSeconds ( difftime,    vwindstartdate     ,mythid )
395             vwindstartdate     = modelstart   + vwindstartdate
396          endif
397    #else
398          if ( ustressfile .NE. ' ' ) then
399             call cal_FullDate  ( ustressstartdate1  ,    ustressstartdate2,
400         &        date_array                        ,mythid )
401             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
402             call cal_ToSeconds ( difftime,  ustressstartdate     ,mythid )
403             ustressstartdate   = modelstart + ustressstartdate
404          endif
405          if ( vstressfile .NE. ' ' ) then
406             call cal_FullDate  ( vstressstartdate1  ,    vstressstartdate2,
407         &        date_array                        ,mythid )
408             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
409             call cal_ToSeconds ( difftime,  vstressstartdate     ,mythid )
410             vstressstartdate   = modelstart + vstressstartdate
411          endif
412  #endif  #endif
413    
 #ifdef ALLOW_BULKFORMULAE  
   
414  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
415        call cal_FullDate(   atempstartdate1,   atempstartdate2,        if ( atempfile .NE. ' ' ) then
416       &                     atempstartdate,            mythid )           call cal_FullDate  ( atempstartdate1    ,      atempstartdate2,
417        call cal_FullDate(     aqhstartdate1,     aqhstartdate2,       &        date_array                        ,mythid )
418       &                       aqhstartdate,            mythid )           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
419        call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,           call cal_ToSeconds ( difftime,    atempstartdate     ,mythid )
420       &                    swfluxstartdate,            mythid )           atempstartdate     = modelstart   + atempstartdate
421        call cal_FullDate(  lwfluxstartdate1,  lwfluxstartdate2,        endif
422       &                    lwfluxstartdate,            mythid )        if ( aqhfile .NE. ' ' ) then
423        call cal_FullDate(  precipstartdate1,  precipstartdate2,           call cal_FullDate  ( aqhstartdate1      ,        aqhstartdate2,
424       &                    precipstartdate,            mythid )       &        date_array                        ,mythid )
425             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
426             call cal_ToSeconds ( difftime,      aqhstartdate     ,mythid )
427             aqhstartdate       = modelstart     + aqhstartdate
428          endif
429          if ( lwfluxfile .NE. ' ' ) then
430             call cal_FullDate  ( lwfluxstartdate1   ,     lwfluxstartdate2,
431         &        date_array                        ,mythid )
432             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
433             call cal_ToSeconds ( difftime,   lwfluxstartdate     ,mythid )
434             lwfluxstartdate    = modelstart  + lwfluxstartdate
435          endif
436          if ( precipfile .NE. ' ' ) then
437             call cal_FullDate  ( precipstartdate1   ,     precipstartdate2,
438         &        date_array                        ,mythid )
439             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
440             call cal_ToSeconds ( difftime,   precipstartdate     ,mythid )
441             precipstartdate    = modelstart  + precipstartdate
442          endif
443  #else  #else
444        call cal_FullDate(   hfluxstartdate1,   hfluxstartdate2,        if ( hfluxfile .NE. ' ' ) then
445       &                     hfluxstartdate,            mythid )           call cal_FullDate  ( hfluxstartdate1    ,      hfluxstartdate2,
446        call cal_FullDate(   sfluxstartdate1,  sfluxstartdate2,       &        date_array                        ,mythid )
447       &                     sfluxstartdate,           mythid )           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
448  #ifdef ALLOW_KPP           call cal_ToSeconds ( difftime,    hfluxstartdate     ,mythid )
449        call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,           hfluxstartdate     = modelstart   + hfluxstartdate
450       &                    swfluxstartdate,            mythid )        endif
451          if ( sfluxfile .NE. ' ' ) then
452             call cal_FullDate  ( sfluxstartdate1    ,      sfluxstartdate2,
453         &        date_array                        ,mythid )
454             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
455             call cal_ToSeconds ( difftime,    sfluxstartdate     ,mythid )
456             sfluxstartdate     = modelstart   + sfluxstartdate
457          endif
458  #endif  #endif
459    
460    #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
461          if ( swfluxfile .NE. ' ' ) then
462             call cal_FullDate  ( swfluxstartdate1   ,     swfluxstartdate2,
463         &        date_array                        ,mythid )
464             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
465             call cal_ToSeconds ( difftime,   swfluxstartdate     ,mythid )
466             swfluxstartdate    = modelstart  + swfluxstartdate
467          endif
468  #endif  #endif
469    
470  #ifdef ALLOW_ATM_WIND  #ifdef EXF_READ_EVAP
471        call cal_FullDate(   uwindstartdate1,   uwindstartdate2,        if ( evapfile .NE. ' ' ) then
472       &                     uwindstartdate,            mythid )           call cal_FullDate  ( evapstartdate1     ,       evapstartdate2,
473        call cal_FullDate(   vwindstartdate1,   vwindstartdate2,       &        date_array                        ,mythid )
474       &                     vwindstartdate,            mythid )           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
475  #else           call cal_ToSeconds ( difftime,     evapstartdate     ,mythid )
476        call cal_FullDate( ustressstartdate1, ustressstartdate2,           evapstartdate      = modelstart    + evapstartdate
477       &                   ustressstartdate,            mythid )        endif
       call cal_FullDate( vstressstartdate1, vstressstartdate2,  
      &                   vstressstartdate,            mythid )  
478  #endif  #endif
479    
480  #else  #ifdef ALLOW_RUNOFF
481        call cal_FullDate(   hfluxstartdate1,  hfluxstartdate2,        if ( runofffile .NE. ' ' ) then
482       &                     hfluxstartdate,           mythid )           call cal_FullDate  ( runoffstartdate1   ,     runoffstartdate2,
483        call cal_FullDate(   sfluxstartdate1,  sfluxstartdate2,       &        date_array                        ,mythid )
484       &                     sfluxstartdate,           mythid )           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
485        call cal_FullDate( ustressstartdate1, ustressstartdate2,           call cal_ToSeconds ( difftime,   runoffstartdate     ,mythid )
486       &                   ustressstartdate,            mythid )           runoffstartdate    = modelstart  + runoffstartdate
487        call cal_FullDate( vstressstartdate1, vstressstartdate2,        endif
      &                   vstressstartdate,            mythid )  
 #ifdef ALLOW_KPP  
       call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,  
      &                    swfluxstartdate,            mythid )  
488  #endif  #endif
489    
490    #ifdef ALLOW_DOWNWARD_RADIATION
491          if ( swdownfile .NE. ' ' ) then
492             call cal_FullDate  ( swdownstartdate1   ,     swdownstartdate2,
493         &        date_array                        ,mythid )
494             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
495             call cal_ToSeconds ( difftime,   swdownstartdate     ,mythid )
496             swdownstartdate    = modelstart  + swdownstartdate
497          endif
498          if ( lwdownfile .NE. ' ' ) then
499             call cal_FullDate  ( lwdownstartdate1   ,     lwdownstartdate2,
500         &        date_array                        ,mythid )
501             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
502             call cal_ToSeconds ( difftime,   lwdownstartdate     ,mythid )
503             lwdownstartdate    = modelstart  + lwdownstartdate
504          endif
505    #endif
506    
507    #ifdef ATMOSPHERIC_LOADING
508          if ( apressurefile .NE. ' ' ) then
509             call cal_FullDate  ( apressurestartdate1,  apressurestartdate2,
510         &        date_array                        ,mythid )
511             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
512             call cal_ToSeconds ( difftime,  apressurestartdate   ,mythid )
513             apressurestartdate = modelstart + apressurestartdate
514          endif
515  #endif  #endif
516    
517  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
518  #ifdef ALLOW_OBCS_NORTH  #ifdef ALLOW_OBCS_NORTH
519        call cal_FullDate(  obcsNstartdate1,  obcsNstartdate2,        if ( obcsNperiod .NE. 0 ) then
520       &                    obcsNstartdate,           mythid )           call cal_FullDate  ( obcsNstartdate1    ,      obcsNstartdate2,
521         &        date_array                        ,mythid )
522             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
523             call cal_ToSeconds ( difftime,   obcsNstartdate      ,mythid )
524             obcsNstartdate     = modelstart + obcsNstartdate
525          endif
526  #endif  #endif
527  #ifdef ALLOW_OBCS_SOUTH  #ifdef ALLOW_OBCS_SOUTH
528        call cal_FullDate(  obcsSstartdate1,  obcsSstartdate2,        if ( obcsSperiod .NE. 0 ) then
529       &                    obcsSstartdate,           mythid )           call cal_FullDate  ( obcsSstartdate1    ,      obcsSstartdate2,
530         &        date_array                        ,mythid )
531             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
532             call cal_ToSeconds ( difftime,   obcsSstartdate      ,mythid )
533             obcsSstartdate     = modelstart + obcsSstartdate
534          endif
535  #endif  #endif
536  #ifdef ALLOW_OBCS_EAST  #ifdef ALLOW_OBCS_EAST
537        call cal_FullDate(  obcsEstartdate1,  obcsEstartdate2,        if ( obcsEperiod .NE. 0 ) then
538       &                    obcsEstartdate,           mythid )           call cal_FullDate  ( obcsEstartdate1    ,      obcsEstartdate2,
539         &        date_array                        ,mythid )
540             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
541             call cal_ToSeconds ( difftime,   obcsEstartdate      ,mythid )
542             obcsEstartdate     = modelstart + obcsEstartdate
543          endif
544  #endif  #endif
545  #ifdef ALLOW_OBCS_WEST  #ifdef ALLOW_OBCS_WEST
546        call cal_FullDate(  obcsWstartdate1,  obcsWstartdate2,        if ( obcsNperiod .NE. 0 ) then
547       &                    obcsWstartdate,           mythid )           call cal_FullDate  ( obcsWstartdate1    ,      obcsWstartdate2,
548  #endif       &        date_array                        ,mythid )
549  #endif           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
550             call cal_ToSeconds ( difftime,  obcsWstartdate       ,mythid )
551  #ifdef ATMOSPHERIC_LOADING           obcsWstartdate     = modelstart + obcsWstartdate
552        call cal_FullDate(   apressurestartdate1, apressurestartdate2,        endif
      &                     apressurestartdate,          mythid )  
553  #endif  #endif
554    #endif /* ALLOW_OBCS */
555    
556        _END_MASTER( mythid )        _END_MASTER( mythid )
557    
# Line 357  c     check for consistency Line 560  c     check for consistency
560  c--   Summarize the External forcing's setup.  c--   Summarize the External forcing's setup.
561        call exf_summary( mythid )        call exf_summary( mythid )
562    
   
563  c--   set climatology parameters  c--   set climatology parameters
564        call exf_clim_readparms( mythid )        call exf_clim_readparms( mythid )
565    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22