/[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.1 by heimbach, Mon May 14 22:08:41 2001 UTC revision 1.6 by dimitri, Tue Feb 18 05:33:54 2003 UTC
# Line 1  Line 1 
1  c $Header$  c $Header$
2    
3  #include "EXF_CPPOPTIONS.h"  #include "EXF_CPPOPTIONS.h"
4    #ifdef ALLOW_OBCS
5    # include "OBCS_OPTIONS.h"
6    #endif
7    
8          subroutine exf_readparms( mythid )
       subroutine exf_readparms(  
      I                          mythid  
      &                        )  
9    
10  c     ==================================================================  c     ==================================================================
11  c     SUBROUTINE exf_readparms  c     SUBROUTINE exf_readparms
# Line 14  c Line 14  c
14  c     o This routine initialises the package that calculates external  c     o This routine initialises the package that calculates external
15  c       forcing fields for a given timestep of the MITgcmUV. Parameters  c       forcing fields for a given timestep of the MITgcmUV. Parameters
16  c       for this package are set in "data.externalforcing". Some additional  c       for this package are set in "data.externalforcing". Some additional
17  c       precompiler switches have to be specified in "EXF_CPPOPTIONS.h" .  c       precompiler switches have to be specified in "EXF_CPPOPTIONS.h".
18  c  c
19  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
20  c  c
21  c     changed: Christian Eckert eckert@mit.edu  11-Jan-2000  c     changed: Christian Eckert eckert@mit.edu  11-Jan-2000
22  c              - Restructured the code in order to create a package  c              - Restructured the code in order to create a package
23  c                for the MITgcmUV.  c                for the MITgcmUV.
 c  
24  c              Christian Eckert eckert@mit.edu  12-Feb-2000  c              Christian Eckert eckert@mit.edu  12-Feb-2000
25  c              - Changed Routine names (package prefix: exf_)  c              - Changed Routine names (package prefix: exf_)
26  c  c     changed: Patrick Heimbach, heimbach@mit.edu  04-May-2000
 c              Patrick Heimbach, heimbach@mit.edu  04-May-2000  
27  c              - changed the handling of precip and sflux with respect  c              - changed the handling of precip and sflux with respect
28  c                to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP  c                to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
 c  
29  c     changed: Ralf.Giering@FastOpt.de 25-Mai-20000  c     changed: Ralf.Giering@FastOpt.de 25-Mai-20000
30  c              - moved relaxation and climatology stuff to extra routines  c              - moved relaxation and climatology to extra routines
 c  
31  c              Patrick Heimbach, heimbach@mit.edu  04-May-2000  c              Patrick Heimbach, heimbach@mit.edu  04-May-2000
32  c              - added obcs parameters  c              - added obcs parameters
33    c     changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
34    c              - added new obcs parameters (for each boundaries)
35    c     included runoff D. Stammer, Nov. 25, 2001
36    c     included pressure forcing. heimbach@mit.edu 05-Nov-2002
37    c     added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
38    c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
39  c  c
40  c     ==================================================================  c     ==================================================================
41  c     SUBROUTINE exf_readparms  c     SUBROUTINE exf_readparms
# Line 67  c     == end of interface == Line 69  c     == end of interface ==
69    
70  c     Surface flux data.  c     Surface flux data.
71        namelist /exf_nml/        namelist /exf_nml/
72         &    repeatPeriod,
73       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,
74       &    atempstartdate1,    atempstartdate2,   atempperiod,       &    atempstartdate1,    atempstartdate2,   atempperiod,
75       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,
76       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,
77         &     evapstartdate1,     evapstartdate2,    evapperiod,
78       &   precipstartdate1,   precipstartdate2,  precipperiod,       &   precipstartdate1,   precipstartdate2,  precipperiod,
79         &   runoffstartdate1,   runoffstartdate2,  runoffperiod,
80       &  ustressstartdate1,  ustressstartdate2, ustressperiod,       &  ustressstartdate1,  ustressstartdate2, ustressperiod,
81       &  vstressstartdate1,  vstressstartdate2, vstressperiod,       &  vstressstartdate1,  vstressstartdate2, vstressperiod,
82       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,
83       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,
84       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,
85       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,
86       &     obcsstartdate1,     obcsstartdate2,    obcsperiod,       &   swdownstartdate1,   swdownstartdate2,  swdownperiod,
87         &   lwdownstartdate1,   lwdownstartdate2,  lwdownperiod,
88         &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,
89         &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,
90         &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,
91         &    obcsWstartdate1,    obcsWstartdate2,   obcsWperiod,
92         &apressurestartdate1,apressurestartdate2,apressureperiod,
93       &          hfluxfile,          atempfile,       aqhfile,       &          hfluxfile,          atempfile,       aqhfile,
94       &         precipfile,          sfluxfile,   ustressfile,       &          sfluxfile,         precipfile,    runofffile,
95       &        vstressfile,          uwindfile,     vwindfile,       &        ustressfile,        vstressfile,      evapfile,
96       &         swfluxfile,         lwfluxfile,      obcsfile,       &          uwindfile,          vwindfile,
97       &          exf_iprec,         exf_yftype       &         swfluxfile,         lwfluxfile, apressurefile,
98         &         swdownfile,         lwdownfile,
99         &          exf_iprec,         exf_yftype,
100         &     exf_inscal_hfl,     exf_inscal_ust, exf_inscal_vst,
101         &     exf_inscal_swf,     exf_inscal_sst, exf_inscal_sss,
102         &     exf_inscal_sfl,  exf_inscal_runoff,exf_inscal_apressure,
103         &    exf_outscal_hfl,    exf_outscal_ust,exf_outscal_vst,
104         &    exf_outscal_swf,    exf_outscal_sst,exf_outscal_sss,
105         &    exf_outscal_sfl,  exf_outscal_apressure,
106         &     EXFwindOnBgrid
107    
108        _BEGIN_MASTER(mythid)        _BEGIN_MASTER(mythid)
109    
# Line 106  c     Calendar data. Line 126  c     Calendar data.
126        sfluxstartdate2    = 0        sfluxstartdate2    = 0
127        sfluxperiod        = 0.0 _d 0        sfluxperiod        = 0.0 _d 0
128    
129          evapstartdate1   = 0
130          evapstartdate2   = 0
131          evapperiod       = 0.0 _d 0
132    
133        precipstartdate1   = 0        precipstartdate1   = 0
134        precipstartdate2   = 0        precipstartdate2   = 0
135        precipperiod       = 0.0 _d 0        precipperiod       = 0.0 _d 0
136    
137          runoffstartdate1   = 0
138          runoffstartdate2   = 0
139          runoffperiod       = 0.0 _d 0
140    
141        ustressstartdate1  = 0        ustressstartdate1  = 0
142        ustressstartdate2  = 0        ustressstartdate2  = 0
143        ustressperiod      = 0.0 _d 0        ustressperiod      = 0.0 _d 0
# Line 134  c     Calendar data. Line 162  c     Calendar data.
162        lwfluxstartdate2   = 0        lwfluxstartdate2   = 0
163        lwfluxperiod       = 0.0 _d 0        lwfluxperiod       = 0.0 _d 0
164    
165        obcsstartdate1     = 0        swdownstartdate1   = 0
166        obcsstartdate2     = 0        swdownstartdate2   = 0
167        obcsperiod         = 0.0 _d 0        swdownperiod       = 0.0 _d 0
168    
169          lwdownstartdate1   = 0
170          lwdownstartdate2   = 0
171          lwdownperiod       = 0.0 _d 0
172    
173          obcsNstartdate1    = 0
174          obcsNstartdate2    = 0
175          obcsNperiod        = 0.0 _d 0
176    
177          obcsSstartdate1    = 0
178          obcsSstartdate2    = 0
179          obcsSperiod        = 0.0 _d 0
180    
181          obcsEstartdate1    = 0
182          obcsEstartdate2    = 0
183          obcsEperiod        = 0.0 _d 0
184    
185          obcsWstartdate1    = 0
186          obcsWstartdate2    = 0
187          obcsWperiod        = 0.0 _d 0
188    
189          apressurestartdate1    = 0
190          apressurestartdate2    = 0
191          apressureperiod        = 0.0 _d 0
192    
193          repeatPeriod           = 0.0 _d 0
194    
195  c     Data files.  c     Data files.
196        hfluxfile          = ' '        hfluxfile          = ' '
197        atempfile          = ' '        atempfile          = ' '
198        aqhfile            = ' '        aqhfile            = ' '
199          evapfile           = ' '
200        precipfile         = ' '        precipfile         = ' '
201        sfluxfile          = ' '        sfluxfile          = ' '
202          runofffile         = ' '
203        ustressfile        = ' '        ustressfile        = ' '
204        vstressfile        = ' '        vstressfile        = ' '
205        uwindfile          = ' '        uwindfile          = ' '
206        vwindfile          = ' '        vwindfile          = ' '
207        swfluxfile         = ' '        swfluxfile         = ' '
208        lwfluxfile         = ' '        lwfluxfile         = ' '
209        obcsfile           = ' '        swdownfile         = ' '
210          lwdownfile         = ' '
211          apressurefile      = ' '
212    
213  c     Initialise the date arrays.  c     Initialise the date arrays.
214        do i = 1,4        do i = 1,4
215           hfluxstartdate(i)    = 0           hfluxstartdate(i)    = 0
216           atempstartdate(i)    = 0           atempstartdate(i)    = 0
217           aqhstartdate(i)      = 0           aqhstartdate(i)      = 0
218             evapstartdate(i)     = 0
219           precipstartdate(i)   = 0           precipstartdate(i)   = 0
220           sfluxstartdate(i)    = 0           sfluxstartdate(i)    = 0
221             runoffstartdate(i)   = 0
222           ustressstartdate(i)  = 0           ustressstartdate(i)  = 0
223           vstressstartdate(i)  = 0           vstressstartdate(i)  = 0
224           uwindstartdate(i)    = 0           uwindstartdate(i)    = 0
225           vwindstartdate(i)    = 0           vwindstartdate(i)    = 0
226           swfluxstartdate(i)   = 0           swfluxstartdate(i)   = 0
227           lwfluxstartdate(i)   = 0           lwfluxstartdate(i)   = 0
228           obcsstartdate(i)     = 0           swdownstartdate(i)   = 0
229             lwdownstartdate(i)   = 0
230             obcsNstartdate(i)    = 0
231             obcsSstartdate(i)    = 0
232             obcsEstartdate(i)    = 0
233             obcsWstartdate(i)    = 0
234             apressurestartdate(i)= 0
235        enddo        enddo
236    
237  c     Initialise file type and field precision  c     Initialise file type and field precision
238        exf_iprec       = 32        exf_iprec       = 32
239        exf_yftype      = 'RL'        exf_yftype      = 'RL'
240    
241    c     Input scaling factors.
242          exf_inscal_hfl       =  1. _d 0
243          exf_inscal_ust       =  1. _d 0
244          exf_inscal_vst       =  1. _d 0
245          exf_inscal_swf       =  1. _d 0
246          exf_inscal_sst       =  1. _d 0
247          exf_inscal_sss       =  1. _d 0
248          exf_inscal_apressure =  1. _d 0
249          exf_inscal_sfl       =  1. _d 0
250    cds   convert runoff from m/yr to m/s and change sign.
251          exf_inscal_runoff    = -1.0/(86400.*365.0)
252    
253    c     Output scaling factors.
254          exf_outscal_hfl      =  1. _d 0
255          exf_outscal_ust      =  1. _d 0
256          exf_outscal_vst      =  1. _d 0
257          exf_outscal_swf      =  1. _d 0
258          exf_outscal_sst      =  1. _d 0
259          exf_outscal_sss      =  1. _d 0
260          exf_outscal_apressure=  1. _d 0
261          exf_outscal_sfl      =  1. _d 0
262    c
263          EXFwindOnBgrid = .FALSE.
264    
265  c     Check for the availability of the right calendar version.  c     Check for the availability of the right calendar version.
266        if ( calendarversion .ne. usescalendarversion ) then        if ( calendarversion .ne. usescalendarversion ) then
267           print*,' exf_readparms: You are not using the appropriate'           print*,' exf_readparms: You are not using the appropriate'
# Line 206  c     check for consistency Line 296  c     check for consistency
296           stop 'stop in exf_readparms: value of exf_yftype not allowed'           stop 'stop in exf_readparms: value of exf_yftype not allowed'
297        end if        end if
298    
299  #ifdef ALLOW_BULKFORMULAE  #ifdef ALLOW_ATM_WIND
300          call cal_FullDate(    uwindstartdate1,    uwindstartdate2,
301         &                      uwindstartdate ,             mythid )
302          call cal_FullDate(    vwindstartdate1,    vwindstartdate2,
303         &                      vwindstartdate ,             mythid )
304    #else
305          call cal_FullDate(  ustressstartdate1,  ustressstartdate2,
306         &                    ustressstartdate ,             mythid )
307          call cal_FullDate(  vstressstartdate1,  vstressstartdate2,
308         &                    vstressstartdate ,             mythid )
309    #endif
310    
311  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
312        call cal_FullDate(   atempstartdate1,   atempstartdate2,        call cal_FullDate(    atempstartdate1,    atempstartdate2,
313       &                     atempstartdate,            mythid )       &                      atempstartdate ,             mythid )
314        call cal_FullDate(     aqhstartdate1,     aqhstartdate2,        call cal_FullDate(      aqhstartdate1,      aqhstartdate2,
315       &                       aqhstartdate,            mythid )       &                        aqhstartdate ,             mythid )
316        call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,        call cal_FullDate(   lwfluxstartdate1,   lwfluxstartdate2,
317       &                    swfluxstartdate,            mythid )       &                     lwfluxstartdate ,             mythid )
318        call cal_FullDate(  lwfluxstartdate1,  lwfluxstartdate2,        call cal_FullDate(   precipstartdate1,   precipstartdate2,
319       &                    lwfluxstartdate,            mythid )       &                     precipstartdate ,             mythid )
       call cal_FullDate(  precipstartdate1,  precipstartdate2,  
      &                    precipstartdate,            mythid )  
