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