/[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.33 - (hide annotations) (download)
Mon Jun 19 23:20:48 2006 UTC (17 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58m_post, checkpoint58o_post, checkpoint58p_post, checkpoint58n_post, checkpoint58k_post, checkpoint58l_post
Changes since 1.32: +2 -1 lines
change exf_monitor: - independant of main-monitor (write it's own mnc file)
 - called from the end of S/R EXF_GETFORCING

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

  ViewVC Help
Powered by ViewVC 1.1.22