320  #else  #else
321        call cal_FullDate(   hfluxstartdate1,   hfluxstartdate2,        call cal_FullDate(    hfluxstartdate1,    hfluxstartdate2,
322       &                     hfluxstartdate,            mythid )       &                      hfluxstartdate ,             mythid )
323        call cal_FullDate(   sfluxstartdate1,  sfluxstartdate2,        call cal_FullDate(    sfluxstartdate1,    sfluxstartdate2,
324       &                     sfluxstartdate,           mythid )       &                      sfluxstartdate ,             mythid )
 #ifdef ALLOW_KPP  
       call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,  
      &                    swfluxstartdate,            mythid )  
325  #endif  #endif
326    
327    #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
328          call cal_FullDate(   swfluxstartdate1,   swfluxstartdate2,
329         &                     swfluxstartdate ,             mythid )
330  #endif  #endif
331    
332  #ifdef ALLOW_ATM_WIND  #ifdef EXF_READ_EVAP
333        call cal_FullDate(   uwindstartdate1,   uwindstartdate2,        call cal_FullDate(     evapstartdate1,     evapstartdate2,
334       &                     uwindstartdate,            mythid )       &                       evapstartdate ,             mythid )
       call cal_FullDate(   vwindstartdate1,   vwindstartdate2,  
      &                     vwindstartdate,            mythid )  
 #else  
       call cal_FullDate( ustressstartdate1, ustressstartdate2,  
      &                   ustressstartdate,            mythid )  
       call cal_FullDate( vstressstartdate1, vstressstartdate2,  
      &                   vstressstartdate,            mythid )  
