/[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.32 - (hide annotations) (download)
Mon Jun 5 22:51:23 2006 UTC (18 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58g_post, checkpoint58h_post, checkpoint58j_post, checkpoint58i_post
Changes since 1.31: +14 -24 lines
reach the maximum number of continuation lines (100) that the old ifc
 compiler can digest.

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

  ViewVC Help
Powered by ViewVC 1.1.22