/[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.30 - (hide annotations) (download)
Thu May 25 18:32:56 2006 UTC (18 years, 1 month ago) by heimbach
Branch: MAIN
Changes since 1.29: +82 -17 lines
o add new fields wspeed, snowprecip (to be able to couple to thsice)
o correct Stefan-Boltzmann constant
o new parameter for longwave surface emittance
o separate some stuff from exf_bulkformulae into new routines
  exf_radiation, exf_wind

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

  ViewVC Help
Powered by ViewVC 1.1.22