/[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.52 - (hide annotations) (download)
Mon Nov 17 23:08:29 2008 UTC (15 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61g, checkpoint61h
Changes since 1.51: +5 -3 lines
- add parameters to extrapolate temp from level 1 & 2 up to surface;
- add option to prevent negative evaporation.

1 jmc 1.52 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.51 2008/06/11 18:55:10 gforget Exp $
2 jmc 1.11 C $Name: $
3 heimbach 1.1
4 edhill 1.12 #include "EXF_OPTIONS.h"
5 heimbach 1.1
6 jmc 1.48 SUBROUTINE EXF_READPARMS( myThid )
7 heimbach 1.1
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 edhill 1.12 c precompiler switches have to be specified in "EXF_OPTIONS.h".
16 heimbach 1.1 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 heimbach 1.2 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
25 heimbach 1.1 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 heimbach 1.2 c - moved relaxation and climatology to extra routines
29 heimbach 1.1 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
30     c - added obcs parameters
31 heimbach 1.2 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
32     c - added new obcs parameters (for each boundaries)
33 heimbach 1.3 c included runoff D. Stammer, Nov. 25, 2001
34     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
35 dimitri 1.5 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
36 dimitri 1.6 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
37 heimbach 1.1 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 heimbach 1.15 #include "PARAMS.h"
49 jmc 1.48 c#include "cal.h"
50 jmc 1.40 #include "EXF_PARAM.h"
51     #include "EXF_CONSTANTS.h"
52 heimbach 1.1
53     c == routine arguments ==
54    
55 jmc 1.48 integer myThid
56 heimbach 1.1
57     c == local variables ==
58    
59 heimbach 1.43 integer i, idummy
60 heimbach 1.26 integer iUnit
61    
62     character*(max_len_mbuf) msgbuf
63 heimbach 1.1
64     c == end of interface ==
65    
66     c Surface flux data.
67 heimbach 1.43 NAMELIST /EXF_NML_01/
68 jmc 1.47 & windstressmax, repeatPeriod, exf_albedo,
69 mlosch 1.31 & ocean_emissivity, ice_emissivity, snow_emissivity,
70 jmc 1.47 & exf_iceCd, exf_iceCe, exf_iceCh,
71 heimbach 1.43 & exf_scal_BulkCdn, climtempfreeze,
72 heimbach 1.44 & exf_iprec, exf_yftype, exf_monFreq,
73     & useExfYearlyFields, twoDigitYear, useExfCheckRange,
74 jmc 1.48 & useStabilityFct_overIce, readStressOnAgrid, readStressOnCgrid,
75 jmc 1.52 & useRelativeWind, noNegativeEvap,
76 jmc 1.47 & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
77 heimbach 1.46 & cdrag_1, cdrag_2, cdrag_3, cstanton_1, cstanton_2, cdalton,
78     & flamb, flami, zolmin, zref,
79     & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
80 jmc 1.52 & humid_fac, gamma_blk, saltsat, sstExtrapol, psim_fac
81 heimbach 1.43
82     NAMELIST /EXF_NML_02/
83     & hfluxfile, atempfile, aqhfile,
84     & sfluxfile, precipfile, runofffile,
85     & ustressfile, vstressfile, evapfile,
86     & snowprecipfile, uwindfile, vwindfile,
87     & wspeedfile, swfluxfile, lwfluxfile,
88     & apressurefile, swdownfile, lwdownfile,
89 gforget 1.51 & areamaskfile, climsstfile, climsssfile,
90 heimbach 1.1 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
91     & atempstartdate1, atempstartdate2, atempperiod,
92     & aqhstartdate1, aqhstartdate2, aqhperiod,
93     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
94 dimitri 1.5 & evapstartdate1, evapstartdate2, evapperiod,
95 heimbach 1.1 & precipstartdate1, precipstartdate2, precipperiod,
96 heimbach 1.30 & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
97 heimbach 1.3 & runoffstartdate1, runoffstartdate2, runoffperiod,
98 heimbach 1.1 & ustressstartdate1, ustressstartdate2, ustressperiod,
99     & vstressstartdate1, vstressstartdate2, vstressperiod,
100     & uwindstartdate1, uwindstartdate2, uwindperiod,
101     & vwindstartdate1, vwindstartdate2, vwindperiod,
102 heimbach 1.30 & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
103 heimbach 1.1 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
104     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
105 dimitri 1.6 & swdownstartdate1, swdownstartdate2, swdownperiod,
106     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
107 heimbach 1.3 &apressurestartdate1,apressurestartdate2,apressureperiod,
108 gforget 1.51 & areamaskstartdate1,areamaskstartdate2,areamaskperiod,
109     & climsststartdate1, climsststartdate2, climsstperiod,
110     & climsssstartdate1, climsssstartdate2, climsssperiod
111 heimbach 1.43
112     NAMELIST /EXF_NML_03/
113 heimbach 1.30 & exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap,
114 dimitri 1.14 & exf_inscal_ustress, exf_inscal_vstress,
115 heimbach 1.30 & exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed,
116     & exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh,
117 dimitri 1.14 & exf_inscal_sst, exf_inscal_sss,
118     & exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip,
119 heimbach 1.30 & exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip,
120 heimbach 1.8 & exf_inscal_swdown, exf_inscal_lwdown,
121 heimbach 1.43 & exf_inscal_climsst, exf_inscal_climsss,
122 heimbach 1.8 & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
123 dimitri 1.14 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
124 heimbach 1.8 & exf_outscal_sflux, exf_outscal_apressure,
125 jmc 1.32 & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
126     & precipconst, snowprecipconst, runoffconst, ustressconst,
127     & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
128     & lwfluxconst, swdownconst, lwdownconst, apressureconst,
129 gforget 1.51 & areamaskconst, climsstconst, climsssconst,
130 heimbach 1.29 & hflux_exfremo_intercept, hflux_exfremo_slope,
131 heimbach 1.28 & atemp_exfremo_intercept, atemp_exfremo_slope,
132     & aqh_exfremo_intercept, aqh_exfremo_slope,
133     & sflux_exfremo_intercept, sflux_exfremo_slope,
134     & evap_exfremo_intercept, evap_exfremo_slope,
135     & precip_exfremo_intercept, precip_exfremo_slope,
136 heimbach 1.30 & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
137 heimbach 1.28 & runoff_exfremo_intercept, runoff_exfremo_slope,
138     & ustress_exfremo_intercept, ustress_exfremo_slope,
139     & vstress_exfremo_intercept, vstress_exfremo_slope,
140     & uwind_exfremo_intercept, uwind_exfremo_slope,
141     & vwind_exfremo_intercept, vwind_exfremo_slope,
142 heimbach 1.30 & wspeed_exfremo_intercept, wspeed_exfremo_slope,
143 heimbach 1.28 & swflux_exfremo_intercept, swflux_exfremo_slope,
144     & lwflux_exfremo_intercept, lwflux_exfremo_slope,
145     & swdown_exfremo_intercept, swdown_exfremo_slope,
146     & lwdown_exfremo_intercept, lwdown_exfremo_slope,
147 heimbach 1.43 & apressure_exfremo_intercept, apressure_exfremo_slope,
148     & climsst_exfremo_intercept, climsst_exfremo_slope,
149     & climsss_exfremo_intercept, climsss_exfremo_slope
150    
151     NAMELIST /EXF_NML_04/
152     & idummy
153 dimitri 1.9 #ifdef USE_EXF_INTERPOLATION
154 heimbach 1.43 & , ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
155 jmc 1.11 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
156 heimbach 1.35 & ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat,
157 jmc 1.11 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
158     & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
159 heimbach 1.35 & hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat,
160 jmc 1.11 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
161 heimbach 1.35 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
162     & swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat,
163 jmc 1.11 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
164 dimitri 1.9 & atemp_nlon, atemp_nlat,
165 jmc 1.32 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
166     &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
167     & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
168 heimbach 1.35 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
169     & precip_nlon, precip_nlat, runoff_nlon, runoff_nlat,
170 jmc 1.32 & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
171     & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
172 jmc 1.11 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
173     & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
174 heimbach 1.35 & uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat,
175 heimbach 1.30 & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
176     & wspeed_nlon, wspeed_nlat,
177 jmc 1.11 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
178     & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
179 heimbach 1.35 & swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat,
180 heimbach 1.28 & apressure_lon0,apressure_lon_inc,apressure_nlon,
181 heimbach 1.43 & apressure_lat0,apressure_lat_inc,apressure_nlat,
182 gforget 1.51 & areamask_lon0,areamask_lon_inc,areamask_nlon,
183     & areamask_lat0,areamask_lat_inc,areamask_nlat,
184 heimbach 1.43 & climsst_lon0, climsst_lon_inc, climsst_nlon,
185     & climsst_lat0, climsst_lat_inc, climsst_nlat,
186     & climsss_lon0, climsss_lon_inc, climsss_nlon,
187     & climsss_lat0, climsss_lat_inc, climsss_nlat
188 dimitri 1.9 #endif
189 heimbach 1.1
190 heimbach 1.43 NAMELIST /EXF_NML_OBCS/
191     & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
192     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
193     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
194 dimitri 1.50 & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
195     & siobNstartdate1, siobNstartdate2, siobNperiod,
196     & siobSstartdate1, siobSstartdate2, siobSperiod,
197     & siobEstartdate1, siobEstartdate2, siobEperiod,
198     & siobWstartdate1, siobWstartdate2, siobWperiod
199 heimbach 1.43
200 heimbach 1.1 _BEGIN_MASTER(mythid)
201    
202     c Set default values.
203    
204 heimbach 1.21 year2sec = 365.*86400.
205 jmc 1.33 exf_monFreq = monitorFreq
206 jmc 1.48 useExfCheckRange = .TRUE.
207     readStressOnAgrid = .FALSE.
208     readStressOnCgrid = .FALSE.
209 dimitri 1.49 useRelativeWind = .FALSE.
210 jmc 1.52 noNegativeEvap = .FALSE.
211 heimbach 1.21
212 jmc 1.47 C- default value should be set to main model parameter:
213     c cen2kel = celsius2K
214 jmc 1.48 c gravity_mks = gravity
215 jmc 1.47 c atmcp = atm_Cp
216     c humid_fac = atm_Rq <- default is zero !!!
217    
218     cen2kel = 273.150 _d 0
219     gravity_mks = 9.81 _d 0
220     atmrho = 1.200 _d 0
221     atmcp = 1005.000 _d 0
222     flamb = 2500000.000 _d 0
223     flami = 334000.000 _d 0
224     cvapor_fac = 640380.000 _d 0
225     cvapor_exp = 5107.400 _d 0
226     cvapor_fac_ice = 11637800.000 _d 0
227     cvapor_exp_ice = 5897.800 _d 0
228     humid_fac = 0.606 _d 0
229     gamma_blk = 0.010 _d 0
230     saltsat = 0.980 _d 0
231 jmc 1.52 sstExtrapol = 0.0 _d 0
232 jmc 1.47 cdrag_1 = 0.0027000 _d 0
233     cdrag_2 = 0.0001420 _d 0
234     cdrag_3 = 0.0000764 _d 0
235     cstanton_1 = 0.0327 _d 0
236     cstanton_2 = 0.0180 _d 0
237     cdalton = 0.0346 _d 0
238     zolmin = -100.000 _d 0
239     psim_fac = 5.000 _d 0
240     zref = 10.000 _d 0
241     hu = 10.000 _d 0
242     ht = 2.000 _d 0
243     umin = 0.5 _d 0
244     useStabilityFct_overIce = .FALSE.
245     exf_iceCd = 1.63 _d -3
246     exf_iceCe = 1.63 _d -3
247     exf_iceCh = 1.63 _d -3
248     exf_albedo = 0.1 _d 0
249     c-- this default is chosen to be backward compatible with
250     c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
251     ocean_emissivity = 5.50 _d-8 / 5.670 _d-8
252     ice_emissivity = 0.95 _d 0
253     snow_emissivity = 0.95 _d 0
254 heimbach 1.46
255 heimbach 1.1 c Calendar data.
256     hfluxstartdate1 = 0
257     hfluxstartdate2 = 0
258     hfluxperiod = 0.0 _d 0
259 heimbach 1.7 hfluxconst = 0.0 _d 0
260 heimbach 1.27 hflux_exfremo_intercept = 0.0 _d 0
261     hflux_exfremo_slope = 0.0 _d 0
262 heimbach 1.1
263     atempstartdate1 = 0
264     atempstartdate2 = 0
265     atempperiod = 0.0 _d 0
266 heimbach 1.15 atempconst = celsius2K
267 heimbach 1.27 atemp_exfremo_intercept = 0.0 _d 0
268     atemp_exfremo_slope = 0.0 _d 0
269 heimbach 1.1
270     aqhstartdate1 = 0
271     aqhstartdate2 = 0
272     aqhperiod = 0.0 _d 0
273 heimbach 1.7 aqhconst = 0.0 _d 0
274 heimbach 1.27 aqh_exfremo_intercept = 0.0 _d 0
275     aqh_exfremo_slope = 0.0 _d 0
276 heimbach 1.1
277     sfluxstartdate1 = 0
278     sfluxstartdate2 = 0
279     sfluxperiod = 0.0 _d 0
280 heimbach 1.7 sfluxconst = 0.0 _d 0
281 heimbach 1.27 sflux_exfremo_intercept = 0.0 _d 0
282     sflux_exfremo_slope = 0.0 _d 0
283 heimbach 1.1
284 dimitri 1.5 evapstartdate1 = 0
285     evapstartdate2 = 0
286     evapperiod = 0.0 _d 0
287 heimbach 1.7 evapconst = 0.0 _d 0
288 heimbach 1.27 evap_exfremo_intercept = 0.0 _d 0
289     evap_exfremo_slope = 0.0 _d 0
290 dimitri 1.5
291 heimbach 1.1 precipstartdate1 = 0
292     precipstartdate2 = 0
293     precipperiod = 0.0 _d 0
294 heimbach 1.7 precipconst = 0.0 _d 0
295 heimbach 1.27 precip_exfremo_intercept = 0.0 _d 0
296     precip_exfremo_slope = 0.0 _d 0
297 heimbach 1.1
298 heimbach 1.30 snowprecipstartdate1 = 0
299     snowprecipstartdate2 = 0
300     snowprecipperiod = 0.0 _d 0
301     snowprecipconst = 0.0 _d 0
302     snowprecip_exfremo_intercept = 0.0 _d 0
303     snowprecip_exfremo_slope = 0.0 _d 0
304    
305 heimbach 1.3 runoffstartdate1 = 0
306     runoffstartdate2 = 0
307     runoffperiod = 0.0 _d 0
308 heimbach 1.7 runoffconst = 0.0 _d 0
309 heimbach 1.27 runoff_exfremo_intercept = 0.0 _d 0
310     runoff_exfremo_slope = 0.0 _d 0
311 heimbach 1.3
312 heimbach 1.1 ustressstartdate1 = 0
313     ustressstartdate2 = 0
314     ustressperiod = 0.0 _d 0
315 heimbach 1.7 ustressconst = 0.0 _d 0
316 heimbach 1.27 ustress_exfremo_intercept = 0.0 _d 0
317     ustress_exfremo_slope = 0.0 _d 0
318 heimbach 1.1
319     vstressstartdate1 = 0
320     vstressstartdate2 = 0
321     vstressperiod = 0.0 _d 0
322 heimbach 1.7 vstressconst = 0.0 _d 0
323 heimbach 1.27 vstress_exfremo_intercept = 0.0 _d 0
324     vstress_exfremo_slope = 0.0 _d 0
325 heimbach 1.1
326     uwindstartdate1 = 0
327     uwindstartdate2 = 0
328     uwindperiod = 0.0 _d 0
329 heimbach 1.7 uwindconst = 0.0 _d 0
330 heimbach 1.27 uwind_exfremo_intercept = 0.0 _d 0
331     uwind_exfremo_slope = 0.0 _d 0
332 heimbach 1.1
333     vwindstartdate1 = 0
334     vwindstartdate2 = 0
335     vwindperiod = 0.0 _d 0
336 heimbach 1.7 vwindconst = 0.0 _d 0
337 heimbach 1.27 vwind_exfremo_intercept = 0.0 _d 0
338     vwind_exfremo_slope = 0.0 _d 0
339 heimbach 1.1
340 heimbach 1.30 wspeedstartdate1 = 0
341     wspeedstartdate2 = 0
342     wspeedperiod = 0.0 _d 0
343     wspeedconst = 0.0 _d 0
344     wspeed_exfremo_intercept = 0.0 _d 0
345     wspeed_exfremo_slope = 0.0 _d 0
346    
347 heimbach 1.1 swfluxstartdate1 = 0
348     swfluxstartdate2 = 0
349     swfluxperiod = 0.0 _d 0
350 heimbach 1.7 swfluxconst = 0.0 _d 0
351 heimbach 1.27 swflux_exfremo_intercept = 0.0 _d 0
352     swflux_exfremo_slope = 0.0 _d 0
353 heimbach 1.1
354     lwfluxstartdate1 = 0
355     lwfluxstartdate2 = 0
356     lwfluxperiod = 0.0 _d 0
357 heimbach 1.7 lwfluxconst = 0.0 _d 0
358 heimbach 1.27 lwflux_exfremo_intercept = 0.0 _d 0
359     lwflux_exfremo_slope = 0.0 _d 0
360 heimbach 1.1
361 dimitri 1.6 swdownstartdate1 = 0
362     swdownstartdate2 = 0
363     swdownperiod = 0.0 _d 0
364 heimbach 1.7 swdownconst = 0.0 _d 0
365 heimbach 1.27 swdown_exfremo_intercept = 0.0 _d 0
366     swdown_exfremo_slope = 0.0 _d 0
367 dimitri 1.6
368     lwdownstartdate1 = 0
369     lwdownstartdate2 = 0
370     lwdownperiod = 0.0 _d 0
371 heimbach 1.7 lwdownconst = 0.0 _d 0
372 heimbach 1.27 lwdown_exfremo_intercept = 0.0 _d 0
373     lwdown_exfremo_slope = 0.0 _d 0
374    
375     apressurestartdate1 = 0
376     apressurestartdate2 = 0
377     apressureperiod = 0.0 _d 0
378     apressureconst = 0.0 _d 0
379     apressure_exfremo_intercept = 0.0 _d 0
380     apressure_exfremo_slope = 0.0 _d 0
381 dimitri 1.6
382 gforget 1.51 areamaskstartdate1 = 0
383     areamaskstartdate2 = 0
384     areamaskperiod = 0.0 _d 0
385     areamaskconst = 0.0 _d 0
386    
387 heimbach 1.43 climsststartdate1 = 0
388     climsststartdate2 = 0
389     climsstperiod = 0
390     climsstconst = 0.0 _d 0
391     climsst_exfremo_intercept = 0.0 _d 0
392     climsst_exfremo_slope = 0.0 _d 0
393    
394     climsssstartdate1 = 0
395     climsssstartdate2 = 0
396     climsssperiod = 0
397     climsssconst = 0.0 _d 0
398     climsss_exfremo_intercept = 0.0 _d 0
399     climsss_exfremo_slope = 0.0 _d 0
400    
401 heimbach 1.2 obcsNstartdate1 = 0
402     obcsNstartdate2 = 0
403     obcsNperiod = 0.0 _d 0
404     obcsSstartdate1 = 0
405     obcsSstartdate2 = 0
406     obcsSperiod = 0.0 _d 0
407     obcsEstartdate1 = 0
408     obcsEstartdate2 = 0
409     obcsEperiod = 0.0 _d 0
410     obcsWstartdate1 = 0
411     obcsWstartdate2 = 0
412     obcsWperiod = 0.0 _d 0
413 heimbach 1.1
414 dimitri 1.50 siobNstartdate1 = UNSET_I
415     siobNstartdate2 = UNSET_I
416     siobNperiod = UNSET_RL
417     siobSstartdate1 = UNSET_I
418     siobSstartdate2 = UNSET_I
419     siobSperiod = UNSET_RL
420     siobEstartdate1 = UNSET_I
421     siobEstartdate2 = UNSET_I
422     siobEperiod = UNSET_RL
423     siobWstartdate1 = UNSET_I
424     siobWstartdate2 = UNSET_I
425     siobWperiod = UNSET_RL
426    
427 heimbach 1.30 repeatPeriod = 0.0 _d 0
428     windstressmax = 2.0 _d 0
429 cheisey 1.4
430 heimbach 1.43 exf_scal_BulkCdn = 1.0 _d 0
431    
432     c Initialise freezing temperature of sea water
433     climtempfreeze = -1.9 _d 0
434 dimitri 1.36
435 heimbach 1.1 c Data files.
436     hfluxfile = ' '
437     atempfile = ' '
438     aqhfile = ' '
439 dimitri 1.5 evapfile = ' '
440 heimbach 1.1 precipfile = ' '
441 heimbach 1.30 snowprecipfile = ' '
442 heimbach 1.1 sfluxfile = ' '
443 heimbach 1.3 runofffile = ' '
444 heimbach 1.1 ustressfile = ' '
445     vstressfile = ' '
446     uwindfile = ' '
447     vwindfile = ' '
448 heimbach 1.30 wspeedfile = ' '
449 heimbach 1.1 swfluxfile = ' '
450     lwfluxfile = ' '
451 dimitri 1.6 swdownfile = ' '
452     lwdownfile = ' '
453 gforget 1.51 apressurefile = ' '
454     areamaskfile = ' '
455 heimbach 1.43 climsstfile = ' '
456     climsssfile = ' '
457 heimbach 1.1
458 dimitri 1.13 c Start dates.
459 dimitri 1.24 hfluxstartdate = 0.
460     atempstartdate = 0.
461     aqhstartdate = 0.
462     evapstartdate = 0.
463     precipstartdate = 0.
464 jmc 1.48 snowprecipstartdate= 0.
465 dimitri 1.24 sfluxstartdate = 0.
466     runoffstartdate = 0.
467     ustressstartdate = 0.
468     vstressstartdate = 0.
469     uwindstartdate = 0.
470     vwindstartdate = 0.
471 heimbach 1.30 wspeedstartdate = 0.
472 dimitri 1.24 swfluxstartdate = 0.
473     lwfluxstartdate = 0.
474     swdownstartdate = 0.
475     lwdownstartdate = 0.
476     obcsNstartdate = 0.
477     obcsSstartdate = 0.
478     obcsEstartdate = 0.
479     obcsWstartdate = 0.
480 dimitri 1.50 siobNstartdate = 0.
481     siobSstartdate = 0.
482     siobEstartdate = 0.
483     siobWstartdate = 0.
484 dimitri 1.24 apressurestartdate = 0.
485 gforget 1.51 areamaskstartdate = 0.
486 heimbach 1.43 climsststartdate = 0.
487     climsssstartdate = 0.
488 heimbach 1.1
489     c Initialise file type and field precision
490 heimbach 1.20 exf_iprec = 32
491     exf_yftype = 'RL'
492     useExfYearlyFields = .FALSE.
493 dimitri 1.25 twoDigitYear = .FALSE.
494 heimbach 1.1
495 dimitri 1.6 c Input scaling factors.
496 heimbach 1.8 exf_inscal_hflux = 1. _d 0
497     exf_inscal_sflux = 1. _d 0
498     exf_inscal_ustress = 1. _d 0
499     exf_inscal_vstress = 1. _d 0
500     exf_inscal_uwind = 1. _d 0
501     exf_inscal_vwind = 1. _d 0
502 heimbach 1.30 exf_inscal_wspeed = 1. _d 0
503 heimbach 1.8 exf_inscal_swflux = 1. _d 0
504     exf_inscal_lwflux = 1. _d 0
505     exf_inscal_precip = 1. _d 0
506 jmc 1.48 exf_inscal_snowprecip= 1. _d 0
507 dimitri 1.6 exf_inscal_sst = 1. _d 0
508     exf_inscal_sss = 1. _d 0
509 heimbach 1.8 exf_inscal_atemp = 1. _d 0
510 dimitri 1.14 exf_offset_atemp = 0. _d 0
511 heimbach 1.8 exf_inscal_aqh = 1. _d 0
512     exf_inscal_evap = 1. _d 0
513 dimitri 1.6 exf_inscal_apressure = 1. _d 0
514 heimbach 1.21 exf_inscal_runoff = 1. _d 0
515 heimbach 1.8 exf_inscal_swdown = 1. _d 0
516     exf_inscal_lwdown = 1. _d 0
517 heimbach 1.43 exf_inscal_climsst = 1. _d 0
518     exf_inscal_climsss = 1. _d 0
519 dimitri 1.6
520     c Output scaling factors.
521 heimbach 1.8 exf_outscal_hflux = 1. _d 0
522     exf_outscal_sflux = 1. _d 0
523     exf_outscal_ustress = 1. _d 0
524     exf_outscal_vstress = 1. _d 0
525     exf_outscal_swflux = 1. _d 0
526 dimitri 1.6 exf_outscal_sst = 1. _d 0
527     exf_outscal_sss = 1. _d 0
528     exf_outscal_apressure= 1. _d 0
529 heimbach 1.3
530 dimitri 1.19 #ifdef USE_EXF_INTERPOLATION
531     ustress_lon0 = thetaMin
532     uwind_lon0 = thetaMin
533 jmc 1.48 vstress_lon0 = thetaMin + delX(1)*exf_half
534     hflux_lon0 = thetaMin + delX(1)*exf_half
535     sflux_lon0 = thetaMin + delX(1)*exf_half
536     swflux_lon0 = thetaMin + delX(1)*exf_half
537     runoff_lon0 = thetaMin + delX(1)*exf_half
538     atemp_lon0 = thetaMin + delX(1)*exf_half
539     aqh_lon0 = thetaMin + delX(1)*exf_half
540     evap_lon0 = thetaMin + delX(1)*exf_half
541     precip_lon0 = thetaMin + delX(1)*exf_half
542     snowprecip_lon0= thetaMin + delX(1)*exf_half
543     vwind_lon0 = thetaMin + delX(1)*exf_half
544     wspeed_lon0 = thetaMin + delX(1)*exf_half
545     lwflux_lon0 = thetaMin + delX(1)*exf_half
546     swdown_lon0 = thetaMin + delX(1)*exf_half
547     lwdown_lon0 = thetaMin + delX(1)*exf_half
548     apressure_lon0 = thetaMin + delX(1)*exf_half
549 gforget 1.51 areamask_lon0 = thetaMin + delX(1)*exf_half
550 dimitri 1.19 vstress_lat0 = phimin
551     vwind_lat0 = phimin
552 heimbach 1.30 wspeed_lat0 = phimin
553 jmc 1.48 ustress_lat0 = phimin + delY(1)*exf_half
554     hflux_lat0 = phimin + delY(1)*exf_half
555     sflux_lat0 = phimin + delY(1)*exf_half
556     runoff_lat0 = phimin + delY(1)*exf_half
557     swflux_lat0 = phimin + delY(1)*exf_half
558     atemp_lat0 = phimin + delY(1)*exf_half
559     aqh_lat0 = phimin + delY(1)*exf_half
560     evap_lat0 = phimin + delY(1)*exf_half
561     precip_lat0 = phimin + delY(1)*exf_half
562     snowprecip_lat0= phimin + delY(1)*exf_half
563     uwind_lat0 = phimin + delY(1)*exf_half
564     lwflux_lat0 = phimin + delY(1)*exf_half
565     swdown_lat0 = phimin + delY(1)*exf_half
566     lwdown_lat0 = phimin + delY(1)*exf_half
567     apressure_lat0 = phimin + delY(1)*exf_half
568 gforget 1.51 areamask_lat0 = phimin + delY(1)*exf_half
569 dimitri 1.19 ustress_nlon = Nx
570     ustress_nlat = Ny
571     vstress_nlon = Nx
572     vstress_nlat = Ny
573     hflux_nlon = Nx
574     hflux_nlat = Ny
575     sflux_nlon = Nx
576     sflux_nlat = Ny
577     swflux_nlon = Nx
578     swflux_nlat = Ny
579     runoff_nlon = Nx
580     runoff_nlat = Ny
581     atemp_nlon = Nx
582     atemp_nlat = Ny
583     aqh_nlon = Nx
584     aqh_nlat = Ny
585     evap_nlon = Nx
586     evap_nlat = Ny
587     precip_nlon = Nx
588 jmc 1.48 snowprecip_nlon= Nx
589 dimitri 1.19 precip_nlat = Ny
590 jmc 1.48 snowprecip_nlat= Ny
591 dimitri 1.19 uwind_nlon = Nx
592     uwind_nlat = Ny
593     vwind_nlon = Nx
594     vwind_nlat = Ny
595 heimbach 1.30 wspeed_nlon = Nx
596     wspeed_nlat = Ny
597 dimitri 1.19 lwflux_nlon = Nx
598     lwflux_nlat = Ny
599     swdown_nlon = Nx
600     swdown_nlat = Ny
601     lwdown_nlon = Nx
602     lwdown_nlat = Ny
603     apressure_nlon = Nx
604     apressure_nlat = Ny
605 gforget 1.51 areamask_nlon = Nx
606     areamask_nlat = Ny
607 dimitri 1.19 Ustress_lon_inc = delX(1)
608     vstress_lon_inc = delX(1)
609     hflux_lon_inc = delX(1)
610     sflux_lon_inc = delX(1)
611     swflux_lon_inc = delX(1)
612     runoff_lon_inc = delX(1)
613     atemp_lon_inc = delX(1)
614     aqh_lon_inc = delX(1)
615     evap_lon_inc = delX(1)
616     precip_lon_inc = delX(1)
617 jmc 1.48 snowprecip_lon_inc= delX(1)
618 dimitri 1.19 uwind_lon_inc = delX(1)
619     vwind_lon_inc = delX(1)
620 heimbach 1.30 wspeed_lon_inc = delX(1)
621 dimitri 1.19 lwflux_lon_inc = delX(1)
622     swdown_lon_inc = delX(1)
623     lwdown_lon_inc = delX(1)
624     apressure_lon_inc = delX(1)
625 gforget 1.51 areamask_lon_inc = delX(1)
626 jmc 1.48 climsst_lon0 = thetaMin + delX(1)*exf_half
627     climsss_lon0 = thetaMin + delX(1)*exf_half
628     climsst_lat0 = phimin + delY(1)*exf_half
629     climsss_lat0 = phimin + delY(1)*exf_half
630 heimbach 1.43 climsst_nlon = Nx
631     climsst_nlat = Ny
632     climsss_nlon = Nx
633     climsss_nlat = Ny
634     climsst_lon_inc = delX(1)
635     climsss_lon_inc = delX(1)
636 dimitri 1.19 DO i=1,MAX_LAT_INC
637     IF (i.LT.Ny) THEN
638     vstress_lat_inc(i) = delY(i)
639     vwind_lat_inc(i) = delY(i)
640 heimbach 1.30 wspeed_lat_inc(i) = delY(i)
641 jmc 1.48 ustress_lat_inc(i) = (delY(i) + delY(i))*exf_half
642     hflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
643     sflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
644     swflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
645     runoff_lat_inc(i) = (delY(i) + delY(i))*exf_half
646     atemp_lat_inc(i) = (delY(i) + delY(i))*exf_half
647     aqh_lat_inc(i) = (delY(i) + delY(i))*exf_half
648     evap_lat_inc(i) = (delY(i) + delY(i))*exf_half
649     precip_lat_inc(i) = (delY(i) + delY(i))*exf_half
650     snowprecip_lat_inc(i)= (delY(i) + delY(i))*exf_half
651     uwind_lat_inc(i) = (delY(i) + delY(i))*exf_half
652     lwflux_lat_inc(i) = (delY(i) + delY(i))*exf_half
653     swdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
654     lwdown_lat_inc(i) = (delY(i) + delY(i))*exf_half
655     apressure_lat_inc(i) = (delY(i) + delY(i))*exf_half
656 gforget 1.51 areamask_lat_inc(i) = (delY(i) + delY(i))*exf_half
657 jmc 1.48 climsst_lat_inc(i) = (delY(i) + delY(i))*exf_half
658     climsss_lat_inc(i) = (delY(i) + delY(i))*exf_half
659 dimitri 1.19 ELSE
660     ustress_lat_inc(i) = 0.
661     vstress_lat_inc(i) = 0.
662     hflux_lat_inc(i) = 0.
663     sflux_lat_inc(i) = 0.
664     swflux_lat_inc(i) = 0.
665     runoff_lat_inc(i) = 0.
666     atemp_lat_inc(i) = 0.
667     aqh_lat_inc(i) = 0.
668     evap_lat_inc(i) = 0.
669     precip_lat_inc(i) = 0.
670 jmc 1.48 snowprecip_lat_inc(i)= 0.
671 dimitri 1.19 uwind_lat_inc(i) = 0.
672     vwind_lat_inc(i) = 0.
673 heimbach 1.30 wspeed_lat_inc(i) = 0.
674 dimitri 1.19 lwflux_lat_inc(i) = 0.
675     swdown_lat_inc(i) = 0.
676     lwdown_lat_inc(i) = 0.
677     apressure_lat_inc(i) = 0.
678 gforget 1.51 areamask_lat_inc(i) = 0.
679 heimbach 1.43 climsst_lat_inc(i) = 0.
680     climsss_lat_inc(i) = 0.
681 dimitri 1.19 ENDIF
682     ENDDO
683     #endif /* USE_EXF_INTERPOLATION */
684    
685 heimbach 1.1 c Next, read the forcing data file.
686 heimbach 1.43 WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
687     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
688     & SQUEEZE_RIGHT , 1)
689 heimbach 1.26
690 heimbach 1.43 CALL OPEN_COPY_DATA_FILE(
691 heimbach 1.26 I 'data.exf', 'EXF_READPARMS',
692     O iUnit,
693     I myThid )
694    
695 heimbach 1.43 WRITE(msgBuf,'(A)')
696     & 'EXF_READPARMS: reading EXF_NML_01'
697     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
698     & SQUEEZE_RIGHT , 1)
699     READ( iUnit, nml = EXF_NML_01 )
700     WRITE(msgBuf,'(A)')
701     & 'EXF_READPARMS: reading EXF_NML_02'
702     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
703     & SQUEEZE_RIGHT , 1)
704     READ( iUnit, nml = EXF_NML_02 )
705     WRITE(msgBuf,'(A)')
706     & 'EXF_READPARMS: reading EXF_NML_03'
707     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
708     & SQUEEZE_RIGHT , 1)
709     READ( iUnit, nml = EXF_NML_03 )
710     WRITE(msgBuf,'(A)')
711     & 'EXF_READPARMS: reading EXF_NML_04'
712     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
713     & SQUEEZE_RIGHT , 1)
714     READ( iUnit, nml = EXF_NML_04 )
715     #ifdef ALLOW_OBCS
716     WRITE(msgBuf,'(A)')
717     & 'EXF_READPARMS: reading EXF_NML_OBCS'
718     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
719     & SQUEEZE_RIGHT , 1)
720     READ( iUnit, nml = EXF_NML_OBCS )
721 dimitri 1.50 IF(siobNstartdate1.EQ.UNSET_I ) siobNstartdate1 = obcsNstartdate1
722     IF(siobNstartdate2.EQ.UNSET_I ) siobNstartdate2 = obcsNstartdate2
723     IF(siobNperiod .EQ.UNSET_RL) siobNperiod = obcsNperiod
724     IF(siobSstartdate1.EQ.UNSET_I ) siobSstartdate1 = obcsSstartdate1
725     IF(siobSstartdate2.EQ.UNSET_I ) siobSstartdate2 = obcsSstartdate2
726     IF(siobSperiod .EQ.UNSET_RL) siobSperiod = obcsSperiod
727     IF(siobEstartdate1.EQ.UNSET_I ) siobEstartdate1 = obcsEstartdate1
728     IF(siobEstartdate2.EQ.UNSET_I ) siobEstartdate2 = obcsEstartdate2
729     IF(siobEperiod .EQ.UNSET_RL) siobEperiod = obcsEperiod
730     IF(siobWstartdate1.EQ.UNSET_I ) siobWstartdate1 = obcsWstartdate1
731     IF(siobWstartdate2.EQ.UNSET_I ) siobWstartdate2 = obcsWstartdate2
732     IF(siobWperiod .EQ.UNSET_RL) siobWperiod = obcsWperiod
733 heimbach 1.43 #endif
734 heimbach 1.26
735     WRITE(msgBuf,'(A)')
736     & 'EXF_READPARMS: finished reading data.exf'
737     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
738     & SQUEEZE_RIGHT , 1)
739    
740     CLOSE( iUnit )
741 heimbach 1.1
742 jmc 1.48 C-- Derive other parameters:
743 heimbach 1.46 hq = ht
744 jmc 1.48 #if ( ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) ) \
745     || defined (USE_EXF_INTERPOLATION) )
746     stressIsOnCgrid = .FALSE.
747     #else
748     stressIsOnCgrid = readStressOnCgrid
749     #endif
750 heimbach 1.46
751 jmc 1.48 CALL EXF_CHECK( myThid )
752 heimbach 1.20
753 heimbach 1.1 c Complete the start date specifications for the forcing
754     c fields to get a complete calendar date array.
755 jmc 1.48 C => moved to EXF_INIT_FIXED
756 heimbach 1.43
757 heimbach 1.1 _END_MASTER( mythid )
758     _BARRIER
759    
760 jmc 1.47 RETURN
761     END

  ViewVC Help
Powered by ViewVC 1.1.22