/[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.1.6.5 by dimitri, Fri Feb 14 23:10:35 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     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
38  c  c
39  c     ==================================================================  c     ==================================================================
40  c     SUBROUTINE exf_readparms  c     SUBROUTINE exf_readparms
# Line 71  c     Surface flux data. Line 72  c     Surface flux data.
72       &    atempstartdate1,    atempstartdate2,   atempperiod,       &    atempstartdate1,    atempstartdate2,   atempperiod,
73       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,
74       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,
75         &     evapstartdate1,     evapstartdate2,    evapperiod,
76       &   precipstartdate1,   precipstartdate2,  precipperiod,       &   precipstartdate1,   precipstartdate2,  precipperiod,
77         &   runoffstartdate1,   runoffstartdate2,  runoffperiod,
78       &  ustressstartdate1,  ustressstartdate2, ustressperiod,       &  ustressstartdate1,  ustressstartdate2, ustressperiod,
79       &  vstressstartdate1,  vstressstartdate2, vstressperiod,       &  vstressstartdate1,  vstressstartdate2, vstressperiod,
80       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,
81       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,
82       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,
83       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,
84       &     obcsstartdate1,     obcsstartdate2,    obcsperiod,       &   swdownstartdate1,   swdownstartdate2,  swdownperiod,
85         &   lwdownstartdate1,   lwdownstartdate2,  lwdownperiod,
86         &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,
87         &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,
88         &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,
89         &    obcsWstartdate1,    obcsWstartdate2,   obcsWperiod,
90         &apressurestartdate1,apressurestartdate2,apressureperiod,
91       &          hfluxfile,          atempfile,       aqhfile,       &          hfluxfile,          atempfile,       aqhfile,
92       &         precipfile,          sfluxfile,   ustressfile,       &          sfluxfile,         precipfile,    runofffile,
93       &        vstressfile,          uwindfile,     vwindfile,       &        ustressfile,        vstressfile,      evapfile,
94       &         swfluxfile,         lwfluxfile,      obcsfile,       &          uwindfile,          vwindfile,
95       &          exf_iprec,         exf_yftype       &         swfluxfile,         lwfluxfile, apressurefile,
96         &         swdownfile,         lwdownfile,
97         &          exf_iprec,         exf_yftype,
98         &     exf_inscal_hfl,     exf_inscal_ust, exf_inscal_vst,
99         &     exf_inscal_swf,     exf_inscal_sst, exf_inscal_sss,
100         &     exf_inscal_sfl,  exf_inscal_runoff,exf_inscal_apressure,
101         &    exf_outscal_hfl,    exf_outscal_ust,exf_outscal_vst,
102         &    exf_outscal_swf,    exf_outscal_sst,exf_outscal_sss,
103         &    exf_outscal_sfl,  exf_outscal_apressure,
104         &     EXFwindOnBgrid
105    
106        _BEGIN_MASTER(mythid)        _BEGIN_MASTER(mythid)
107    
# Line 106  c     Calendar data. Line 124  c     Calendar data.
124        sfluxstartdate2    = 0        sfluxstartdate2    = 0
125        sfluxperiod        = 0.0 _d 0        sfluxperiod        = 0.0 _d 0
126    
127          evapstartdate1   = 0
128          evapstartdate2   = 0
129          evapperiod       = 0.0 _d 0
130    
131        precipstartdate1   = 0        precipstartdate1   = 0
132        precipstartdate2   = 0        precipstartdate2   = 0
133        precipperiod       = 0.0 _d 0        precipperiod       = 0.0 _d 0
134    
135          runoffstartdate1   = 0
136          runoffstartdate2   = 0
137          runoffperiod       = 0.0 _d 0
138    
139        ustressstartdate1  = 0        ustressstartdate1  = 0
140        ustressstartdate2  = 0        ustressstartdate2  = 0
141        ustressperiod      = 0.0 _d 0        ustressperiod      = 0.0 _d 0
# Line 134  c     Calendar data. Line 160  c     Calendar data.
160        lwfluxstartdate2   = 0        lwfluxstartdate2   = 0
161        lwfluxperiod       = 0.0 _d 0        lwfluxperiod       = 0.0 _d 0
162    
163        obcsstartdate1     = 0        swdownstartdate1   = 0
164        obcsstartdate2     = 0        swdownstartdate2   = 0
165        obcsperiod         = 0.0 _d 0        swdownperiod       = 0.0 _d 0
166    
167          lwdownstartdate1   = 0
168          lwdownstartdate2   = 0
169          lwdownperiod       = 0.0 _d 0
170    
171          obcsNstartdate1    = 0
172          obcsNstartdate2    = 0
173          obcsNperiod        = 0.0 _d 0
174    
175          obcsSstartdate1    = 0
176          obcsSstartdate2    = 0
177          obcsSperiod        = 0.0 _d 0
178    
179          obcsEstartdate1    = 0
180          obcsEstartdate2    = 0
181          obcsEperiod        = 0.0 _d 0
182    
183          obcsWstartdate1    = 0
184          obcsWstartdate2    = 0
185          obcsWperiod        = 0.0 _d 0
186    
187          apressurestartdate1    = 0
188          apressurestartdate2    = 0
189          apressureperiod        = 0.0 _d 0
190    
191  c     Data files.  c     Data files.
192        hfluxfile          = ' '        hfluxfile          = ' '
193        atempfile          = ' '        atempfile          = ' '
194        aqhfile            = ' '        aqhfile            = ' '
195          evapfile           = ' '
196        precipfile         = ' '        precipfile         = ' '
197        sfluxfile          = ' '        sfluxfile          = ' '
198          runofffile         = ' '
199        ustressfile        = ' '        ustressfile        = ' '
200        vstressfile        = ' '        vstressfile        = ' '
201        uwindfile          = ' '        uwindfile          = ' '
202        vwindfile          = ' '        vwindfile          = ' '
203        swfluxfile         = ' '        swfluxfile         = ' '
204        lwfluxfile         = ' '        lwfluxfile         = ' '
205        obcsfile           = ' '        swdownfile         = ' '
206          lwdownfile         = ' '
207          apressurefile      = ' '
208    
209  c     Initialise the date arrays.  c     Initialise the date arrays.
210        do i = 1,4        do i = 1,4
211           hfluxstartdate(i)    = 0           hfluxstartdate(i)    = 0
212           atempstartdate(i)    = 0           atempstartdate(i)    = 0
213           aqhstartdate(i)      = 0           aqhstartdate(i)      = 0
214             evapstartdate(i)     = 0
215           precipstartdate(i)   = 0           precipstartdate(i)   = 0
216           sfluxstartdate(i)    = 0           sfluxstartdate(i)    = 0
217             runoffstartdate(i)   = 0
218           ustressstartdate(i)  = 0           ustressstartdate(i)  = 0
219           vstressstartdate(i)  = 0           vstressstartdate(i)  = 0
220           uwindstartdate(i)    = 0           uwindstartdate(i)    = 0
221           vwindstartdate(i)    = 0           vwindstartdate(i)    = 0
222           swfluxstartdate(i)   = 0           swfluxstartdate(i)   = 0
223           lwfluxstartdate(i)   = 0           lwfluxstartdate(i)   = 0
224           obcsstartdate(i)     = 0           swdownstartdate(i)   = 0
225             lwdownstartdate(i)   = 0
226             obcsNstartdate(i)    = 0
227             obcsSstartdate(i)    = 0
228             obcsEstartdate(i)    = 0
229             obcsWstartdate(i)    = 0
230             apressurestartdate(i)= 0
231        enddo        enddo
232    
233  c     Initialise file type and field precision  c     Initialise file type and field precision
234        exf_iprec       = 32        exf_iprec       = 32
235        exf_yftype      = 'RL'        exf_yftype      = 'RL'
236    
237    c     Input scaling factors.
238          exf_inscal_hfl       =  1. _d 0
239          exf_inscal_ust       =  1. _d 0
240          exf_inscal_vst       =  1. _d 0
241          exf_inscal_swf       =  1. _d 0
242          exf_inscal_sst       =  1. _d 0
243          exf_inscal_sss       =  1. _d 0
244          exf_inscal_apressure =  1. _d 0
245          exf_inscal_sfl       =  1. _d 0
246    cds   convert runoff from m/yr to m/s and change sign.
247          exf_inscal_runoff    = -1.0/(86400.*365.0)
248    
249    c     Output scaling factors.
250          exf_outscal_hfl      =  1. _d 0
251          exf_outscal_ust      =  1. _d 0
252          exf_outscal_vst      =  1. _d 0
253          exf_outscal_swf      =  1. _d 0
254          exf_outscal_sst      =  1. _d 0
255          exf_outscal_sss      =  1. _d 0
256          exf_outscal_apressure=  1. _d 0
257          exf_outscal_sfl      =  1. _d 0
258    c
259          EXFwindOnBgrid = .FALSE.
260    
261  c     Check for the availability of the right calendar version.  c     Check for the availability of the right calendar version.
262        if ( calendarversion .ne. usescalendarversion ) then        if ( calendarversion .ne. usescalendarversion ) then
263           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 292  c     check for consistency
292           stop 'stop in exf_readparms: value of exf_yftype not allowed'           stop 'stop in exf_readparms: value of exf_yftype not allowed'
293        end if        end if
294    
295  #ifdef ALLOW_BULKFORMULAE  #ifdef ALLOW_ATM_WIND
296          call cal_FullDate(    uwindstartdate1,    uwindstartdate2,
297         &                      uwindstartdate ,             mythid )
298          call cal_FullDate(    vwindstartdate1,    vwindstartdate2,
299         &                      vwindstartdate ,             mythid )
300    #else
301          call cal_FullDate(  ustressstartdate1,  ustressstartdate2,
302         &                    ustressstartdate ,             mythid )
303          call cal_FullDate(  vstressstartdate1,  vstressstartdate2,
304         &                    vstressstartdate ,             mythid )
305    #endif
306    
307  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
308        call cal_FullDate(   atempstartdate1,   atempstartdate2,        call cal_FullDate(    atempstartdate1,    atempstartdate2,
309       &                     atempstartdate,            mythid )       &                      atempstartdate ,             mythid )
310        call cal_FullDate(     aqhstartdate1,     aqhstartdate2,        call cal_FullDate(      aqhstartdate1,      aqhstartdate2,
311       &                       aqhstartdate,            mythid )       &                        aqhstartdate ,             mythid )
312        call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,        call cal_FullDate(   lwfluxstartdate1,   lwfluxstartdate2,
313       &                    swfluxstartdate,            mythid )       &                     lwfluxstartdate ,             mythid )
314        call cal_FullDate(  lwfluxstartdate1,  lwfluxstartdate2,        call cal_FullDate(   precipstartdate1,   precipstartdate2,
315       &                    lwfluxstartdate,            mythid )       &                     precipstartdate ,             mythid )
       call cal_FullDate(  precipstartdate1,  precipstartdate2,  
      &                    precipstartdate,            mythid )  