335  #endif  #endif
336    
337  #else  #ifdef ALLOW_RUNOFF
338        call cal_FullDate(   hfluxstartdate1,  hfluxstartdate2,        call cal_FullDate(   runoffstartdate1,   runoffstartdate2,
339       &                     hfluxstartdate,           mythid )       &                     runoffstartdate ,             mythid )
       call cal_FullDate(   sfluxstartdate1,  sfluxstartdate2,  
      &                     sfluxstartdate,           mythid )  
       call cal_FullDate( ustressstartdate1, ustressstartdate2,  
      &                   ustressstartdate,            mythid )  
       call cal_FullDate( vstressstartdate1, vstressstartdate2,  
      &                   vstressstartdate,            mythid )  
 #ifdef ALLOW_KPP  
       call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,  
      &                    swfluxstartdate,            mythid )  
340  #endif  #endif
341    
342    #ifdef ALLOW_DOWNWARD_RADIATION
343          call cal_FullDate(   swdownstartdate1,   swdownstartdate2,
344         &                     swdownstartdate ,             mythid )
345          call cal_FullDate(   lwdownstartdate1,   lwdownstartdate2,
346         &                     lwdownstartdate ,             mythid )
347  #endif  #endif
348    
349  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
350        call cal_FullDate(   obcsstartdate1,  obcsstartdate2,  #ifdef ALLOW_OBCS_NORTH
351       &                     obcsstartdate,           mythid )        call cal_FullDate(    obcsNstartdate1,    obcsNstartdate2,
352         &                      obcsNstartdate ,             mythid )
353    #endif
354    #ifdef ALLOW_OBCS_SOUTH
355          call cal_FullDate(    obcsSstartdate1,    obcsSstartdate2,
356         &                      obcsSstartdate ,             mythid )
357    #endif
358    #ifdef ALLOW_OBCS_EAST
359          call cal_FullDate(    obcsEstartdate1,    obcsEstartdate2,
360         &                      obcsEstartdate ,             mythid )
361    #endif
362    #ifdef ALLOW_OBCS_WEST
363          call cal_FullDate(    obcsWstartdate1,    obcsWstartdate2,
364         &                      obcsWstartdate ,             mythid )
365    #endif
366    #endif /* ALLOW_OBCS */
367    
368    #ifdef ATMOSPHERIC_LOADING
369          call cal_FullDate(apressurestartdate1,apressurestartdate2,
370         &                  apressurestartdate ,             mythid )
371  #endif  #endif
372    
373        _END_MASTER( mythid )        _END_MASTER( mythid )
# Line 271  c     check for consistency Line 377  c     check for consistency
377  c--   Summarize the External forcing's setup.  c--   Summarize the External forcing's setup.
378        call exf_summary( mythid )        call exf_summary( mythid )
379    
   
380  c--   set climatology parameters  c--   set climatology parameters
381        call exf_clim_readparms( mythid )        call exf_clim_readparms( mythid )
382    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22