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

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

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


Revision 1.6 - (hide annotations) (download)
Tue Feb 18 05:33:54 2003 UTC (21 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint48i_post, checkpoint48f_post, checkpoint48h_post, checkpoint48g_post
Changes since 1.5: +94 -75 lines
Merging from release1_p12:
o Modifications for using pkg/exf with pkg/seaice
  - improved description of the various forcing configurations
  - added basic radiation bulk formulae to pkg/exf
  - units/sign fix for evap computation in exf_getffields.F
  - updated verification/global_with_exf/results/output.txt
o Added pkg/sbo for computing IERS Special Bureau for the Oceans
  (SBO) core products, including oceanic mass, center-of-mass,
  angular, and bottom pressure (see pkg/sbo/README.sbo).
o Lower bound for viscosity/diffusivity in pkg/kpp/kpp_routines.F
  to avoid negative values in shallow regions.
  - updated verification/natl_box/results/output.txt
  - updated verification/lab_sea/results/output.txt
o MPI gather, scatter: eesupp/src/gather_2d.F and scatter_2d.F
o Added useSingleCpuIO option (see PARAMS.h).
o Updated useSingleCpuIO option in mdsio_writefield.F to
  work with multi-field files, e.g., for single-file pickup.
o pkg/seaice:
  - bug fix in growth.F: QNET for no shortwave case
  - added HeffFile for specifying initial sea-ice thickness
  - changed SEAICE_EXTERNAL_FLUXES wind stress implementation
o Added missing /* */ to CPP comments in pkg/seaice, pkg/exf,
  kpp_transport_t.F, forward_step.F, and the_main_loop.F
o pkg/seaice:
  - adjoint-friendly modifications
  - added a SEAICE_WRITE_PICKUP at end of the_model_main.F

1 dimitri 1.6 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.5 2002/12/28 10:11:11 dimitri Exp $
2 heimbach 1.1
3     #include "EXF_CPPOPTIONS.h"
4 heimbach 1.3 #ifdef ALLOW_OBCS
5     # include "OBCS_OPTIONS.h"
6     #endif
7 heimbach 1.1
8 heimbach 1.3 subroutine exf_readparms( mythid )
9 heimbach 1.1
10     c ==================================================================
11     c SUBROUTINE exf_readparms
12     c ==================================================================
13     c
14     c o This routine initialises the package that calculates external
15     c forcing fields for a given timestep of the MITgcmUV. Parameters
16     c for this package are set in "data.externalforcing". Some additional
17 heimbach 1.2 c precompiler switches have to be specified in "EXF_CPPOPTIONS.h".
18 heimbach 1.1 c
19     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
20     c
21     c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
22     c - Restructured the code in order to create a package
23     c for the MITgcmUV.
24     c Christian Eckert eckert@mit.edu 12-Feb-2000
25     c - Changed Routine names (package prefix: exf_)
26 heimbach 1.2 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
27 heimbach 1.1 c - changed the handling of precip and sflux with respect
28     c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
29     c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
30 heimbach 1.2 c - moved relaxation and climatology to extra routines
31 heimbach 1.1 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
32     c - added obcs parameters
33 heimbach 1.2 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
34     c - added new obcs parameters (for each boundaries)
35 heimbach 1.3 c included runoff D. Stammer, Nov. 25, 2001
36     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
37 dimitri 1.5 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
38 dimitri 1.6 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
39 heimbach 1.1 c
40     c ==================================================================
41     c SUBROUTINE exf_readparms
42     c ==================================================================
43    
44     implicit none
45    
46     c == global variables ==
47    
48     #include "EEPARAMS.h"
49     #include "SIZE.h"
50     #include "cal.h"
51     #include "exf.h"
52     #include "exf_param.h"
53     #include "exf_constants.h"
54    
55     c == routine arguments ==
56    
57     integer mythid
58    
59     c == local variables ==
60    
61     integer i
62    
63     c == external ==
64    
65     integer ilnblnk
66     external ilnblnk
67    
68     c == end of interface ==
69    
70     c Surface flux data.
71     namelist /exf_nml/
72 cheisey 1.4 & repeatPeriod,
73 heimbach 1.1 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
74     & atempstartdate1, atempstartdate2, atempperiod,
75     & aqhstartdate1, aqhstartdate2, aqhperiod,
76     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
77 dimitri 1.5 & evapstartdate1, evapstartdate2, evapperiod,
78 heimbach 1.1 & precipstartdate1, precipstartdate2, precipperiod,
79 heimbach 1.3 & runoffstartdate1, runoffstartdate2, runoffperiod,
80 heimbach 1.1 & ustressstartdate1, ustressstartdate2, ustressperiod,
81     & vstressstartdate1, vstressstartdate2, vstressperiod,
82     & uwindstartdate1, uwindstartdate2, uwindperiod,
83     & vwindstartdate1, vwindstartdate2, vwindperiod,
84     & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
85     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
86 dimitri 1.6 & swdownstartdate1, swdownstartdate2, swdownperiod,
87     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
88 heimbach 1.2 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
89     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
90     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
91     & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
92 heimbach 1.3 &apressurestartdate1,apressurestartdate2,apressureperiod,
93 heimbach 1.1 & hfluxfile, atempfile, aqhfile,
94 heimbach 1.3 & sfluxfile, precipfile, runofffile,
95 dimitri 1.5 & ustressfile, vstressfile, evapfile,
96 heimbach 1.3 & uwindfile, vwindfile,
97     & swfluxfile, lwfluxfile, apressurefile,
98 dimitri 1.6 & swdownfile, lwdownfile,
99 heimbach 1.3 & exf_iprec, exf_yftype,
100 dimitri 1.6 & 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 heimbach 1.1
108     _BEGIN_MASTER(mythid)
109    
110     c Set default values.
111    
112     c Calendar data.
113     hfluxstartdate1 = 0
114     hfluxstartdate2 = 0
115     hfluxperiod = 0.0 _d 0
116    
117     atempstartdate1 = 0
118     atempstartdate2 = 0
119     atempperiod = 0.0 _d 0
120    
121     aqhstartdate1 = 0
122     aqhstartdate2 = 0
123     aqhperiod = 0.0 _d 0
124    
125     sfluxstartdate1 = 0
126     sfluxstartdate2 = 0
127     sfluxperiod = 0.0 _d 0
128    
129 dimitri 1.5 evapstartdate1 = 0
130     evapstartdate2 = 0
131     evapperiod = 0.0 _d 0
132    
133 heimbach 1.1 precipstartdate1 = 0
134     precipstartdate2 = 0
135     precipperiod = 0.0 _d 0
136    
137 heimbach 1.3 runoffstartdate1 = 0
138     runoffstartdate2 = 0
139     runoffperiod = 0.0 _d 0
140    
141 heimbach 1.1 ustressstartdate1 = 0
142     ustressstartdate2 = 0
143     ustressperiod = 0.0 _d 0
144    
145     vstressstartdate1 = 0
146     vstressstartdate2 = 0
147     vstressperiod = 0.0 _d 0
148    
149     uwindstartdate1 = 0
150     uwindstartdate2 = 0
151     uwindperiod = 0.0 _d 0
152    
153     vwindstartdate1 = 0
154     vwindstartdate2 = 0
155     vwindperiod = 0.0 _d 0
156    
157     swfluxstartdate1 = 0
158     swfluxstartdate2 = 0
159     swfluxperiod = 0.0 _d 0
160    
161     lwfluxstartdate1 = 0
162     lwfluxstartdate2 = 0
163     lwfluxperiod = 0.0 _d 0
164    
165 dimitri 1.6 swdownstartdate1 = 0
166     swdownstartdate2 = 0
167     swdownperiod = 0.0 _d 0
168    
169     lwdownstartdate1 = 0
170     lwdownstartdate2 = 0
171     lwdownperiod = 0.0 _d 0
172    
173 heimbach 1.2 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 heimbach 1.1
189 heimbach 1.3 apressurestartdate1 = 0
190     apressurestartdate2 = 0
191     apressureperiod = 0.0 _d 0
192 cheisey 1.4
193     repeatPeriod = 0.0 _d 0
194    
195 heimbach 1.1 c Data files.
196     hfluxfile = ' '
197     atempfile = ' '
198     aqhfile = ' '
199 dimitri 1.5 evapfile = ' '
200 heimbach 1.1 precipfile = ' '
201     sfluxfile = ' '
202 heimbach 1.3 runofffile = ' '
203 heimbach 1.1 ustressfile = ' '
204     vstressfile = ' '
205     uwindfile = ' '
206     vwindfile = ' '
207     swfluxfile = ' '
208     lwfluxfile = ' '
209 dimitri 1.6 swdownfile = ' '
210     lwdownfile = ' '
211 heimbach 1.3 apressurefile = ' '
212 heimbach 1.1
213     c Initialise the date arrays.
214     do i = 1,4
215     hfluxstartdate(i) = 0
216     atempstartdate(i) = 0
217     aqhstartdate(i) = 0
218 dimitri 1.5 evapstartdate(i) = 0
219 heimbach 1.1 precipstartdate(i) = 0
220     sfluxstartdate(i) = 0
221 heimbach 1.3 runoffstartdate(i) = 0
222 heimbach 1.1 ustressstartdate(i) = 0
223     vstressstartdate(i) = 0
224     uwindstartdate(i) = 0
225     vwindstartdate(i) = 0
226     swfluxstartdate(i) = 0
227     lwfluxstartdate(i) = 0
228 dimitri 1.6 swdownstartdate(i) = 0
229     lwdownstartdate(i) = 0
230 heimbach 1.2 obcsNstartdate(i) = 0
231     obcsSstartdate(i) = 0
232     obcsEstartdate(i) = 0
233     obcsWstartdate(i) = 0
234 heimbach 1.3 apressurestartdate(i)= 0
235 heimbach 1.1 enddo
236    
237     c Initialise file type and field precision
238     exf_iprec = 32
239     exf_yftype = 'RL'
240    
241 dimitri 1.6 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 heimbach 1.3
265 heimbach 1.1 c Check for the availability of the right calendar version.
266     if ( calendarversion .ne. usescalendarversion ) then
267     print*,' exf_readparms: You are not using the appropriate'
268     print*,' version of the calendar package.'
269     print*
270     print*,' You are using Calendar version: ', calendarversion
271     print*,' Please use Calendar version: ', usescalendarversion
272     stop ' stopped in exf_readparms.'
273     endif
274    
275     c Next, read the forcing data file.
276     call nml_filter( 'data.exf', scrunit1, myThid )
277     if (scrunit1 .eq. 0) then
278     stop 'exf_readparms: reading namelist failed'
279     end if
280     read( scrunit1, nml = exf_nml )
281     close( scrunit1 )
282    
283     c Complete the start date specifications for the forcing
284     c fields to get a complete calendar date array.
285    
286     c check for consistency
287    
288     if (.NOT.
289     & (exf_iprec .EQ. 32 .OR. exf_iprec .EQ. 64)
290     & ) then
291     stop 'stop in exf_readparms: value of exf_iprec not allowed'
292     else if (.NOT.
293     & (exf_yftype .EQ. 'RS' .OR.
294     & exf_yftype .EQ. 'RL')
295     & ) then
296     stop 'stop in exf_readparms: value of exf_yftype not allowed'
297     end if
298 dimitri 1.5
299 dimitri 1.6 #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 heimbach 1.3 #endif
310    
311 heimbach 1.1 #ifdef ALLOW_ATM_TEMP
312 dimitri 1.6 call cal_FullDate( atempstartdate1, atempstartdate2,
313     & atempstartdate , mythid )
314     call cal_FullDate( aqhstartdate1, aqhstartdate2,
315     & aqhstartdate , mythid )
316     call cal_FullDate( lwfluxstartdate1, lwfluxstartdate2,
317     & lwfluxstartdate , mythid )
318     call cal_FullDate( precipstartdate1, precipstartdate2,
319     & precipstartdate , mythid )
320 heimbach 1.1 #else
321 dimitri 1.6 call cal_FullDate( hfluxstartdate1, hfluxstartdate2,
322     & hfluxstartdate , mythid )
323     call cal_FullDate( sfluxstartdate1, sfluxstartdate2,
324     & sfluxstartdate , mythid )
325 heimbach 1.1 #endif
326    
327 dimitri 1.6 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
328     call cal_FullDate( swfluxstartdate1, swfluxstartdate2,
329     & swfluxstartdate , mythid )
330 heimbach 1.1 #endif
331    
332 dimitri 1.6 #ifdef EXF_READ_EVAP
333     call cal_FullDate( evapstartdate1, evapstartdate2,
334     & evapstartdate , mythid )
335 heimbach 1.1 #endif
336    
337 dimitri 1.6 #ifdef ALLOW_RUNOFF
338     call cal_FullDate( runoffstartdate1, runoffstartdate2,
339     & runoffstartdate , mythid )
340 heimbach 1.1 #endif
341    
342 dimitri 1.6 #ifdef ALLOW_DOWNWARD_RADIATION
343     call cal_FullDate( swdownstartdate1, swdownstartdate2,
344     & swdownstartdate , mythid )
345     call cal_FullDate( lwdownstartdate1, lwdownstartdate2,
346     & lwdownstartdate , mythid )
347 heimbach 1.1 #endif
348    
349     #ifdef ALLOW_OBCS
350 heimbach 1.2 #ifdef ALLOW_OBCS_NORTH
351 dimitri 1.6 call cal_FullDate( obcsNstartdate1, obcsNstartdate2,
352     & obcsNstartdate , mythid )
353 heimbach 1.2 #endif
354     #ifdef ALLOW_OBCS_SOUTH
355 dimitri 1.6 call cal_FullDate( obcsSstartdate1, obcsSstartdate2,
356     & obcsSstartdate , mythid )
357 heimbach 1.2 #endif
358     #ifdef ALLOW_OBCS_EAST
359 dimitri 1.6 call cal_FullDate( obcsEstartdate1, obcsEstartdate2,
360     & obcsEstartdate , mythid )
361 heimbach 1.2 #endif
362     #ifdef ALLOW_OBCS_WEST
363 dimitri 1.6 call cal_FullDate( obcsWstartdate1, obcsWstartdate2,
364     & obcsWstartdate , mythid )
365 heimbach 1.3 #endif
366 dimitri 1.6 #endif /* ALLOW_OBCS */
367 heimbach 1.3
368     #ifdef ATMOSPHERIC_LOADING
369 dimitri 1.6 call cal_FullDate(apressurestartdate1,apressurestartdate2,
370     & apressurestartdate , mythid )
371 heimbach 1.1 #endif
372    
373     _END_MASTER( mythid )
374    
375     _BARRIER
376    
377     c-- Summarize the External forcing's setup.
378     call exf_summary( mythid )
379    
380     c-- set climatology parameters
381     call exf_clim_readparms( mythid )
382    
383     c-- summarize climatologic forcing configuration
384     call exf_clim_summary( mythid )
385    
386     end

  ViewVC Help
Powered by ViewVC 1.1.22