/[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.34 - (hide annotations) (download)
Thu Oct 12 21:34:59 2006 UTC (17 years, 8 months ago) by heimbach
Branch: MAIN
Changes since 1.33: +26 -1 lines
Enable prescription of constant-in-time field for each variable

1 heimbach 1.34 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_readparms.F,v 1.33 2006/06/19 23:20:48 jmc Exp $
2 jmc 1.11 C $Name: $
3 heimbach 1.1
4 edhill 1.12 #include "EXF_OPTIONS.h"
5 heimbach 1.3 #ifdef ALLOW_OBCS
6     # include "OBCS_OPTIONS.h"
7     #endif
8 heimbach 1.1
9 heimbach 1.3 subroutine exf_readparms( mythid )
10 heimbach 1.1
11     c ==================================================================
12     c SUBROUTINE exf_readparms
13     c ==================================================================
14     c
15     c o This routine initialises the package that calculates external
16     c forcing fields for a given timestep of the MITgcmUV. Parameters
17     c for this package are set in "data.externalforcing". Some additional
18 edhill 1.12 c precompiler switches have to be specified in "EXF_OPTIONS.h".
19 heimbach 1.1 c
20     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
21     c
22     c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
23     c - Restructured the code in order to create a package
24     c for the MITgcmUV.
25     c Christian Eckert eckert@mit.edu 12-Feb-2000
26     c - Changed Routine names (package prefix: exf_)
27 heimbach 1.2 c changed: Patrick Heimbach, heimbach@mit.edu 04-May-2000
28 heimbach 1.1 c - changed the handling of precip and sflux with respect
29     c to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
30     c changed: Ralf.Giering@FastOpt.de 25-Mai-20000
31 heimbach 1.2 c - moved relaxation and climatology to extra routines
32 heimbach 1.1 c Patrick Heimbach, heimbach@mit.edu 04-May-2000
33     c - added obcs parameters
34 heimbach 1.2 c changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
35     c - added new obcs parameters (for each boundaries)
36 heimbach 1.3 c included runoff D. Stammer, Nov. 25, 2001
37     c included pressure forcing. heimbach@mit.edu 05-Nov-2002
38 dimitri 1.5 c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
39 dimitri 1.6 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40 heimbach 1.1 c
41     c ==================================================================
42     c SUBROUTINE exf_readparms
43     c ==================================================================
44    
45     implicit none
46    
47     c == global variables ==
48    
49     #include "EEPARAMS.h"
50     #include "SIZE.h"
51 heimbach 1.15 #include "PARAMS.h"
52 heimbach 1.1 #include "cal.h"
53     #include "exf.h"
54     #include "exf_param.h"
55     #include "exf_constants.h"
56    
57     c == routine arguments ==
58    
59     integer mythid
60    
61     c == local variables ==
62    
63     integer i
64 dimitri 1.13 integer date_array(4), difftime(4)
65 heimbach 1.26 integer iUnit
66    
67     character*(max_len_mbuf) msgbuf
68 heimbach 1.1
69     c == end of interface ==
70    
71     c Surface flux data.
72     namelist /exf_nml/
73 jmc 1.32 & windstressmax, repeatPeriod, exf_albedo,
74 mlosch 1.31 & ocean_emissivity, ice_emissivity, snow_emissivity,
75 heimbach 1.1 & hfluxstartdate1, hfluxstartdate2, hfluxperiod,
76     & atempstartdate1, atempstartdate2, atempperiod,
77     & aqhstartdate1, aqhstartdate2, aqhperiod,
78     & sfluxstartdate1, sfluxstartdate2, sfluxperiod,
79 dimitri 1.5 & evapstartdate1, evapstartdate2, evapperiod,
80 heimbach 1.1 & precipstartdate1, precipstartdate2, precipperiod,
81 heimbach 1.30 & snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod,
82 heimbach 1.3 & runoffstartdate1, runoffstartdate2, runoffperiod,
83 heimbach 1.1 & ustressstartdate1, ustressstartdate2, ustressperiod,
84     & vstressstartdate1, vstressstartdate2, vstressperiod,
85     & uwindstartdate1, uwindstartdate2, uwindperiod,
86     & vwindstartdate1, vwindstartdate2, vwindperiod,
87 heimbach 1.30 & wspeedstartdate1, wspeedstartdate2, wspeedperiod,
88 heimbach 1.1 & swfluxstartdate1, swfluxstartdate2, swfluxperiod,
89     & lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod,
90 dimitri 1.6 & swdownstartdate1, swdownstartdate2, swdownperiod,
91     & lwdownstartdate1, lwdownstartdate2, lwdownperiod,
92 heimbach 1.2 & obcsNstartdate1, obcsNstartdate2, obcsNperiod,
93     & obcsSstartdate1, obcsSstartdate2, obcsSperiod,
94     & obcsEstartdate1, obcsEstartdate2, obcsEperiod,
95     & obcsWstartdate1, obcsWstartdate2, obcsWperiod,
96 heimbach 1.3 &apressurestartdate1,apressurestartdate2,apressureperiod,
97 heimbach 1.1 & hfluxfile, atempfile, aqhfile,
98 heimbach 1.3 & sfluxfile, precipfile, runofffile,
99 dimitri 1.5 & ustressfile, vstressfile, evapfile,
100 jmc 1.32 & snowprecipfile, uwindfile, vwindfile,
101     & wspeedfile, swfluxfile, lwfluxfile,
102     & apressurefile, swdownfile, lwdownfile,
103 heimbach 1.34 & hflux0file, atemp0file, aqh0file,
104     & sflux0file, precip0file, runoff0file,
105     & ustress0file, vstress0file, evap0file,
106     & snowprecip0file, uwind0file, vwind0file,
107     & wspeed0file, swflux0file, lwflux0file,
108     & apressure0file, swdown0file, lwdown0file,
109 heimbach 1.28 & exf_iprec, exf_yftype,
110 heimbach 1.30 & useExfYearlyFields, twoDigitYear, useExfCheckRange,
111     & 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     & exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress,
120 dimitri 1.14 & exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss,
121 heimbach 1.8 & exf_outscal_sflux, exf_outscal_apressure,
122 jmc 1.32 & hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
123     & precipconst, snowprecipconst, runoffconst, ustressconst,
124     & vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
125     & lwfluxconst, swdownconst, lwdownconst, apressureconst,
126 heimbach 1.29 & hflux_exfremo_intercept, hflux_exfremo_slope,
127 heimbach 1.28 & atemp_exfremo_intercept, atemp_exfremo_slope,
128     & aqh_exfremo_intercept, aqh_exfremo_slope,
129     & sflux_exfremo_intercept, sflux_exfremo_slope,
130     & evap_exfremo_intercept, evap_exfremo_slope,
131     & precip_exfremo_intercept, precip_exfremo_slope,
132 heimbach 1.30 & snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
133 heimbach 1.28 & runoff_exfremo_intercept, runoff_exfremo_slope,
134     & ustress_exfremo_intercept, ustress_exfremo_slope,
135     & vstress_exfremo_intercept, vstress_exfremo_slope,
136     & uwind_exfremo_intercept, uwind_exfremo_slope,
137     & vwind_exfremo_intercept, vwind_exfremo_slope,
138 heimbach 1.30 & wspeed_exfremo_intercept, wspeed_exfremo_slope,
139 heimbach 1.28 & swflux_exfremo_intercept, swflux_exfremo_slope,
140     & lwflux_exfremo_intercept, lwflux_exfremo_slope,
141     & swdown_exfremo_intercept, swdown_exfremo_slope,
142     & lwdown_exfremo_intercept, lwdown_exfremo_slope,
143     & apressure_exfremo_intercept, apressure_exfremo_slope
144 dimitri 1.9 #ifdef USE_EXF_INTERPOLATION
145 jmc 1.11 & ,ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
146 dimitri 1.9 & ustress_nlon, ustress_nlat,
147 jmc 1.11 & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
148 dimitri 1.9 & vstress_nlon, vstress_nlat,
149 jmc 1.11 & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
150 dimitri 1.9 & hflux_nlon, hflux_nlat,
151 jmc 1.11 & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
152 dimitri 1.9 & sflux_nlon, sflux_nlat,
153 jmc 1.11 & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
154 dimitri 1.9 & swflux_nlon, swflux_nlat,
155 jmc 1.11 & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
156 dimitri 1.9 & runoff_nlon, runoff_nlat,
157 jmc 1.11 & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
158 dimitri 1.9 & atemp_nlon, atemp_nlat,
159 jmc 1.32 & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
160     &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
161     & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
162 dimitri 1.9 & precip_nlon, precip_nlat,
163 jmc 1.32 & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
164     & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
165 jmc 1.11 & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
166 dimitri 1.9 & uwind_nlon, uwind_nlat,
167 jmc 1.11 & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
168 dimitri 1.9 & vwind_nlon, vwind_nlat,
169 heimbach 1.30 & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
170     & wspeed_nlon, wspeed_nlat,
171 jmc 1.11 & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
172 dimitri 1.9 & lwflux_nlon, lwflux_nlat,
173 jmc 1.11 & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
174 dimitri 1.9 & swdown_nlon, swdown_nlat,
175 jmc 1.11 & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
176 dimitri 1.9 & lwdown_nlon, lwdown_nlat,
177 heimbach 1.28 & apressure_lon0,apressure_lon_inc,apressure_nlon,
178     & apressure_lat0,apressure_lat_inc,apressure_nlat
179 dimitri 1.9 #endif
180 heimbach 1.1
181     _BEGIN_MASTER(mythid)
182    
183     c Set default values.
184    
185 heimbach 1.21 year2sec = 365.*86400.
186 jmc 1.33 exf_monFreq = monitorFreq
187 heimbach 1.21
188 heimbach 1.1 c Calendar data.
189     hfluxstartdate1 = 0
190     hfluxstartdate2 = 0
191     hfluxperiod = 0.0 _d 0
192 heimbach 1.7 hfluxconst = 0.0 _d 0
193 heimbach 1.27 hflux_exfremo_intercept = 0.0 _d 0
194     hflux_exfremo_slope = 0.0 _d 0
195 heimbach 1.1
196     atempstartdate1 = 0
197     atempstartdate2 = 0
198     atempperiod = 0.0 _d 0
199 heimbach 1.15 atempconst = celsius2K
200 heimbach 1.27 atemp_exfremo_intercept = 0.0 _d 0
201     atemp_exfremo_slope = 0.0 _d 0
202 heimbach 1.1
203     aqhstartdate1 = 0
204     aqhstartdate2 = 0
205     aqhperiod = 0.0 _d 0
206 heimbach 1.7 aqhconst = 0.0 _d 0
207 heimbach 1.27 aqh_exfremo_intercept = 0.0 _d 0
208     aqh_exfremo_slope = 0.0 _d 0
209 heimbach 1.1
210     sfluxstartdate1 = 0
211     sfluxstartdate2 = 0
212     sfluxperiod = 0.0 _d 0
213 heimbach 1.7 sfluxconst = 0.0 _d 0
214 heimbach 1.27 sflux_exfremo_intercept = 0.0 _d 0
215     sflux_exfremo_slope = 0.0 _d 0
216 heimbach 1.1
217 dimitri 1.5 evapstartdate1 = 0
218     evapstartdate2 = 0
219     evapperiod = 0.0 _d 0
220 heimbach 1.7 evapconst = 0.0 _d 0
221 heimbach 1.27 evap_exfremo_intercept = 0.0 _d 0
222     evap_exfremo_slope = 0.0 _d 0
223 dimitri 1.5
224 heimbach 1.1 precipstartdate1 = 0
225     precipstartdate2 = 0
226     precipperiod = 0.0 _d 0
227 heimbach 1.7 precipconst = 0.0 _d 0
228 heimbach 1.27 precip_exfremo_intercept = 0.0 _d 0
229     precip_exfremo_slope = 0.0 _d 0
230 heimbach 1.1
231 heimbach 1.30 snowprecipstartdate1 = 0
232     snowprecipstartdate2 = 0
233     snowprecipperiod = 0.0 _d 0
234     snowprecipconst = 0.0 _d 0
235     snowprecip_exfremo_intercept = 0.0 _d 0
236     snowprecip_exfremo_slope = 0.0 _d 0
237    
238 heimbach 1.3 runoffstartdate1 = 0
239     runoffstartdate2 = 0
240     runoffperiod = 0.0 _d 0
241 heimbach 1.7 runoffconst = 0.0 _d 0
242 heimbach 1.27 runoff_exfremo_intercept = 0.0 _d 0
243     runoff_exfremo_slope = 0.0 _d 0
244 heimbach 1.3
245 heimbach 1.1 ustressstartdate1 = 0
246     ustressstartdate2 = 0
247     ustressperiod = 0.0 _d 0
248 heimbach 1.7 ustressconst = 0.0 _d 0
249 heimbach 1.27 ustress_exfremo_intercept = 0.0 _d 0
250     ustress_exfremo_slope = 0.0 _d 0
251 heimbach 1.1
252     vstressstartdate1 = 0
253     vstressstartdate2 = 0
254     vstressperiod = 0.0 _d 0
255 heimbach 1.7 vstressconst = 0.0 _d 0
256 heimbach 1.27 vstress_exfremo_intercept = 0.0 _d 0
257     vstress_exfremo_slope = 0.0 _d 0
258 heimbach 1.1
259     uwindstartdate1 = 0
260     uwindstartdate2 = 0
261     uwindperiod = 0.0 _d 0
262 heimbach 1.7 uwindconst = 0.0 _d 0
263 heimbach 1.27 uwind_exfremo_intercept = 0.0 _d 0
264     uwind_exfremo_slope = 0.0 _d 0
265 heimbach 1.1
266     vwindstartdate1 = 0
267     vwindstartdate2 = 0
268     vwindperiod = 0.0 _d 0
269 heimbach 1.7 vwindconst = 0.0 _d 0
270 heimbach 1.27 vwind_exfremo_intercept = 0.0 _d 0
271     vwind_exfremo_slope = 0.0 _d 0
272 heimbach 1.1
273 heimbach 1.30 wspeedstartdate1 = 0
274     wspeedstartdate2 = 0
275     wspeedperiod = 0.0 _d 0
276     wspeedconst = 0.0 _d 0
277     wspeed_exfremo_intercept = 0.0 _d 0
278     wspeed_exfremo_slope = 0.0 _d 0
279    
280 heimbach 1.1 swfluxstartdate1 = 0
281     swfluxstartdate2 = 0
282     swfluxperiod = 0.0 _d 0
283 heimbach 1.7 swfluxconst = 0.0 _d 0
284 heimbach 1.27 swflux_exfremo_intercept = 0.0 _d 0
285     swflux_exfremo_slope = 0.0 _d 0
286 heimbach 1.1
287     lwfluxstartdate1 = 0
288     lwfluxstartdate2 = 0
289     lwfluxperiod = 0.0 _d 0
290 heimbach 1.7 lwfluxconst = 0.0 _d 0
291 heimbach 1.27 lwflux_exfremo_intercept = 0.0 _d 0
292     lwflux_exfremo_slope = 0.0 _d 0
293 heimbach 1.1
294 dimitri 1.6 swdownstartdate1 = 0
295     swdownstartdate2 = 0
296     swdownperiod = 0.0 _d 0
297 heimbach 1.7 swdownconst = 0.0 _d 0
298 heimbach 1.27 swdown_exfremo_intercept = 0.0 _d 0
299     swdown_exfremo_slope = 0.0 _d 0
300 dimitri 1.6
301     lwdownstartdate1 = 0
302     lwdownstartdate2 = 0
303     lwdownperiod = 0.0 _d 0
304 heimbach 1.7 lwdownconst = 0.0 _d 0
305 heimbach 1.27 lwdown_exfremo_intercept = 0.0 _d 0
306     lwdown_exfremo_slope = 0.0 _d 0
307    
308     apressurestartdate1 = 0
309     apressurestartdate2 = 0
310     apressureperiod = 0.0 _d 0
311     apressureconst = 0.0 _d 0
312     apressure_exfremo_intercept = 0.0 _d 0
313     apressure_exfremo_slope = 0.0 _d 0
314 dimitri 1.6
315 heimbach 1.2 obcsNstartdate1 = 0
316     obcsNstartdate2 = 0
317     obcsNperiod = 0.0 _d 0
318    
319     obcsSstartdate1 = 0
320     obcsSstartdate2 = 0
321     obcsSperiod = 0.0 _d 0
322    
323     obcsEstartdate1 = 0
324     obcsEstartdate2 = 0
325     obcsEperiod = 0.0 _d 0
326    
327     obcsWstartdate1 = 0
328     obcsWstartdate2 = 0
329     obcsWperiod = 0.0 _d 0
330 heimbach 1.1
331 heimbach 1.30 repeatPeriod = 0.0 _d 0
332     exf_albedo = 0.1 _d 0
333     windstressmax = 2.0 _d 0
334     c-- this default is chosen to be backward compatible with
335 mlosch 1.31 c-- an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
336     ocean_emissivity = 5.50D-8/5.670D-8
337     ice_emissivity = 0.98 _d 0
338     snow_emissivity = 0.98 _d 0
339 cheisey 1.4
340 heimbach 1.1 c Data files.
341     hfluxfile = ' '
342     atempfile = ' '
343     aqhfile = ' '
344 dimitri 1.5 evapfile = ' '
345 heimbach 1.1 precipfile = ' '
346 heimbach 1.30 snowprecipfile = ' '
347 heimbach 1.1 sfluxfile = ' '
348 heimbach 1.3 runofffile = ' '
349 heimbach 1.1 ustressfile = ' '
350     vstressfile = ' '
351     uwindfile = ' '
352     vwindfile = ' '
353 heimbach 1.30 wspeedfile = ' '
354 heimbach 1.1 swfluxfile = ' '
355     lwfluxfile = ' '
356 dimitri 1.6 swdownfile = ' '
357     lwdownfile = ' '
358 heimbach 1.3 apressurefile = ' '
359 heimbach 1.34 c
360     hflux0file = ' '
361     atemp0file = ' '
362     aqh0file = ' '
363     evap0file = ' '
364     precip0file = ' '
365     snowprecip0file = ' '
366     sflux0file = ' '
367     runoff0file = ' '
368     ustress0file = ' '
369     vstress0file = ' '
370     uwind0file = ' '
371     vwind0file = ' '
372     wspeed0file = ' '
373     swflux0file = ' '
374     lwflux0file = ' '
375     swdown0file = ' '
376     lwdown0file = ' '
377     apressure0file = ' '
378 heimbach 1.1
379 dimitri 1.13 c Start dates.
380 dimitri 1.24 hfluxstartdate = 0.
381     atempstartdate = 0.
382     aqhstartdate = 0.
383     evapstartdate = 0.
384     precipstartdate = 0.
385 heimbach 1.30 snowprecipstartdate = 0.
386 dimitri 1.24 sfluxstartdate = 0.
387     runoffstartdate = 0.
388     ustressstartdate = 0.
389     vstressstartdate = 0.
390     uwindstartdate = 0.
391     vwindstartdate = 0.
392 heimbach 1.30 wspeedstartdate = 0.
393 dimitri 1.24 swfluxstartdate = 0.
394     lwfluxstartdate = 0.
395     swdownstartdate = 0.
396     lwdownstartdate = 0.
397     obcsNstartdate = 0.
398     obcsSstartdate = 0.
399     obcsEstartdate = 0.
400     obcsWstartdate = 0.
401     apressurestartdate = 0.
402 heimbach 1.1
403     c Initialise file type and field precision
404 heimbach 1.20 exf_iprec = 32
405     exf_yftype = 'RL'
406     useExfYearlyFields = .FALSE.
407 dimitri 1.25 twoDigitYear = .FALSE.
408 heimbach 1.22 useExfCheckRange = .TRUE.
409 heimbach 1.1
410 dimitri 1.6 c Input scaling factors.
411 heimbach 1.8 exf_inscal_hflux = 1. _d 0
412     exf_inscal_sflux = 1. _d 0
413     exf_inscal_ustress = 1. _d 0
414     exf_inscal_vstress = 1. _d 0
415     exf_inscal_uwind = 1. _d 0
416     exf_inscal_vwind = 1. _d 0
417 heimbach 1.30 exf_inscal_wspeed = 1. _d 0
418 heimbach 1.8 exf_inscal_swflux = 1. _d 0
419     exf_inscal_lwflux = 1. _d 0
420     exf_inscal_precip = 1. _d 0
421 heimbach 1.30 exf_inscal_snowprecip = 1. _d 0
422 dimitri 1.6 exf_inscal_sst = 1. _d 0
423     exf_inscal_sss = 1. _d 0
424 heimbach 1.8 exf_inscal_atemp = 1. _d 0
425 dimitri 1.14 exf_offset_atemp = 0. _d 0
426 heimbach 1.8 exf_inscal_aqh = 1. _d 0
427     exf_inscal_evap = 1. _d 0
428 dimitri 1.6 exf_inscal_apressure = 1. _d 0
429 heimbach 1.21 exf_inscal_runoff = 1. _d 0
430 heimbach 1.8 exf_inscal_swdown = 1. _d 0
431     exf_inscal_lwdown = 1. _d 0
432 dimitri 1.6
433     c Output scaling factors.
434 heimbach 1.8 exf_outscal_hflux = 1. _d 0
435     exf_outscal_sflux = 1. _d 0
436     exf_outscal_ustress = 1. _d 0
437     exf_outscal_vstress = 1. _d 0
438     exf_outscal_swflux = 1. _d 0
439 dimitri 1.6 exf_outscal_sst = 1. _d 0
440     exf_outscal_sss = 1. _d 0
441     exf_outscal_apressure= 1. _d 0
442 heimbach 1.3
443 dimitri 1.19 #ifdef USE_EXF_INTERPOLATION
444     ustress_lon0 = thetaMin
445     uwind_lon0 = thetaMin
446     vstress_lon0 = thetaMin + delX(1) / 2
447     hflux_lon0 = thetaMin + delX(1) / 2
448     sflux_lon0 = thetaMin + delX(1) / 2
449     swflux_lon0 = thetaMin + delX(1) / 2
450     runoff_lon0 = thetaMin + delX(1) / 2
451     atemp_lon0 = thetaMin + delX(1) / 2
452     aqh_lon0 = thetaMin + delX(1) / 2
453     evap_lon0 = thetaMin + delX(1) / 2
454     precip_lon0 = thetaMin + delX(1) / 2
455 heimbach 1.30 snowprecip_lon0 = thetaMin + delX(1) / 2
456 dimitri 1.19 vwind_lon0 = thetaMin + delX(1) / 2
457 heimbach 1.30 wspeed_lon0 = thetaMin + delX(1) / 2
458 dimitri 1.19 lwflux_lon0 = thetaMin + delX(1) / 2
459     swdown_lon0 = thetaMin + delX(1) / 2
460     lwdown_lon0 = thetaMin + delX(1) / 2
461     apressure_lon0 = thetaMin + delX(1) / 2
462     vstress_lat0 = phimin
463     vwind_lat0 = phimin
464 heimbach 1.30 wspeed_lat0 = phimin
465 dimitri 1.19 ustress_lat0 = phimin + delY(1) / 2
466     hflux_lat0 = phimin + delY(1) / 2
467     sflux_lat0 = phimin + delY(1) / 2
468     runoff_lat0 = phimin + delY(1) / 2
469     swflux_lat0 = phimin + delY(1) / 2
470     atemp_lat0 = phimin + delY(1) / 2
471     aqh_lat0 = phimin + delY(1) / 2
472     evap_lat0 = phimin + delY(1) / 2
473     precip_lat0 = phimin + delY(1) / 2
474 heimbach 1.30 snowprecip_lat0 = phimin + delY(1) / 2
475 dimitri 1.19 uwind_lat0 = phimin + delY(1) / 2
476     lwflux_lat0 = phimin + delY(1) / 2
477     swdown_lat0 = phimin + delY(1) / 2
478     lwdown_lat0 = phimin + delY(1) / 2
479     apressure_lat0 = phimin + delY(1) / 2
480     ustress_nlon = Nx
481     ustress_nlat = Ny
482     vstress_nlon = Nx
483     vstress_nlat = Ny
484     hflux_nlon = Nx
485     hflux_nlat = Ny
486     sflux_nlon = Nx
487     sflux_nlat = Ny
488     swflux_nlon = Nx
489     swflux_nlat = Ny
490     runoff_nlon = Nx
491     runoff_nlat = Ny
492     atemp_nlon = Nx
493     atemp_nlat = Ny
494     aqh_nlon = Nx
495     aqh_nlat = Ny
496     evap_nlon = Nx
497     evap_nlat = Ny
498     precip_nlon = Nx
499 heimbach 1.30 snowprecip_nlon = Nx
500 dimitri 1.19 precip_nlat = Ny
501 heimbach 1.30 snowprecip_nlat = Ny
502 dimitri 1.19 uwind_nlon = Nx
503     uwind_nlat = Ny
504     vwind_nlon = Nx
505     vwind_nlat = Ny
506 heimbach 1.30 wspeed_nlon = Nx
507     wspeed_nlat = Ny
508 dimitri 1.19 lwflux_nlon = Nx
509     lwflux_nlat = Ny
510     swdown_nlon = Nx
511     swdown_nlat = Ny
512     lwdown_nlon = Nx
513     lwdown_nlat = Ny
514     apressure_nlon = Nx
515     apressure_nlat = Ny
516     Ustress_lon_inc = delX(1)
517     vstress_lon_inc = delX(1)
518     hflux_lon_inc = delX(1)
519     sflux_lon_inc = delX(1)
520     swflux_lon_inc = delX(1)
521     runoff_lon_inc = delX(1)
522     atemp_lon_inc = delX(1)
523     aqh_lon_inc = delX(1)
524     evap_lon_inc = delX(1)
525     precip_lon_inc = delX(1)
526 heimbach 1.30 snowprecip_lon_inc = delX(1)
527 dimitri 1.19 uwind_lon_inc = delX(1)
528     vwind_lon_inc = delX(1)
529 heimbach 1.30 wspeed_lon_inc = delX(1)
530 dimitri 1.19 lwflux_lon_inc = delX(1)
531     swdown_lon_inc = delX(1)
532     lwdown_lon_inc = delX(1)
533     apressure_lon_inc = delX(1)
534     DO i=1,MAX_LAT_INC
535     IF (i.LT.Ny) THEN
536     vstress_lat_inc(i) = delY(i)
537     vwind_lat_inc(i) = delY(i)
538 heimbach 1.30 wspeed_lat_inc(i) = delY(i)
539 dimitri 1.19 ustress_lat_inc(i) = (delY(i) + delY(i)) / 2.
540     hflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
541     sflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
542     swflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
543     runoff_lat_inc(i) = (delY(i) + delY(i)) / 2.
544     atemp_lat_inc(i) = (delY(i) + delY(i)) / 2.
545     aqh_lat_inc(i) = (delY(i) + delY(i)) / 2.
546     evap_lat_inc(i) = (delY(i) + delY(i)) / 2.
547     precip_lat_inc(i) = (delY(i) + delY(i)) / 2.
548 heimbach 1.30 snowprecip_lat_inc(i) = (delY(i) + delY(i)) / 2.
549 dimitri 1.19 uwind_lat_inc(i) = (delY(i) + delY(i)) / 2.
550     lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2.
551     swdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
552     lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2.
553     apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.
554     ELSE
555     ustress_lat_inc(i) = 0.
556     vstress_lat_inc(i) = 0.
557     hflux_lat_inc(i) = 0.
558     sflux_lat_inc(i) = 0.
559     swflux_lat_inc(i) = 0.
560     runoff_lat_inc(i) = 0.
561     atemp_lat_inc(i) = 0.
562     aqh_lat_inc(i) = 0.
563     evap_lat_inc(i) = 0.
564     precip_lat_inc(i) = 0.
565 heimbach 1.30 snowprecip_lat_inc(i) = 0.
566 dimitri 1.19 uwind_lat_inc(i) = 0.
567     vwind_lat_inc(i) = 0.
568 heimbach 1.30 wspeed_lat_inc(i) = 0.
569 dimitri 1.19 lwflux_lat_inc(i) = 0.
570     swdown_lat_inc(i) = 0.
571     lwdown_lat_inc(i) = 0.
572     apressure_lat_inc(i) = 0.
573     ENDIF
574     ENDDO
575     #endif /* USE_EXF_INTERPOLATION */
576    
577 heimbach 1.1 c Check for the availability of the right calendar version.
578     if ( calendarversion .ne. usescalendarversion ) then
579     print*,' exf_readparms: You are not using the appropriate'
580     print*,' version of the calendar package.'
581     print*
582     print*,' You are using Calendar version: ', calendarversion
583     print*,' Please use Calendar version: ', usescalendarversion
584     stop ' stopped in exf_readparms.'
585     endif
586    
587     c Next, read the forcing data file.
588 heimbach 1.26 WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
589     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
590     & SQUEEZE_RIGHT , 1)
591    
592     CALL OPEN_COPY_DATA_FILE(
593     I 'data.exf', 'EXF_READPARMS',
594     O iUnit,
595     I myThid )
596    
597     READ( iUnit, nml = exf_nml )
598    
599     WRITE(msgBuf,'(A)')
600     & 'EXF_READPARMS: finished reading data.exf'
601     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
602     & SQUEEZE_RIGHT , 1)
603    
604     CLOSE( iUnit )
605 heimbach 1.1
606 heimbach 1.20 call exf_check( mythid )
607    
608 heimbach 1.1 c Complete the start date specifications for the forcing
609     c fields to get a complete calendar date array.
610    
611 dimitri 1.6 #ifdef ALLOW_ATM_WIND
612 heimbach 1.18 if ( uwindfile .NE. ' ' ) then
613     call cal_FullDate ( uwindstartdate1 , uwindstartdate2,
614     & date_array ,mythid )
615     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
616     call cal_ToSeconds ( difftime, uwindstartdate ,mythid )
617     uwindstartdate = modelstart + uwindstartdate
618     endif
619     if ( vwindfile .NE. ' ' ) then
620     call cal_FullDate ( vwindstartdate1 , vwindstartdate2,
621     & date_array ,mythid )
622     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
623     call cal_ToSeconds ( difftime, vwindstartdate ,mythid )
624     vwindstartdate = modelstart + vwindstartdate
625     endif
626 heimbach 1.30 if ( wspeedfile .NE. ' ' ) then
627     call cal_FullDate ( wspeedstartdate1, wspeedstartdate2,
628     & date_array ,mythid )
629     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
630     call cal_ToSeconds ( difftime, wspeedstartdate ,mythid )
631     wspeedstartdate = modelstart + wspeedstartdate
632     endif
633 dimitri 1.6 #else
634 heimbach 1.18 if ( ustressfile .NE. ' ' ) then
635     call cal_FullDate ( ustressstartdate1 , ustressstartdate2,
636     & date_array ,mythid )
637     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
638     call cal_ToSeconds ( difftime, ustressstartdate ,mythid )
639     ustressstartdate = modelstart + ustressstartdate
640     endif
641     if ( vstressfile .NE. ' ' ) then
642     call cal_FullDate ( vstressstartdate1 , vstressstartdate2,
643     & date_array ,mythid )
644     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
645     call cal_ToSeconds ( difftime, vstressstartdate ,mythid )
646     vstressstartdate = modelstart + vstressstartdate
647     endif
648 heimbach 1.3 #endif
649    
650 heimbach 1.1 #ifdef ALLOW_ATM_TEMP
651 heimbach 1.18 if ( atempfile .NE. ' ' ) then
652     call cal_FullDate ( atempstartdate1 , atempstartdate2,
653     & date_array ,mythid )
654     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
655     call cal_ToSeconds ( difftime, atempstartdate ,mythid )
656     atempstartdate = modelstart + atempstartdate
657     endif
658     if ( aqhfile .NE. ' ' ) then
659     call cal_FullDate ( aqhstartdate1 , aqhstartdate2,
660     & date_array ,mythid )
661     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
662     call cal_ToSeconds ( difftime, aqhstartdate ,mythid )
663     aqhstartdate = modelstart + aqhstartdate
664     endif
665     if ( lwfluxfile .NE. ' ' ) then
666     call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2,
667     & date_array ,mythid )
668     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
669     call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid )
670     lwfluxstartdate = modelstart + lwfluxstartdate
671     endif
672     if ( precipfile .NE. ' ' ) then
673     call cal_FullDate ( precipstartdate1 , precipstartdate2,
674     & date_array ,mythid )
675     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
676     call cal_ToSeconds ( difftime, precipstartdate ,mythid )
677     precipstartdate = modelstart + precipstartdate
678     endif
679 heimbach 1.30 if ( snowprecipfile .NE. ' ' ) then
680     call cal_FullDate( snowprecipstartdate1, snowprecipstartdate2,
681     & date_array ,mythid )
682     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
683     call cal_ToSeconds ( difftime, snowprecipstartdate, mythid )
684     snowprecipstartdate = modelstart + snowprecipstartdate
685     endif
686 heimbach 1.1 #else
687 heimbach 1.18 if ( hfluxfile .NE. ' ' ) then
688     call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2,
689     & date_array ,mythid )
690     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
691     call cal_ToSeconds ( difftime, hfluxstartdate ,mythid )
692     hfluxstartdate = modelstart + hfluxstartdate
693     endif
694     if ( sfluxfile .NE. ' ' ) then
695     call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2,
696     & date_array ,mythid )
697     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
698     call cal_ToSeconds ( difftime, sfluxstartdate ,mythid )
699     sfluxstartdate = modelstart + sfluxstartdate
700     endif
701 heimbach 1.1 #endif
702    
703 dimitri 1.6 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
704 heimbach 1.18 if ( swfluxfile .NE. ' ' ) then
705     call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2,
706     & date_array ,mythid )
707     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
708     call cal_ToSeconds ( difftime, swfluxstartdate ,mythid )
709     swfluxstartdate = modelstart + swfluxstartdate
710     endif
711 heimbach 1.1 #endif
712    
713 dimitri 1.6 #ifdef EXF_READ_EVAP
714 heimbach 1.18 if ( evapfile .NE. ' ' ) then
715     call cal_FullDate ( evapstartdate1 , evapstartdate2,
716     & date_array ,mythid )
717     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
718     call cal_ToSeconds ( difftime, evapstartdate ,mythid )
719     evapstartdate = modelstart + evapstartdate
720     endif
721 heimbach 1.1 #endif
722    
723 dimitri 1.6 #ifdef ALLOW_RUNOFF
724 dimitri 1.24 if ( runofffile .NE. ' ' .AND. runoffperiod .NE. 0. ) then
725 heimbach 1.18 call cal_FullDate ( runoffstartdate1 , runoffstartdate2,
726     & date_array ,mythid )
727     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
728     call cal_ToSeconds ( difftime, runoffstartdate ,mythid )
729     runoffstartdate = modelstart + runoffstartdate
730     endif
731 heimbach 1.1 #endif
732    
733 dimitri 1.6 #ifdef ALLOW_DOWNWARD_RADIATION
734 heimbach 1.18 if ( swdownfile .NE. ' ' ) then
735     call cal_FullDate ( swdownstartdate1 , swdownstartdate2,
736     & date_array ,mythid )
737     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
738     call cal_ToSeconds ( difftime, swdownstartdate ,mythid )
739     swdownstartdate = modelstart + swdownstartdate
740     endif
741     if ( lwdownfile .NE. ' ' ) then
742     call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2,
743     & date_array ,mythid )
744     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
745     call cal_ToSeconds ( difftime, lwdownstartdate ,mythid )
746     lwdownstartdate = modelstart + lwdownstartdate
747     endif
748     #endif
749    
750     #ifdef ATMOSPHERIC_LOADING
751     if ( apressurefile .NE. ' ' ) then
752     call cal_FullDate ( apressurestartdate1, apressurestartdate2,
753     & date_array ,mythid )
754     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
755     call cal_ToSeconds ( difftime, apressurestartdate ,mythid )
756     apressurestartdate = modelstart + apressurestartdate
757     endif
758 heimbach 1.1 #endif
759    
760     #ifdef ALLOW_OBCS
761 heimbach 1.2 #ifdef ALLOW_OBCS_NORTH
762 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
763     call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2,
764     & date_array ,mythid )
765     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
766     call cal_ToSeconds ( difftime, obcsNstartdate ,mythid )
767     obcsNstartdate = modelstart + obcsNstartdate
768     endif
769 heimbach 1.2 #endif
770     #ifdef ALLOW_OBCS_SOUTH
771 heimbach 1.18 if ( obcsSperiod .NE. 0 ) then
772     call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2,
773     & date_array ,mythid )
774     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
775     call cal_ToSeconds ( difftime, obcsSstartdate ,mythid )
776     obcsSstartdate = modelstart + obcsSstartdate
777     endif
778 heimbach 1.2 #endif
779     #ifdef ALLOW_OBCS_EAST
780 heimbach 1.18 if ( obcsEperiod .NE. 0 ) then
781     call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2,
782     & date_array ,mythid )
783     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
784     call cal_ToSeconds ( difftime, obcsEstartdate ,mythid )
785     obcsEstartdate = modelstart + obcsEstartdate
786     endif
787 heimbach 1.2 #endif
788     #ifdef ALLOW_OBCS_WEST
789 heimbach 1.18 if ( obcsNperiod .NE. 0 ) then
790     call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2,
791     & date_array ,mythid )
792     call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
793     call cal_ToSeconds ( difftime, obcsWstartdate ,mythid )
794     obcsWstartdate = modelstart + obcsWstartdate
795     endif
796 heimbach 1.3 #endif
797 dimitri 1.6 #endif /* ALLOW_OBCS */
798 heimbach 1.3
799 heimbach 1.1 _END_MASTER( mythid )
800    
801     _BARRIER
802    
803     c-- Summarize the External forcing's setup.
804     call exf_summary( mythid )
805    
806     c-- set climatology parameters
807     call exf_clim_readparms( mythid )
808    
809     c-- summarize climatologic forcing configuration
810     call exf_clim_summary( mythid )
811    
812     end

  ViewVC Help
Powered by ViewVC 1.1.22