/[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.48 - (hide annotations) (download)
Mon May 14 19:36:37 2007 UTC (17 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59c, checkpoint59b, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j
Changes since 1.47: +76 -291 lines
- implement A-grid / C-grid selection for wind-stress input files
- move start date specifications for the forcing from EXF_READPARMS
  to EXF_INIT_FIXED (+ fix for windspeed input + 2. component wind-stress)

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

  ViewVC Help
Powered by ViewVC 1.1.22