316  #else  #else
317        call cal_FullDate(   hfluxstartdate1,   hfluxstartdate2,        call cal_FullDate(    hfluxstartdate1,    hfluxstartdate2,
318       &                     hfluxstartdate,            mythid )       &                      hfluxstartdate ,             mythid )
319        call cal_FullDate(   sfluxstartdate1,  sfluxstartdate2,        call cal_FullDate(    sfluxstartdate1,    sfluxstartdate2,
320       &                     sfluxstartdate,           mythid )       &                      sfluxstartdate ,             mythid )
 #ifdef ALLOW_KPP  
       call cal_FullDate(  swfluxstartdate1,  swfluxstartdate2,  
      &                    swfluxstartdate,            mythid )  
321  #endif  #endif
322    
323    #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
324          call cal_FullDate(   swfluxstartdate1,   swfluxstartdate2,
325         &                     swfluxstartdate ,             mythid )
326  #endif  #endif
327    
328  #ifdef ALLOW_ATM_WIND  #ifdef EXF_READ_EVAP
329        call cal_FullDate(   uwindstartdate1,   uwindstartdate2,        call cal_FullDate(     evapstartdate1,     evapstartdate2,
330       &                     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 )  
331  #endif  #endif
332    
333  #else  #ifdef ALLOW_RUNOFF
334        call cal_FullDate(   hfluxstartdate1,  hfluxstartdate2,        call cal_FullDate(   runoffstartdate1,   runoffstartdate2,
335       &                     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 )  
336  #endif  #endif
337    
338    #ifdef ALLOW_DOWNWARD_RADIATION
339          call cal_FullDate(   swdownstartdate1,   swdownstartdate2,
340         &                     swdownstartdate ,             mythid )
341          call cal_FullDate(   lwdownstartdate1,   lwdownstartdate2,
342         &                     lwdownstartdate ,             mythid )
343  #endif  #endif
344    
345  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
346        call cal_FullDate(   obcsstartdate1,  obcsstartdate2,  #ifdef ALLOW_OBCS_NORTH
347       &                     obcsstartdate,           mythid )        call cal_FullDate(    obcsNstartdate1,    obcsNstartdate2,
348         &                      obcsNstartdate ,             mythid )
349    #endif
350    #ifdef ALLOW_OBCS_SOUTH
351          call cal_FullDate(    obcsSstartdate1,    obcsSstartdate2,
352         &                      obcsSstartdate ,             mythid )
353    #endif
354    #ifdef ALLOW_OBCS_EAST
355          call cal_FullDate(    obcsEstartdate1,    obcsEstartdate2,
356         &                      obcsEstartdate ,             mythid )
357    #endif
358    #ifdef ALLOW_OBCS_WEST
359          call cal_FullDate(    obcsWstartdate1,    obcsWstartdate2,
360         &                      obcsWstartdate ,             mythid )
361    #endif
362    #endif /* ALLOW_OBCS */
363    
364    #ifdef ATMOSPHERIC_LOADING
365          call cal_FullDate(apressurestartdate1,apressurestartdate2,
366         &                  apressurestartdate ,             mythid )
367  #endif  #endif
368    
369        _END_MASTER( mythid )        _END_MASTER( mythid )
# Line 271  c     check for consistency Line 373  c     check for consistency
373  c--   Summarize the External forcing's setup.  c--   Summarize the External forcing's setup.
374        call exf_summary( mythid )        call exf_summary( mythid )
375    
   
376  c--   set climatology parameters  c--   set climatology parameters
377        call exf_clim_readparms( mythid )        call exf_clim_readparms( mythid )
378    

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

  ViewVC Help
Powered by ViewVC 1.1.22