/[MITgcm]/MITgcm_contrib/ecco_darwin/v3_cs510_Brix/code/exf_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/ecco_darwin/v3_cs510_Brix/code/exf_readparms.F

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


Revision 1.1 - (hide annotations) (download)
Tue Nov 28 19:50:42 2017 UTC (7 years, 8 months ago) by dimitri
Branch: MAIN
CVS Tags: HEAD
Holger Brix's ECCO-Darwin version 3 with circa-2011 MITgcm

1 dimitri 1.1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.64 2011/01/25 22:40:41 jmc Exp $
2     C $Name: $
3    
4     #include "EXF_OPTIONS.h"
5    
6     SUBROUTINE EXF_READPARMS( myThid )
7    
8     c ==================================================================
9     c SUBROUTINE exf_readparms
10     c ==================================================================
11     c
12     c o This routine initialises the package that calculates external
13     c forcing fields for a given timestep of the MITgcmUV. Parameters
14     c for this package are set in "data.externalforcing". Some additional
15     c precompiler switches have to be specified in "EXF_OPTIONS.h".
16     c
17     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
18     c
19     c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
20     c - Restructured the code in order to create a package
21     c for the MITgcmUV.
22     c Christian Eckert eckert@mit.edu 12-Feb-2000
23     c - Changed Routine names (package prefix: exf_)
24     c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
25     c - changed the handling of precip and sflux with respect
26     c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
27     c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
28     c - moved relaxation and climatology to extra routines
29     c Patrick Heimbach, heimbach@mit.edu 04-May-2000
30     c - added obcs parameters
31     c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
32     c - added new obcs parameters (for each boundaries)
33     c included runoff D. Stammer, Nov. 25, 2001
34     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
35     c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
36     c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
37     c
38     c ==================================================================
39     c SUBROUTINE exf_readparms
40     c ==================================================================
41    
42     implicit none
43    
44     c == global variables ==
45    
46     #include "EEPARAMS.h"
47     #include "SIZE.h"
48     #include "PARAMS.h"
49     c#include "cal.h"
50     #include "EXF_PARAM.h"
51     #include "EXF_CONSTANTS.h"
52    
53     c == routine arguments ==
54    
55     integer myThid
56    
57     c == local variables ==
58    
59     #ifdef USE_EXF_INTERPOLATION
60     integer i
61     #endif
62     integer idummy
63     integer iUnit
64    
65     character*(max_len_mbuf) msgbuf
66    
67     c == end of interface ==
68    
69     c Surface flux data.
70     NAMELIST /EXF_NML_01/
71     & windstressmax, repeatPeriod, exf_albedo,
72     & ocean_emissivity, ice_emissivity, snow_emissivity,
73     & exf_iceCd, exf_iceCe, exf_iceCh,
74     & exf_scal_BulkCdn, climtempfreeze,
75     & exf_iprec, exf_iprec_obcs, exf_yftype,
76     & exf_verbose, useExfCheckRange, exf_monFreq,
77     & useExfYearlyFields, twoDigitYear,
78     & useStabilityFct_overIce, readStressOnAgrid, readStressOnCgrid,
79     & useRelativeWind, noNegativeEvap,
80     & select_ZenAlbedo, useExfZenIncoming,
81     & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
82     & cdrag_1, cdrag_2, cdrag_3, cstanton_1, cstanton_2, cdalton,
83     & flamb, flami, zolmin, zref,
84     & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
85     & humid_fac, gamma_blk, saltsat, sstExtrapol, psim_fac
86    
87     NAMELIST /EXF_NML_02/
88     & hfluxfile, atempfile, aqhfile,
89     & sfluxfile, precipfile, runofffile,
90     & ustressfile, vstressfile, evapfile,
91     & snowprecipfile, uwindfile, vwindfile,
92     & wspeedfile, swfluxfile, lwfluxfile,
93     & apressurefile, swdownfile, lwdownfile,
94     & areamaskfile, climsstfile, climsssfile,
95     & climustrfile, climvstrfile,
96     & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
97     & atempstartdate1, atempstartdate2, atempperiod,
98     & aqhstartdate1, aqhstartdate2, aqhperiod,
99     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
100     & evapstartdate1, evapstartdate2, evapperiod,
101     & precipstartdate1, precipstartdate2, precipperiod,
102     & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
103     & runoffstartdate1, runoffstartdate2, runoffperiod,
104     & ustressstartdate1, ustressstartdate2, ustressperiod,
105     & vstressstartdate1, vstressstartdate2, vstressperiod,
106     & uwindstartdate1, uwindstartdate2, uwindperiod,
107     & vwindstartdate1, vwindstartdate2, vwindperiod,
108     & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
109     & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
110     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
111     & swdownstartdate1, swdownstartdate2, swdownperiod,
112     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
113     &apressurestartdate1,apressurestartdate2,apressureperiod,
114     & areamaskstartdate1,areamaskstartdate2,areamaskperiod,
115     & climsststartdate1, climsststartdate2, climsstperiod,
116     & climsssstartdate1, climsssstartdate2, climsssperiod,
117     & climustrstartdate1, climustrstartdate2,climustrperiod,
118     & climvstrstartdate1, climvstrstartdate2,climvstrperiod,
119     & areamaskTauRelax, climsstTauRelax, climsssTauRelax,
120     & climustrTauRelax,climvstrTauRelax
121     #ifdef ALLOW_CARBON
122     #ifdef USE_EXFCO2
123     & ,apco2file
124     & ,apco2startdate1, apco2startdate2, apco2period
125     #endif
126     #endif
127    
128     NAMELIST /EXF_NML_03/
129     & exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap,
130     & exf_inscal_ustress, exf_inscal_vstress,
131     & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed,
132     & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
133     & exf_inscal_sst, exf_inscal_sss,
134     & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
135     & exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip,
136     & exf_inscal_swdown, exf_inscal_lwdown,
137     & exf_inscal_climsst, exf_inscal_climsss,
138     & exf_inscal_climustr, exf_inscal_climvstr,
139     & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
140     & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
141     & exf_outscal_sflux, exf_outscal_apressure,
142     & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
143     & precipconst, snowprecipconst, runoffconst, ustressconst,
144     & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
145     & lwfluxconst, swdownconst, lwdownconst, apressureconst,
146     & areamaskconst, climsstconst, climsssconst,
147     & climustrconst, climvstrconst,
148     & hflux_exfremo_intercept, hflux_exfremo_slope,
149     & atemp_exfremo_intercept, atemp_exfremo_slope,
150     & aqh_exfremo_intercept, aqh_exfremo_slope,
151     & sflux_exfremo_intercept, sflux_exfremo_slope,
152     & evap_exfremo_intercept, evap_exfremo_slope,
153     & precip_exfremo_intercept, precip_exfremo_slope,
154     & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
155     & runoff_exfremo_intercept, runoff_exfremo_slope,
156     & ustress_exfremo_intercept, ustress_exfremo_slope,
157     & vstress_exfremo_intercept, vstress_exfremo_slope,
158     & uwind_exfremo_intercept, uwind_exfremo_slope,
159     & vwind_exfremo_intercept, vwind_exfremo_slope,
160     & wspeed_exfremo_intercept, wspeed_exfremo_slope,
161     & swflux_exfremo_intercept, swflux_exfremo_slope,
162     & lwflux_exfremo_intercept, lwflux_exfremo_slope,
163     & swdown_exfremo_intercept, swdown_exfremo_slope,
164     & lwdown_exfremo_intercept, lwdown_exfremo_slope,
165     & apressure_exfremo_intercept, apressure_exfremo_slope,
166     & areamask_exfremo_intercept, areamask_exfremo_slope,
167     & climsst_exfremo_intercept, climsst_exfremo_slope,
168     & climsss_exfremo_intercept, climsss_exfremo_slope,
169     & climustr_exfremo_intercept, climustr_exfremo_slope,
170     & climvstr_exfremo_intercept, climvstr_exfremo_slope
171     #ifdef ALLOW_CARBON
172     #ifdef USE_EXFCO2
173     & ,exf_inscal_apco2, apco2const,
174     & apco2_exfremo_intercept, apco2_exfremo_slope
175     #endif
176     #endif
177    
178     NAMELIST /EXF_NML_04/
179     & idummy
180     #ifdef USE_EXF_INTERPOLATION
181     & , ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
182     & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
183     & ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat,
184     & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
185     & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
186     & hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat,
187     & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
188     & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
189     & swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat,
190     & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
191     & atemp_nlon, atemp_nlat,
192     & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
193     &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
194     & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
195     & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
196     & precip_nlon, precip_nlat, runoff_nlon, runoff_nlat,
197     & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
198     & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
199     & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
200     & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
201     & uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat,
202     & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
203     & wspeed_nlon, wspeed_nlat,
204     & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
205     & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
206     & swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat,
207     & apressure_lon0,apressure_lon_inc,apressure_nlon,
208     & apressure_lat0,apressure_lat_inc,apressure_nlat,
209     & areamask_lon0,areamask_lon_inc,areamask_nlon,
210     & areamask_lat0,areamask_lat_inc,areamask_nlat,
211     & climsst_lon0, climsst_lon_inc, climsst_nlon,
212     & climsst_lat0, climsst_lat_inc, climsst_nlat,
213     & climsss_lon0, climsss_lon_inc, climsss_nlon,
214     & climsss_lat0, climsss_lat_inc, climsss_nlat,
215     & climustr_lon0, climustr_lon_inc, climustr_nlon,
216     & climustr_lat0, climustr_lat_inc, climustr_nlat,
217     & climvstr_lon0, climvstr_lon_inc, climvstr_nlon,
218     & climvstr_lat0, climvstr_lat_inc, climvstr_nlat
219     # ifdef ALLOW_CARBON
220     # ifdef USE_EXFCO2
221     & ,apco2_lon0, apco2_lon_inc, apco2_lat0, apco2_lat_inc,
222     & apco2_nlon, apco2_nlat
223     # endif
224     # endif
225     #endif
226    
227     NAMELIST /EXF_NML_SGRUNOFF/
228     & sgrunoffstartdate1, sgrunoffstartdate2,
229     & sgrunoffstartdate, sgrunoffperiod,
230     & sgrunoffconst, sgrunoff_exfremo_intercept,
231     & sgrunoff_exfremo_slope, exf_inscal_sgrunoff
232    
233     NAMELIST /EXF_NML_OBCS/
234     & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
235     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
236     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
237     & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
238     & siobNstartdate1, siobNstartdate2, siobNperiod,
239     & siobSstartdate1, siobSstartdate2, siobSperiod,
240     & siobEstartdate1, siobEstartdate2, siobEperiod,
241     & siobWstartdate1, siobWstartdate2, siobWperiod
242    
243     _BEGIN_MASTER(mythid)
244    
245     c Set default values.
246    
247     year2sec = 365.*86400.
248     exf_verbose = debugMode
249     exf_monFreq = monitorFreq
250     useExfCheckRange = .TRUE.
251     useExfZenAlbedo = .FALSE.
252     select_ZenAlbedo = 0
253     useExfZenIncoming = .FALSE.
254     readStressOnAgrid = .FALSE.
255     readStressOnCgrid = .FALSE.
256     useRelativeWind = .FALSE.
257     noNegativeEvap = .FALSE.
258    
259     C- default value should be set to main model parameter:
260     c cen2kel = celsius2K
261     c gravity_mks = gravity
262     c atmcp = atm_Cp
263     c humid_fac = atm_Rq <- default is zero !!!
264    
265     cen2kel = 273.150 _d 0
266     gravity_mks = 9.81 _d 0
267     atmrho = 1.200 _d 0
268     atmcp = 1005.000 _d 0
269     flamb = 2500000.000 _d 0
270     flami = 334000.000 _d 0
271     cvapor_fac = 640380.000 _d 0
272     cvapor_exp = 5107.400 _d 0
273     cvapor_fac_ice = 11637800.000 _d 0
274     cvapor_exp_ice = 5897.800 _d 0
275     humid_fac = 0.606 _d 0
276     gamma_blk = 0.010 _d 0
277     saltsat = 0.980 _d 0
278     sstExtrapol = 0.0 _d 0
279     cdrag_1 = 0.0027000 _d 0
280     cdrag_2 = 0.0001420 _d 0
281     cdrag_3 = 0.0000764 _d 0
282     cstanton_1 = 0.0327 _d 0
283     cstanton_2 = 0.0180 _d 0
284     cdalton = 0.0346 _d 0
285     zolmin = -100.000 _d 0
286     psim_fac = 5.000 _d 0
287     zref = 10.000 _d 0
288     hu = 10.000 _d 0
289     ht = 2.000 _d 0
290     umin = 0.5 _d 0
291     useStabilityFct_overIce = .FALSE.
292     exf_iceCd = 1.63 _d -3
293     exf_iceCe = 1.63 _d -3
294     exf_iceCh = 1.63 _d -3
295     exf_albedo = 0.1 _d 0
296     c-- this default is chosen to be backward compatible with
297     c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
298     ocean_emissivity = 5.50 _d-8 / 5.670 _d-8
299     ice_emissivity = 0.95 _d 0
300     snow_emissivity = 0.95 _d 0
301    
302     c Calendar data.
303     hfluxstartdate1 = 0
304     hfluxstartdate2 = 0
305     hfluxperiod = 0.0 _d 0
306     hfluxconst = 0.0 _d 0
307     hflux_exfremo_intercept = 0.0 _d 0
308     hflux_exfremo_slope = 0.0 _d 0
309    
310     atempstartdate1 = 0
311     atempstartdate2 = 0
312     atempperiod = 0.0 _d 0
313     atempconst = celsius2K
314     atemp_exfremo_intercept = 0.0 _d 0
315     atemp_exfremo_slope = 0.0 _d 0
316    
317     aqhstartdate1 = 0
318     aqhstartdate2 = 0
319     aqhperiod = 0.0 _d 0
320     aqhconst = 0.0 _d 0
321     aqh_exfremo_intercept = 0.0 _d 0
322     aqh_exfremo_slope = 0.0 _d 0
323    
324     sfluxstartdate1 = 0
325     sfluxstartdate2 = 0
326     sfluxperiod = 0.0 _d 0
327     sfluxconst = 0.0 _d 0
328     sflux_exfremo_intercept = 0.0 _d 0
329     sflux_exfremo_slope = 0.0 _d 0
330    
331     evapstartdate1 = 0
332     evapstartdate2 = 0
333     evapperiod = 0.0 _d 0
334     evapconst = 0.0 _d 0
335     evap_exfremo_intercept = 0.0 _d 0
336     evap_exfremo_slope = 0.0 _d 0
337    
338     precipstartdate1 = 0
339     precipstartdate2 = 0
340     precipperiod = 0.0 _d 0
341     precipconst = 0.0 _d 0
342     precip_exfremo_intercept = 0.0 _d 0
343     precip_exfremo_slope = 0.0 _d 0
344    
345     snowprecipstartdate1 = 0
346     snowprecipstartdate2 = 0
347     snowprecipperiod = 0.0 _d 0
348     snowprecipconst = 0.0 _d 0
349     snowprecip_exfremo_intercept = 0.0 _d 0
350     snowprecip_exfremo_slope = 0.0 _d 0
351    
352     runoffstartdate1 = 0
353     runoffstartdate2 = 0
354     runoffperiod = 0.0 _d 0
355     runoffconst = 0.0 _d 0
356     runoff_exfremo_intercept = 0.0 _d 0
357     runoff_exfremo_slope = 0.0 _d 0
358    
359     ustressstartdate1 = 0
360     ustressstartdate2 = 0
361     ustressperiod = 0.0 _d 0
362     ustressconst = 0.0 _d 0
363     ustress_exfremo_intercept = 0.0 _d 0
364     ustress_exfremo_slope = 0.0 _d 0
365    
366     vstressstartdate1 = 0
367     vstressstartdate2 = 0
368     vstressperiod = 0.0 _d 0
369     vstressconst = 0.0 _d 0
370     vstress_exfremo_intercept = 0.0 _d 0
371     vstress_exfremo_slope = 0.0 _d 0
372    
373     uwindstartdate1 = 0
374     uwindstartdate2 = 0
375     uwindperiod = 0.0 _d 0
376     uwindconst = 0.0 _d 0
377     uwind_exfremo_intercept = 0.0 _d 0
378     uwind_exfremo_slope = 0.0 _d 0
379    
380     vwindstartdate1 = 0
381     vwindstartdate2 = 0
382     vwindperiod = 0.0 _d 0
383     vwindconst = 0.0 _d 0
384     vwind_exfremo_intercept = 0.0 _d 0
385     vwind_exfremo_slope = 0.0 _d 0
386    
387     wspeedstartdate1 = 0
388     wspeedstartdate2 = 0
389     wspeedperiod = 0.0 _d 0
390     wspeedconst = 0.0 _d 0
391     wspeed_exfremo_intercept = 0.0 _d 0
392     wspeed_exfremo_slope = 0.0 _d 0
393    
394     swfluxstartdate1 = 0
395     swfluxstartdate2 = 0
396     swfluxperiod = 0.0 _d 0
397     swfluxconst = 0.0 _d 0
398     swflux_exfremo_intercept = 0.0 _d 0
399     swflux_exfremo_slope = 0.0 _d 0
400    
401     lwfluxstartdate1 = 0
402     lwfluxstartdate2 = 0
403     lwfluxperiod = 0.0 _d 0
404     lwfluxconst = 0.0 _d 0
405     lwflux_exfremo_intercept = 0.0 _d 0
406     lwflux_exfremo_slope = 0.0 _d 0
407    
408     swdownstartdate1 = 0
409     swdownstartdate2 = 0
410     swdownperiod = 0.0 _d 0
411     swdownconst = 0.0 _d 0
412     swdown_exfremo_intercept = 0.0 _d 0
413     swdown_exfremo_slope = 0.0 _d 0
414    
415     lwdownstartdate1 = 0
416     lwdownstartdate2 = 0
417     lwdownperiod = 0.0 _d 0
418     lwdownconst = 0.0 _d 0
419     lwdown_exfremo_intercept = 0.0 _d 0
420     lwdown_exfremo_slope = 0.0 _d 0
421    
422     apressurestartdate1 = 0
423     apressurestartdate2 = 0
424     apressureperiod = 0.0 _d 0
425     apressureconst = 0.0 _d 0
426     apressure_exfremo_intercept = 0.0 _d 0
427     apressure_exfremo_slope = 0.0 _d 0
428    
429     areamaskstartdate1 = 0
430     areamaskstartdate2 = 0
431     areamaskperiod = 0.0 _d 0
432     areamaskTauRelax = 0.0 _d 0
433     areamaskconst = 0.0 _d 0
434     areamask_exfremo_intercept = 0. _d 0
435     areamask_exfremo_slope = 0. _d 0
436    
437     climsststartdate1 = 0
438     climsststartdate2 = 0
439     climsstperiod = 0
440     climsstTauRelax = 0.0 _d 0
441     climsstconst = 0.0 _d 0
442     climsst_exfremo_intercept = 0.0 _d 0
443     climsst_exfremo_slope = 0.0 _d 0
444    
445     climsssstartdate1 = 0
446     climsssstartdate2 = 0
447     climsssperiod = 0
448     climsssTauRelax = 0.0 _d 0
449     climsssconst = 0.0 _d 0
450     climsss_exfremo_intercept = 0.0 _d 0
451     climsss_exfremo_slope = 0.0 _d 0
452    
453     climustrstartdate1 = 0
454     climustrstartdate2 = 0
455     climustrperiod = 0
456     climustrTauRelax = 0.0 _d 0
457     climustrconst = 0.0 _d 0
458     climustr_exfremo_intercept = 0.0 _d 0
459     climustr_exfremo_slope = 0.0 _d 0
460    
461     climvstrstartdate1 = 0
462     climvstrstartdate2 = 0
463     climvstrperiod = 0
464     climvstrTauRelax = 0.0 _d 0
465     climvstrconst = 0.0 _d 0
466     climvstr_exfremo_intercept = 0.0 _d 0
467     climvstr_exfremo_slope = 0.0 _d 0
468    
469     sgrunoffstartdate1 = 0
470     sgrunoffstartdate2 = 0
471     sgrunoffstartdate = 0.
472     sgrunoffperiod = 0.0 _d 0
473     sgrunoffconst = 0.0 _d 0
474     sgrunoff_exfremo_intercept = 0.0 _d 0
475     sgrunoff_exfremo_slope = 0.0 _d 0
476     exf_inscal_sgrunoff = 1. _d 0
477    
478     #ifdef ALLOW_CARBON
479     #ifdef USE_EXFCO2
480     apco2startdate1 = 0
481     apco2startdate2 = 0
482     apco2period = 0.0 _d 0
483     apco2const = 0.0 _d 0
484     apco2_exfremo_intercept = 0.0 _d 0
485     apco2_exfremo_slope = 0.0 _d 0
486     #endif
487     #endif
488    
489     obcsNstartdate1 = 0
490     obcsNstartdate2 = 0
491     obcsNperiod = 0.0 _d 0
492     obcsSstartdate1 = 0
493     obcsSstartdate2 = 0
494     obcsSperiod = 0.0 _d 0
495     obcsEstartdate1 = 0
496     obcsEstartdate2 = 0
497     obcsEperiod = 0.0 _d 0
498     obcsWstartdate1 = 0
499     obcsWstartdate2 = 0
500     obcsWperiod = 0.0 _d 0
501    
502     siobNstartdate1 = UNSET_I
503     siobNstartdate2 = UNSET_I
504     siobNperiod = UNSET_RL
505     siobSstartdate1 = UNSET_I
506     siobSstartdate2 = UNSET_I
507     siobSperiod = UNSET_RL
508     siobEstartdate1 = UNSET_I
509     siobEstartdate2 = UNSET_I
510     siobEperiod = UNSET_RL
511     siobWstartdate1 = UNSET_I
512     siobWstartdate2 = UNSET_I
513     siobWperiod = UNSET_RL
514    
515     repeatPeriod = 0.0 _d 0
516     windstressmax = 2.0 _d 0
517    
518     exf_scal_BulkCdn = 1.0 _d 0
519    
520     c Initialise freezing temperature of sea water
521     climtempfreeze = -1.9 _d 0
522    
523     c Data files.
524     hfluxfile = ' '
525     atempfile = ' '
526     aqhfile = ' '
527     evapfile = ' '
528     precipfile = ' '
529     snowprecipfile = ' '
530     sfluxfile = ' '
531     runofffile = ' '
532     ustressfile = ' '
533     vstressfile = ' '
534     uwindfile = ' '
535     vwindfile = ' '
536     wspeedfile = ' '
537     swfluxfile = ' '
538     lwfluxfile = ' '
539     swdownfile = ' '
540     lwdownfile = ' '
541     apressurefile = ' '
542     areamaskfile = ' '
543     climsstfile = ' '
544     climsssfile = ' '
545     climustrfile = ' '
546     climvstrfile = ' '
547     #ifdef ALLOW_CARBON
548     #ifdef USE_EXFCO2
549     apco2file = ' '
550     #endif
551     #endif
552    
553     c Start dates.
554     hfluxstartdate = 0.
555     atempstartdate = 0.
556     aqhstartdate = 0.
557     evapstartdate = 0.
558     precipstartdate = 0.
559     snowprecipstartdate= 0.
560     sfluxstartdate = 0.
561     runoffstartdate = 0.
562     ustressstartdate = 0.
563     vstressstartdate = 0.
564     uwindstartdate = 0.
565     vwindstartdate = 0.
566     wspeedstartdate = 0.
567     swfluxstartdate = 0.
568     lwfluxstartdate = 0.
569     swdownstartdate = 0.
570     lwdownstartdate = 0.
571     obcsNstartdate = 0.
572     obcsSstartdate = 0.
573     obcsEstartdate = 0.
574     obcsWstartdate = 0.
575     siobNstartdate = 0.
576     siobSstartdate = 0.
577     siobEstartdate = 0.
578     siobWstartdate = 0.
579     apressurestartdate = 0.
580     areamaskstartdate = 0.
581     climsststartdate = 0.
582     climsssstartdate = 0.
583     climustrstartdate = 0.
584     climvstrstartdate = 0.
585     #ifdef ALLOW_CARBON
586     #ifdef USE_EXFCO2
587     apco2startdate = 0.
588     #endif
589     #endif
590    
591     c Initialise file type and field precision
592     exf_iprec = 32
593     exf_iprec_obcs = UNSET_I
594     exf_yftype = 'RL'
595     useExfYearlyFields = .FALSE.
596     twoDigitYear = .FALSE.
597    
598     c Input scaling factors.
599     exf_inscal_hflux = 1. _d 0
600     exf_inscal_sflux = 1. _d 0
601     exf_inscal_ustress = 1. _d 0
602     exf_inscal_vstress = 1. _d 0
603     exf_inscal_uwind = 1. _d 0
604     exf_inscal_vwind = 1. _d 0
605     exf_inscal_wspeed = 1. _d 0
606     exf_inscal_swflux = 1. _d 0
607     exf_inscal_lwflux = 1. _d 0
608     exf_inscal_precip = 1. _d 0
609     exf_inscal_snowprecip= 1. _d 0
610     exf_inscal_sst = 1. _d 0
611     exf_inscal_sss = 1. _d 0
612     exf_inscal_atemp = 1. _d 0
613     exf_offset_atemp = 0. _d 0
614     exf_inscal_aqh = 1. _d 0
615     exf_inscal_evap = 1. _d 0
616     exf_inscal_apressure = 1. _d 0
617     exf_inscal_runoff = 1. _d 0
618     exf_inscal_swdown = 1. _d 0
619     exf_inscal_lwdown = 1. _d 0
620     exf_inscal_climsst = 1. _d 0
621     exf_inscal_climsss = 1. _d 0
622     exf_inscal_climustr = 1. _d 0
623     exf_inscal_climvstr = 1. _d 0
624     #ifdef ALLOW_CARBON
625     #ifdef USE_EXFCO2
626     exf_inscal_apco2 = 1. _d 0
627     #endif
628     #endif
629    
630     c Output scaling factors.
631     exf_outscal_hflux = 1. _d 0
632     exf_outscal_sflux = 1. _d 0
633     exf_outscal_ustress = 1. _d 0
634     exf_outscal_vstress = 1. _d 0
635     exf_outscal_swflux = 1. _d 0
636     exf_outscal_sst = 1. _d 0
637     exf_outscal_sss = 1. _d 0
638     exf_outscal_apressure= 1. _d 0
639    
640     #ifdef USE_EXF_INTERPOLATION
641     ustress_lon0 = xgOrigin
642     uwind_lon0 = xgOrigin
643     vstress_lon0 = xgOrigin + delX(1)*exf_half
644     hflux_lon0 = xgOrigin + delX(1)*exf_half
645     sflux_lon0 = xgOrigin + delX(1)*exf_half
646     swflux_lon0 = xgOrigin + delX(1)*exf_half
647     runoff_lon0 = xgOrigin + delX(1)*exf_half
648     atemp_lon0 = xgOrigin + delX(1)*exf_half
649     aqh_lon0 = xgOrigin + delX(1)*exf_half
650     evap_lon0 = xgOrigin + delX(1)*exf_half
651     precip_lon0 = xgOrigin + delX(1)*exf_half
652     snowprecip_lon0= xgOrigin + delX(1)*exf_half
653     vwind_lon0 = xgOrigin + delX(1)*exf_half
654     wspeed_lon0 = xgOrigin + delX(1)*exf_half
655     lwflux_lon0 = xgOrigin + delX(1)*exf_half
656     swdown_lon0 = xgOrigin + delX(1)*exf_half
657     lwdown_lon0 = xgOrigin + delX(1)*exf_half
658     apressure_lon0 = xgOrigin + delX(1)*exf_half
659     areamask_lon0 = xgOrigin + delX(1)*exf_half
660     vstress_lat0 = ygOrigin
661     vwind_lat0 = ygOrigin
662     wspeed_lat0 = ygOrigin
663     ustress_lat0 = ygOrigin + delY(1)*exf_half
664     hflux_lat0 = ygOrigin + delY(1)*exf_half
665     sflux_lat0 = ygOrigin + delY(1)*exf_half
666     runoff_lat0 = ygOrigin + delY(1)*exf_half
667     swflux_lat0 = ygOrigin + delY(1)*exf_half
668     atemp_lat0 = ygOrigin + delY(1)*exf_half
669     aqh_lat0 = ygOrigin + delY(1)*exf_half
670     evap_lat0 = ygOrigin + delY(1)*exf_half
671     precip_lat0 = ygOrigin + delY(1)*exf_half
672     snowprecip_lat0= ygOrigin + delY(1)*exf_half
673     uwind_lat0 = ygOrigin + delY(1)*exf_half
674     lwflux_lat0 = ygOrigin + delY(1)*exf_half
675     swdown_lat0 = ygOrigin + delY(1)*exf_half
676     lwdown_lat0 = ygOrigin + delY(1)*exf_half
677     apressure_lat0 = ygOrigin + delY(1)*exf_half
678     areamask_lat0 = ygOrigin + delY(1)*exf_half
679     ustress_nlon = Nx
680     ustress_nlat = Ny
681     vstress_nlon = Nx
682     vstress_nlat = Ny
683     hflux_nlon = Nx
684     hflux_nlat = Ny
685     sflux_nlon = Nx
686     sflux_nlat = Ny
687     swflux_nlon = Nx
688     swflux_nlat = Ny
689     runoff_nlon = Nx
690     runoff_nlat = Ny
691     atemp_nlon = Nx
692     atemp_nlat = Ny
693     aqh_nlon = Nx
694     aqh_nlat = Ny
695     evap_nlon = Nx
696     evap_nlat = Ny
697     precip_nlon = Nx
698     snowprecip_nlon= Nx
699     precip_nlat = Ny
700     snowprecip_nlat= Ny
701     uwind_nlon = Nx
702     uwind_nlat = Ny
703     vwind_nlon = Nx
704     vwind_nlat = Ny
705     wspeed_nlon = Nx
706     wspeed_nlat = Ny
707     lwflux_nlon = Nx
708     lwflux_nlat = Ny
709     swdown_nlon = Nx
710     swdown_nlat = Ny
711     lwdown_nlon = Nx
712     lwdown_nlat = Ny
713     apressure_nlon = Nx
714     apressure_nlat = Ny
715     areamask_nlon = Nx
716     areamask_nlat = Ny
717     ustress_lon_inc = delX(1)
718     vstress_lon_inc = delX(1)
719     hflux_lon_inc = delX(1)
720     sflux_lon_inc = delX(1)
721     swflux_lon_inc = delX(1)
722     runoff_lon_inc = delX(1)
723     atemp_lon_inc = delX(1)
724     aqh_lon_inc = delX(1)
725     evap_lon_inc = delX(1)
726     precip_lon_inc = delX(1)
727     snowprecip_lon_inc= delX(1)
728     uwind_lon_inc = delX(1)
729     vwind_lon_inc = delX(1)
730     wspeed_lon_inc = delX(1)
731     lwflux_lon_inc = delX(1)
732     swdown_lon_inc = delX(1)
733     lwdown_lon_inc = delX(1)
734     apressure_lon_inc = delX(1)
735     areamask_lon_inc = delX(1)
736     climsst_lon0 = xgOrigin + delX(1)*exf_half
737     climsss_lon0 = xgOrigin + delX(1)*exf_half
738     climsst_lat0 = ygOrigin + delY(1)*exf_half
739     climsss_lat0 = ygOrigin + delY(1)*exf_half
740     climsst_nlon = Nx
741     climsst_nlat = Ny
742     climsss_nlon = Nx
743     climsss_nlat = Ny
744     climsst_lon_inc = delX(1)
745     climsss_lon_inc = delX(1)
746     climustr_lon0 = xgOrigin
747     climvstr_lon0 = xgOrigin + delX(1)*exf_half
748     climustr_lat0 = ygOrigin + delY(1)*exf_half
749     climvstr_lat0 = ygOrigin
750     climustr_nlon = Nx
751     climustr_nlat = Ny
752     climvstr_nlon = Nx
753     climvstr_nlat = Ny
754     climustr_lon_inc = delX(1)
755     climvstr_lon_inc = delX(1)
756     #ifdef ALLOW_CARBON
757     #ifdef USE_EXFCO2
758     apco2_lon0 = xgOrigin + delX(1)*exf_half
759     apco2_lat0 = ygOrigin + delY(1)*exf_half
760     apco2_nlon = Nx
761     apco2_nlat = Ny
762     apco2_lon_inc = delX(1)
763     #endif
764     #endif
765    
766     DO i=1,MAX_LAT_INC
767     IF (i.LT.Ny) THEN
768     vstress_lat_inc(i) = delY(i)
769     vwind_lat_inc(i) = delY(i)
770     wspeed_lat_inc(i) = delY(i)
771     ustress_lat_inc(i) = (delY(i) + delY(i))*exf_half
772     hflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
773     sflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
774     swflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
775     runoff_lat_inc(i) = (delY(i) + delY(i))*exf_half
776     atemp_lat_inc(i) = (delY(i) + delY(i))*exf_half
777     aqh_lat_inc(i) = (delY(i) + delY(i))*exf_half
778     evap_lat_inc(i) = (delY(i) + delY(i))*exf_half
779     precip_lat_inc(i) = (delY(i) + delY(i))*exf_half
780     snowprecip_lat_inc(i)= (delY(i) + delY(i))*exf_half
781     uwind_lat_inc(i) = (delY(i) + delY(i))*exf_half
782     lwflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
783     swdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
784     lwdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
785     apressure_lat_inc(i) = (delY(i) + delY(i))*exf_half
786     areamask_lat_inc(i) = (delY(i) + delY(i))*exf_half
787     climsst_lat_inc(i) = (delY(i) + delY(i))*exf_half
788     climsss_lat_inc(i) = (delY(i) + delY(i))*exf_half
789     climustr_lat_inc(i) = (delY(i) + delY(i))*exf_half
790     climvstr_lat_inc(i) = delY(i)
791     #ifdef ALLOW_CARBON
792     #ifdef USE_EXFCO2
793     apco2_lat_inc(i) = (delY(i) + delY(i))*exf_half
794     #endif
795     #endif
796     ELSE
797     ustress_lat_inc(i) = 0.
798     vstress_lat_inc(i) = 0.
799     hflux_lat_inc(i) = 0.
800     sflux_lat_inc(i) = 0.
801     swflux_lat_inc(i) = 0.
802     runoff_lat_inc(i) = 0.
803     atemp_lat_inc(i) = 0.
804     aqh_lat_inc(i) = 0.
805     evap_lat_inc(i) = 0.
806     precip_lat_inc(i) = 0.
807     snowprecip_lat_inc(i)= 0.
808     uwind_lat_inc(i) = 0.
809     vwind_lat_inc(i) = 0.
810     wspeed_lat_inc(i) = 0.
811     lwflux_lat_inc(i) = 0.
812     swdown_lat_inc(i) = 0.
813     lwdown_lat_inc(i) = 0.
814     apressure_lat_inc(i) = 0.
815     areamask_lat_inc(i) = 0.
816     climsst_lat_inc(i) = 0.
817     climsss_lat_inc(i) = 0.
818     climustr_lat_inc(i) = 0.
819     climvstr_lat_inc(i) = 0.
820     #ifdef ALLOW_CARBON
821     #ifdef USE_EXFCO2
822     apco2_lat_inc(i) = 0.
823     #endif
824     #endif
825     ENDIF
826     ENDDO
827     #endif /* USE_EXF_INTERPOLATION */
828    
829     c Next, read the forcing data file.
830     WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
831     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
832     & SQUEEZE_RIGHT , 1)
833    
834     CALL OPEN_COPY_DATA_FILE(
835     I 'data.exf', 'EXF_READPARMS',
836     O iUnit,
837     I myThid )
838    
839     WRITE(msgBuf,'(A)')
840     & 'EXF_READPARMS: reading EXF_NML_01'
841     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
842     & SQUEEZE_RIGHT , 1)
843     READ( iUnit, nml = EXF_NML_01 )
844     WRITE(msgBuf,'(A)')
845     & 'EXF_READPARMS: reading EXF_NML_02'
846     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
847     & SQUEEZE_RIGHT , 1)
848     READ( iUnit, nml = EXF_NML_02 )
849     WRITE(msgBuf,'(A)')
850     & 'EXF_READPARMS: reading EXF_NML_03'
851     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
852     & SQUEEZE_RIGHT , 1)
853     READ( iUnit, nml = EXF_NML_03 )
854     WRITE(msgBuf,'(A)')
855     & 'EXF_READPARMS: reading EXF_NML_04'
856     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
857     & SQUEEZE_RIGHT , 1)
858     READ( iUnit, nml = EXF_NML_04 )
859    
860     #ifdef ALLOW_ICEFRONT
861     WRITE(msgBuf,'(A)')
862     & 'EXF_READPARMS: reading EXF_NML_SGRUNOFF'
863     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
864     & SQUEEZE_RIGHT , 1)
865     READ( iUnit, nml = EXF_NML_SGRUNOFF )
866     #endif /* ALLOW_ICEFRONT */
867    
868     #ifdef ALLOW_OBCS
869     WRITE(msgBuf,'(A)')
870     & 'EXF_READPARMS: reading EXF_NML_OBCS'
871     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
872     & SQUEEZE_RIGHT , 1)
873     READ( iUnit, nml = EXF_NML_OBCS )
874     IF(siobNstartdate1.EQ.UNSET_I ) siobNstartdate1 = obcsNstartdate1
875     IF(siobNstartdate2.EQ.UNSET_I ) siobNstartdate2 = obcsNstartdate2
876     IF(siobNperiod .EQ.UNSET_RL) siobNperiod = obcsNperiod
877     IF(siobSstartdate1.EQ.UNSET_I ) siobSstartdate1 = obcsSstartdate1
878     IF(siobSstartdate2.EQ.UNSET_I ) siobSstartdate2 = obcsSstartdate2
879     IF(siobSperiod .EQ.UNSET_RL) siobSperiod = obcsSperiod
880     IF(siobEstartdate1.EQ.UNSET_I ) siobEstartdate1 = obcsEstartdate1
881     IF(siobEstartdate2.EQ.UNSET_I ) siobEstartdate2 = obcsEstartdate2
882     IF(siobEperiod .EQ.UNSET_RL) siobEperiod = obcsEperiod
883     IF(siobWstartdate1.EQ.UNSET_I ) siobWstartdate1 = obcsWstartdate1
884     IF(siobWstartdate2.EQ.UNSET_I ) siobWstartdate2 = obcsWstartdate2
885     IF(siobWperiod .EQ.UNSET_RL) siobWperiod = obcsWperiod
886    
887     IF(exf_iprec_obcs .EQ. UNSET_I) exf_iprec_obcs = exf_iprec
888     #endif /* ALLOW_OBCS */
889    
890     WRITE(msgBuf,'(A)')
891     & 'EXF_READPARMS: finished reading data.exf'
892     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
893     & SQUEEZE_RIGHT , 1)
894    
895     CLOSE( iUnit )
896    
897     C-- Derive other parameters:
898     hq = ht
899     #if ( ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) ) \
900     || defined (USE_EXF_INTERPOLATION) )
901     stressIsOnCgrid = .FALSE.
902     #else
903     stressIsOnCgrid = readStressOnCgrid
904     #endif
905    
906     if ( select_ZenAlbedo.GT.0 ) then
907     useExfZenAlbedo=.TRUE.
908     endif
909    
910     #ifdef ALLOW_CLIMSST_RELAXATION
911     cgf warning before we overwrite tauThetaClimRelax/thetaClimFile:
912     IF ( doThetaClimRelax ) THEN
913     WRITE(msgBuf,'(2A)') '** WARNING ** EXF_READPARMS:',
914     & ' useEXF implies that tauThetaClimRelax'
915     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
916     & SQUEEZE_RIGHT , myThid)
917     WRITE(msgBuf,'(2A)') '** WARNING ** ',
918     & ' and thetaClimFile from "data" file are overwritten'
919     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
920     & SQUEEZE_RIGHT , myThid)
921     ENDIF
922     cgf overwrite tauThetaClimRelax/thetaClimFile:
923     tauThetaClimRelax=climsstTauRelax
924     thetaClimFile=' '
925     cgf overwrite doThetaClimRelax based on data.exf:
926     if ( climsstTauRelax.NE.0.) then
927     if (climsstfile.EQ.' ') then
928     WRITE(msgBuf,'(A)')
929     & 'S/R EXF_READPARMS: climsstTauRelax > 0 but'
930     CALL PRINT_ERROR( msgBuf, myThid )
931     WRITE(msgBuf,'(A)')
932     & 'S/R EXF_READPARMS: climsstfile is undefined'
933     CALL PRINT_ERROR( msgBuf, myThid )
934     STOP 'ABNORMAL END: S/R EXF_READPARMS'
935     else
936     doThetaClimRelax=.TRUE.
937     endif
938     else
939     doThetaClimRelax=.FALSE.
940     endif
941     #endif
942    
943     #ifdef ALLOW_CLIMSSS_RELAXATION
944     cgf warning before we overwrite tauSaltClimRelax/saltClimFile:
945     IF ( doSaltClimRelax ) THEN
946     WRITE(msgBuf,'(2A)') '** WARNING ** EXF_READPARMS:',
947     & ' useEXF implies that tauSaltClimRelax'
948     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
949     & SQUEEZE_RIGHT , myThid)
950     WRITE(msgBuf,'(2A)') '** WARNING ** ',
951     & ' and saltClimFile from "data" file are overwritten'
952     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
953     & SQUEEZE_RIGHT , myThid)
954     ENDIF
955     cgf overwrite tauSaltClimRelax/saltClimFile:
956     tauSaltClimRelax=climsssTauRelax
957     saltClimFile=' '
958     cgf overwrite doSaltClimRelax based on data.exf:
959     if ( climsssTauRelax.NE.0.) then
960     if (climsssfile.EQ.' ') then
961     WRITE(msgBuf,'(A)')
962     & 'S/R EXF_READPARMS: climsssTauRelax > 0 but'
963     CALL PRINT_ERROR( msgBuf, myThid )
964     WRITE(msgBuf,'(A)')
965     & 'S/R EXF_READPARMS: climsssfile is undefined'
966     CALL PRINT_ERROR( msgBuf, myThid )
967     STOP 'ABNORMAL END: S/R EXF_READPARMS'
968     else
969     doSaltClimRelax=.TRUE.
970     endif
971     else
972     doSaltClimRelax=.FALSE.
973     endif
974     #endif
975    
976     c Complete the start date specifications for the forcing
977     c fields to get a complete calendar date array.
978     C => moved to EXF_INIT_FIXED
979    
980     _END_MASTER( mythid )
981     _BARRIER
982    
983     RETURN
984     END

  ViewVC Help
Powered by ViewVC 1.1.22