/[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.3 by heimbach, Thu Nov 28 12:55:43 2002 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  c
38  c     ==================================================================  c     ==================================================================
39  c     SUBROUTINE exf_readparms  c     SUBROUTINE exf_readparms
# Line 72  c     Surface flux data. Line 72  c     Surface flux data.
72       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,
73       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,       &    sfluxstartdate1,    sfluxstartdate2,   sfluxperiod,
74       &   precipstartdate1,   precipstartdate2,  precipperiod,       &   precipstartdate1,   precipstartdate2,  precipperiod,
75         &   runoffstartdate1,   runoffstartdate2,  runoffperiod,
76       &  ustressstartdate1,  ustressstartdate2, ustressperiod,       &  ustressstartdate1,  ustressstartdate2, ustressperiod,
77       &  vstressstartdate1,  vstressstartdate2, vstressperiod,       &  vstressstartdate1,  vstressstartdate2, vstressperiod,
78       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,       &    uwindstartdate1,    uwindstartdate2,   uwindperiod,
79       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,       &    vwindstartdate1,    vwindstartdate2,   vwindperiod,
80       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,       &   swfluxstartdate1,   swfluxstartdate2,  swfluxperiod,
81       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,
82       &     obcsstartdate1,     obcsstartdate2,    obcsperiod,       &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,
83         &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,
84         &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,
85         &    obcsWstartdate1,    obcsWstartdate2,   obcsWperiod,
86         &apressurestartdate1,apressurestartdate2,apressureperiod,
87       &          hfluxfile,          atempfile,       aqhfile,       &          hfluxfile,          atempfile,       aqhfile,
88       &         precipfile,          sfluxfile,   ustressfile,       &          sfluxfile,         precipfile,    runofffile,
89       &        vstressfile,          uwindfile,     vwindfile,       &        ustressfile,        vstressfile,
90       &         swfluxfile,         lwfluxfile,      obcsfile,       &          uwindfile,          vwindfile,
91       &          exf_iprec,         exf_yftype       &         swfluxfile,         lwfluxfile, apressurefile,
92         &          exf_iprec,         exf_yftype,
93         &           scal_hfl,           scal_ust,       scal_vst,
94         &           scal_swf,           scal_sst,       scal_sss,
95         &     scal_apressure,           scal_prc,       scal_sfl
96    
97        _BEGIN_MASTER(mythid)        _BEGIN_MASTER(mythid)
98    
# Line 110  c     Calendar data. Line 119  c     Calendar data.
119        precipstartdate2   = 0        precipstartdate2   = 0
120        precipperiod       = 0.0 _d 0        precipperiod       = 0.0 _d 0
121    
122          runoffstartdate1   = 0
123          runoffstartdate2   = 0
124          runoffperiod       = 0.0 _d 0
125    
126        ustressstartdate1  = 0        ustressstartdate1  = 0
127        ustressstartdate2  = 0        ustressstartdate2  = 0
128        ustressperiod      = 0.0 _d 0        ustressperiod      = 0.0 _d 0
# Line 134  c     Calendar data. Line 147  c     Calendar data.
147        lwfluxstartdate2   = 0        lwfluxstartdate2   = 0
148        lwfluxperiod       = 0.0 _d 0        lwfluxperiod       = 0.0 _d 0
149    
150        obcsstartdate1     = 0        obcsNstartdate1    = 0
151        obcsstartdate2     = 0        obcsNstartdate2    = 0
152        obcsperiod         = 0.0 _d 0        obcsNperiod        = 0.0 _d 0
153    
154          obcsSstartdate1    = 0
155          obcsSstartdate2    = 0
156          obcsSperiod        = 0.0 _d 0
157    
158          obcsEstartdate1    = 0
159          obcsEstartdate2    = 0
160          obcsEperiod        = 0.0 _d 0
161    
162          obcsWstartdate1    = 0
163          obcsWstartdate2    = 0
164          obcsWperiod        = 0.0 _d 0
165    
166          apressurestartdate1    = 0
167          apressurestartdate2    = 0
168          apressureperiod        = 0.0 _d 0
169    
170  c     Data files.  c     Data files.
171        hfluxfile          = ' '        hfluxfile          = ' '
# Line 144  c     Data files. Line 173  c     Data files.
173        aqhfile            = ' '        aqhfile            = ' '
174        precipfile         = ' '        precipfile         = ' '
175        sfluxfile          = ' '        sfluxfile          = ' '
176          runofffile         = ' '
177        ustressfile        = ' '        ustressfile        = ' '
178        vstressfile        = ' '        vstressfile        = ' '
179        uwindfile          = ' '        uwindfile          = ' '
180        vwindfile          = ' '        vwindfile          = ' '
181        swfluxfile         = ' '        swfluxfile         = ' '
182        lwfluxfile         = ' '        lwfluxfile         = ' '
183        obcsfile           = ' '        apressurefile      = ' '
184    
185  c     Initialise the date arrays.  c     Initialise the date arrays.
186        do i = 1,4        do i = 1,4
# Line 159  c     Initialise the date arrays. Line 189  c     Initialise the date arrays.
189           aqhstartdate(i)      = 0           aqhstartdate(i)      = 0
190           precipstartdate(i)   = 0           precipstartdate(i)   = 0
191           sfluxstartdate(i)    = 0           sfluxstartdate(i)    = 0
192             runoffstartdate(i)   = 0
193           ustressstartdate(i)  = 0           ustressstartdate(i)  = 0
194           vstressstartdate(i)  = 0           vstressstartdate(i)  = 0
195           uwindstartdate(i)    = 0           uwindstartdate(i)    = 0
196           vwindstartdate(i)    = 0           vwindstartdate(i)    = 0
197           swfluxstartdate(i)   = 0           swfluxstartdate(i)   = 0
198           lwfluxstartdate(i)   = 0           lwfluxstartdate(i)   = 0
199           obcsstartdate(i)     = 0           obcsNstartdate(i)    = 0
200             obcsSstartdate(i)    = 0
201             obcsEstartdate(i)    = 0
202             obcsWstartdate(i)    = 0
203             apressurestartdate(i)= 0
204        enddo        enddo
205    
206  c     Initialise file type and field precision  c     Initialise file type and field precision
207        exf_iprec       = 32        exf_iprec       = 32
208        exf_yftype      = 'RL'        exf_yftype      = 'RL'
209    
210    c     scaling between exf units and MITgcm units
211          scal_hfl       =  1. _d 0
212          scal_ust       =  1. _d 0
213          scal_vst       =  1. _d 0
214          scal_swf       =  1. _d 0
215          scal_sst       =  1. _d 0
216          scal_sss       =  1. _d 0
217          scal_apressure =  1. _d 0
218    #if (defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_TEMP))
219          scal_prc       =  1. _d 0
220    #else
221          scal_sfl       =  1. _d 0    
222    #endif
223    
224  c     Check for the availability of the right calendar version.  c     Check for the availability of the right calendar version.
225        if ( calendarversion .ne. usescalendarversion ) then        if ( calendarversion .ne. usescalendarversion ) then
226           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 255  c     check for consistency
255           stop 'stop in exf_readparms: value of exf_yftype not allowed'           stop 'stop in exf_readparms: value of exf_yftype not allowed'
256        end if        end if
257    
258    #ifdef ALLOW_RUNOFF
259          call cal_FullDate(  runoffstartdate1,  runoffstartdate2,
260         &                    runoffstartdate,            mythid )
261    #endif
262    
263  #ifdef ALLOW_BULKFORMULAE  #ifdef ALLOW_BULKFORMULAE
264    
265  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
# Line 260  c     check for consistency Line 314  c     check for consistency
314  #endif  #endif
315    
316  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
317        call cal_FullDate(   obcsstartdate1,  obcsstartdate2,  #ifdef ALLOW_OBCS_NORTH
318       &                     obcsstartdate,           mythid )        call cal_FullDate(  obcsNstartdate1,  obcsNstartdate2,
319         &                    obcsNstartdate,           mythid )
320    #endif
321    #ifdef ALLOW_OBCS_SOUTH
322          call cal_FullDate(  obcsSstartdate1,  obcsSstartdate2,
323         &                    obcsSstartdate,           mythid )
324    #endif
325    #ifdef ALLOW_OBCS_EAST
326          call cal_FullDate(  obcsEstartdate1,  obcsEstartdate2,
327         &                    obcsEstartdate,           mythid )
328    #endif
329    #ifdef ALLOW_OBCS_WEST
330          call cal_FullDate(  obcsWstartdate1,  obcsWstartdate2,
331         &                    obcsWstartdate,           mythid )
332    #endif
333    #endif
334    
335    #ifdef ATMOSPHERIC_LOADING
336          call cal_FullDate(   apressurestartdate1, apressurestartdate2,
337         &                     apressurestartdate,          mythid )
338  #endif  #endif
339    
340        _END_MASTER( mythid )        _END_MASTER( mythid )

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

  ViewVC Help
Powered by ViewVC 1.1.22