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 |
38 |
|
c added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002 |
39 |
c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002 |
c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002 |
40 |
c |
c |
41 |
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.h" |
54 |
#include "exf_param.h" |
#include "exf_param.h" |
61 |
c == local variables == |
c == local variables == |
62 |
|
|
63 |
integer i |
integer i |
64 |
|
integer date_array(4), difftime(4) |
65 |
|
integer iUnit |
66 |
|
|
67 |
c == external == |
character*(max_len_mbuf) msgbuf |
|
|
|
|
integer ilnblnk |
|
|
external ilnblnk |
|
68 |
|
|
69 |
c == end of interface == |
c == end of interface == |
70 |
|
|
71 |
c Surface flux data. |
c Surface flux data. |
72 |
namelist /exf_nml/ |
namelist /exf_nml/ |
73 |
|
& windstressmax, repeatPeriod, exf_albedo, |
74 |
|
& ocean_emissivity, ice_emissivity, snow_emissivity, |
75 |
& hfluxstartdate1, hfluxstartdate2, hfluxperiod, |
& hfluxstartdate1, hfluxstartdate2, hfluxperiod, |
76 |
& atempstartdate1, atempstartdate2, atempperiod, |
& atempstartdate1, atempstartdate2, atempperiod, |
77 |
& aqhstartdate1, aqhstartdate2, aqhperiod, |
& aqhstartdate1, aqhstartdate2, aqhperiod, |
78 |
& sfluxstartdate1, sfluxstartdate2, sfluxperiod, |
& sfluxstartdate1, sfluxstartdate2, sfluxperiod, |
79 |
& evapstartdate1, evapstartdate2, evapperiod, |
& evapstartdate1, evapstartdate2, evapperiod, |
80 |
& precipstartdate1, precipstartdate2, precipperiod, |
& precipstartdate1, precipstartdate2, precipperiod, |
81 |
|
& snowprecipstartdate1, snowprecipstartdate2, snowprecipperiod, |
82 |
& runoffstartdate1, runoffstartdate2, runoffperiod, |
& runoffstartdate1, runoffstartdate2, runoffperiod, |
83 |
& ustressstartdate1, ustressstartdate2, ustressperiod, |
& ustressstartdate1, ustressstartdate2, ustressperiod, |
84 |
& vstressstartdate1, vstressstartdate2, vstressperiod, |
& vstressstartdate1, vstressstartdate2, vstressperiod, |
85 |
& uwindstartdate1, uwindstartdate2, uwindperiod, |
& uwindstartdate1, uwindstartdate2, uwindperiod, |
86 |
& vwindstartdate1, vwindstartdate2, vwindperiod, |
& vwindstartdate1, vwindstartdate2, vwindperiod, |
87 |
|
& wspeedstartdate1, wspeedstartdate2, wspeedperiod, |
88 |
& swfluxstartdate1, swfluxstartdate2, swfluxperiod, |
& swfluxstartdate1, swfluxstartdate2, swfluxperiod, |
89 |
& lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod, |
& lwfluxstartdate1, lwfluxstartdate2, lwfluxperiod, |
90 |
& swdownstartdate1, swdownstartdate2, swdownperiod, |
& swdownstartdate1, swdownstartdate2, swdownperiod, |
97 |
& hfluxfile, atempfile, aqhfile, |
& hfluxfile, atempfile, aqhfile, |
98 |
& sfluxfile, precipfile, runofffile, |
& sfluxfile, precipfile, runofffile, |
99 |
& ustressfile, vstressfile, evapfile, |
& ustressfile, vstressfile, evapfile, |
100 |
& uwindfile, vwindfile, |
& snowprecipfile, uwindfile, vwindfile, |
101 |
& swfluxfile, lwfluxfile, apressurefile, |
& wspeedfile, swfluxfile, lwfluxfile, |
102 |
& swdownfile, lwdownfile, |
& apressurefile, swdownfile, lwdownfile, |
103 |
& exf_iprec, exf_yftype, |
& hflux0file, atemp0file, aqh0file, |
104 |
& exf_inscal_hfl, exf_inscal_ust, exf_inscal_vst, |
& sflux0file, precip0file, runoff0file, |
105 |
& exf_inscal_swf, exf_inscal_sst, exf_inscal_sss, |
& ustress0file, vstress0file, evap0file, |
106 |
& exf_inscal_sfl, exf_inscal_runoff,exf_inscal_apressure, |
& snowprecip0file, uwind0file, vwind0file, |
107 |
& exf_outscal_hfl, exf_outscal_ust,exf_outscal_vst, |
& wspeed0file, swflux0file, lwflux0file, |
108 |
& exf_outscal_swf, exf_outscal_sst,exf_outscal_sss, |
& apressure0file, swdown0file, lwdown0file, |
109 |
& exf_outscal_sfl, exf_outscal_apressure, |
& exf_iprec, exf_yftype, |
110 |
& EXFwindOnBgrid |
& useExfYearlyFields, twoDigitYear, useExfCheckRange, |
111 |
|
& exf_inscal_hflux, exf_inscal_sflux, exf_inscal_evap, |
112 |
|
& exf_inscal_ustress, exf_inscal_vstress, |
113 |
|
& exf_inscal_uwind, exf_inscal_vwind, exf_inscal_wspeed, |
114 |
|
& exf_inscal_atemp, exf_offset_atemp, exf_inscal_aqh, |
115 |
|
& exf_inscal_sst, exf_inscal_sss, |
116 |
|
& exf_inscal_swflux, exf_inscal_lwflux, exf_inscal_precip, |
117 |
|
& exf_inscal_runoff, exf_inscal_apressure, exf_inscal_snowprecip, |
118 |
|
& exf_inscal_swdown, exf_inscal_lwdown, |
119 |
|
& exf_outscal_hflux, exf_outscal_ustress, exf_outscal_vstress, |
120 |
|
& exf_outscal_swflux, exf_outscal_sst, exf_outscal_sss, |
121 |
|
& exf_outscal_sflux, exf_outscal_apressure, |
122 |
|
& hfluxconst, atempconst, aqhconst, sfluxconst, evapconst, |
123 |
|
& precipconst, snowprecipconst, runoffconst, ustressconst, |
124 |
|
& vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst, |
125 |
|
& lwfluxconst, swdownconst, lwdownconst, apressureconst, |
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 |
|
#ifdef USE_EXF_INTERPOLATION |
145 |
|
& ,ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc, |
146 |
|
& vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc, |
147 |
|
& ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat, |
148 |
|
& hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc, |
149 |
|
& sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc, |
150 |
|
& hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat, |
151 |
|
& swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc, |
152 |
|
& lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc, |
153 |
|
& swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat, |
154 |
|
& atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc, |
155 |
|
& atemp_nlon, atemp_nlat, |
156 |
|
& aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat, |
157 |
|
&evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat, |
158 |
|
& precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc, |
159 |
|
& runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc, |
160 |
|
& precip_nlon, precip_nlat, runoff_nlon, runoff_nlat, |
161 |
|
& snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon, |
162 |
|
& snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat, |
163 |
|
& uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc, |
164 |
|
& vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc, |
165 |
|
& uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat, |
166 |
|
& wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc, |
167 |
|
& wspeed_nlon, wspeed_nlat, |
168 |
|
& swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc, |
169 |
|
& lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc, |
170 |
|
& swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat, |
171 |
|
& apressure_lon0,apressure_lon_inc,apressure_nlon, |
172 |
|
& apressure_lat0,apressure_lat_inc,apressure_nlat |
173 |
|
#endif |
174 |
|
|
175 |
_BEGIN_MASTER(mythid) |
_BEGIN_MASTER(mythid) |
176 |
|
|
177 |
c Set default values. |
c Set default values. |
178 |
|
|
179 |
|
year2sec = 365.*86400. |
180 |
|
exf_monFreq = monitorFreq |
181 |
|
|
182 |
c Calendar data. |
c Calendar data. |
183 |
hfluxstartdate1 = 0 |
hfluxstartdate1 = 0 |
184 |
hfluxstartdate2 = 0 |
hfluxstartdate2 = 0 |
185 |
hfluxperiod = 0.0 _d 0 |
hfluxperiod = 0.0 _d 0 |
186 |
|
hfluxconst = 0.0 _d 0 |
187 |
|
hflux_exfremo_intercept = 0.0 _d 0 |
188 |
|
hflux_exfremo_slope = 0.0 _d 0 |
189 |
|
|
190 |
atempstartdate1 = 0 |
atempstartdate1 = 0 |
191 |
atempstartdate2 = 0 |
atempstartdate2 = 0 |
192 |
atempperiod = 0.0 _d 0 |
atempperiod = 0.0 _d 0 |
193 |
|
atempconst = celsius2K |
194 |
|
atemp_exfremo_intercept = 0.0 _d 0 |
195 |
|
atemp_exfremo_slope = 0.0 _d 0 |
196 |
|
|
197 |
aqhstartdate1 = 0 |
aqhstartdate1 = 0 |
198 |
aqhstartdate2 = 0 |
aqhstartdate2 = 0 |
199 |
aqhperiod = 0.0 _d 0 |
aqhperiod = 0.0 _d 0 |
200 |
|
aqhconst = 0.0 _d 0 |
201 |
|
aqh_exfremo_intercept = 0.0 _d 0 |
202 |
|
aqh_exfremo_slope = 0.0 _d 0 |
203 |
|
|
204 |
sfluxstartdate1 = 0 |
sfluxstartdate1 = 0 |
205 |
sfluxstartdate2 = 0 |
sfluxstartdate2 = 0 |
206 |
sfluxperiod = 0.0 _d 0 |
sfluxperiod = 0.0 _d 0 |
207 |
|
sfluxconst = 0.0 _d 0 |
208 |
|
sflux_exfremo_intercept = 0.0 _d 0 |
209 |
|
sflux_exfremo_slope = 0.0 _d 0 |
210 |
|
|
211 |
evapstartdate1 = 0 |
evapstartdate1 = 0 |
212 |
evapstartdate2 = 0 |
evapstartdate2 = 0 |
213 |
evapperiod = 0.0 _d 0 |
evapperiod = 0.0 _d 0 |
214 |
|
evapconst = 0.0 _d 0 |
215 |
|
evap_exfremo_intercept = 0.0 _d 0 |
216 |
|
evap_exfremo_slope = 0.0 _d 0 |
217 |
|
|
218 |
precipstartdate1 = 0 |
precipstartdate1 = 0 |
219 |
precipstartdate2 = 0 |
precipstartdate2 = 0 |
220 |
precipperiod = 0.0 _d 0 |
precipperiod = 0.0 _d 0 |
221 |
|
precipconst = 0.0 _d 0 |
222 |
|
precip_exfremo_intercept = 0.0 _d 0 |
223 |
|
precip_exfremo_slope = 0.0 _d 0 |
224 |
|
|
225 |
|
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 |
runoffstartdate1 = 0 |
runoffstartdate1 = 0 |
233 |
runoffstartdate2 = 0 |
runoffstartdate2 = 0 |
234 |
runoffperiod = 0.0 _d 0 |
runoffperiod = 0.0 _d 0 |
235 |
|
runoffconst = 0.0 _d 0 |
236 |
|
runoff_exfremo_intercept = 0.0 _d 0 |
237 |
|
runoff_exfremo_slope = 0.0 _d 0 |
238 |
|
|
239 |
ustressstartdate1 = 0 |
ustressstartdate1 = 0 |
240 |
ustressstartdate2 = 0 |
ustressstartdate2 = 0 |
241 |
ustressperiod = 0.0 _d 0 |
ustressperiod = 0.0 _d 0 |
242 |
|
ustressconst = 0.0 _d 0 |
243 |
|
ustress_exfremo_intercept = 0.0 _d 0 |
244 |
|
ustress_exfremo_slope = 0.0 _d 0 |
245 |
|
|
246 |
vstressstartdate1 = 0 |
vstressstartdate1 = 0 |
247 |
vstressstartdate2 = 0 |
vstressstartdate2 = 0 |
248 |
vstressperiod = 0.0 _d 0 |
vstressperiod = 0.0 _d 0 |
249 |
|
vstressconst = 0.0 _d 0 |
250 |
|
vstress_exfremo_intercept = 0.0 _d 0 |
251 |
|
vstress_exfremo_slope = 0.0 _d 0 |
252 |
|
|
253 |
uwindstartdate1 = 0 |
uwindstartdate1 = 0 |
254 |
uwindstartdate2 = 0 |
uwindstartdate2 = 0 |
255 |
uwindperiod = 0.0 _d 0 |
uwindperiod = 0.0 _d 0 |
256 |
|
uwindconst = 0.0 _d 0 |
257 |
|
uwind_exfremo_intercept = 0.0 _d 0 |
258 |
|
uwind_exfremo_slope = 0.0 _d 0 |
259 |
|
|
260 |
vwindstartdate1 = 0 |
vwindstartdate1 = 0 |
261 |
vwindstartdate2 = 0 |
vwindstartdate2 = 0 |
262 |
vwindperiod = 0.0 _d 0 |
vwindperiod = 0.0 _d 0 |
263 |
|
vwindconst = 0.0 _d 0 |
264 |
|
vwind_exfremo_intercept = 0.0 _d 0 |
265 |
|
vwind_exfremo_slope = 0.0 _d 0 |
266 |
|
|
267 |
|
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 |
swfluxstartdate1 = 0 |
swfluxstartdate1 = 0 |
275 |
swfluxstartdate2 = 0 |
swfluxstartdate2 = 0 |
276 |
swfluxperiod = 0.0 _d 0 |
swfluxperiod = 0.0 _d 0 |
277 |
|
swfluxconst = 0.0 _d 0 |
278 |
|
swflux_exfremo_intercept = 0.0 _d 0 |
279 |
|
swflux_exfremo_slope = 0.0 _d 0 |
280 |
|
|
281 |
lwfluxstartdate1 = 0 |
lwfluxstartdate1 = 0 |
282 |
lwfluxstartdate2 = 0 |
lwfluxstartdate2 = 0 |
283 |
lwfluxperiod = 0.0 _d 0 |
lwfluxperiod = 0.0 _d 0 |
284 |
|
lwfluxconst = 0.0 _d 0 |
285 |
|
lwflux_exfremo_intercept = 0.0 _d 0 |
286 |
|
lwflux_exfremo_slope = 0.0 _d 0 |
287 |
|
|
288 |
swdownstartdate1 = 0 |
swdownstartdate1 = 0 |
289 |
swdownstartdate2 = 0 |
swdownstartdate2 = 0 |
290 |
swdownperiod = 0.0 _d 0 |
swdownperiod = 0.0 _d 0 |
291 |
|
swdownconst = 0.0 _d 0 |
292 |
|
swdown_exfremo_intercept = 0.0 _d 0 |
293 |
|
swdown_exfremo_slope = 0.0 _d 0 |
294 |
|
|
295 |
lwdownstartdate1 = 0 |
lwdownstartdate1 = 0 |
296 |
lwdownstartdate2 = 0 |
lwdownstartdate2 = 0 |
297 |
lwdownperiod = 0.0 _d 0 |
lwdownperiod = 0.0 _d 0 |
298 |
|
lwdownconst = 0.0 _d 0 |
299 |
|
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 |
|
|
309 |
obcsNstartdate1 = 0 |
obcsNstartdate1 = 0 |
310 |
obcsNstartdate2 = 0 |
obcsNstartdate2 = 0 |
322 |
obcsWstartdate2 = 0 |
obcsWstartdate2 = 0 |
323 |
obcsWperiod = 0.0 _d 0 |
obcsWperiod = 0.0 _d 0 |
324 |
|
|
325 |
apressurestartdate1 = 0 |
repeatPeriod = 0.0 _d 0 |
326 |
apressurestartdate2 = 0 |
exf_albedo = 0.1 _d 0 |
327 |
apressureperiod = 0.0 _d 0 |
windstressmax = 2.0 _d 0 |
328 |
|
c-- this default is chosen to be backward compatible with |
329 |
|
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 |
|
|
334 |
c Data files. |
c Data files. |
335 |
hfluxfile = ' ' |
hfluxfile = ' ' |
337 |
aqhfile = ' ' |
aqhfile = ' ' |
338 |
evapfile = ' ' |
evapfile = ' ' |
339 |
precipfile = ' ' |
precipfile = ' ' |
340 |
|
snowprecipfile = ' ' |
341 |
sfluxfile = ' ' |
sfluxfile = ' ' |
342 |
runofffile = ' ' |
runofffile = ' ' |
343 |
ustressfile = ' ' |
ustressfile = ' ' |
344 |
vstressfile = ' ' |
vstressfile = ' ' |
345 |
uwindfile = ' ' |
uwindfile = ' ' |
346 |
vwindfile = ' ' |
vwindfile = ' ' |
347 |
|
wspeedfile = ' ' |
348 |
swfluxfile = ' ' |
swfluxfile = ' ' |
349 |
lwfluxfile = ' ' |
lwfluxfile = ' ' |
350 |
swdownfile = ' ' |
swdownfile = ' ' |
351 |
lwdownfile = ' ' |
lwdownfile = ' ' |
352 |
apressurefile = ' ' |
apressurefile = ' ' |
353 |
|
c |
354 |
c Initialise the date arrays. |
hflux0file = ' ' |
355 |
do i = 1,4 |
atemp0file = ' ' |
356 |
hfluxstartdate(i) = 0 |
aqh0file = ' ' |
357 |
atempstartdate(i) = 0 |
evap0file = ' ' |
358 |
aqhstartdate(i) = 0 |
precip0file = ' ' |
359 |
evapstartdate(i) = 0 |
snowprecip0file = ' ' |
360 |
precipstartdate(i) = 0 |
sflux0file = ' ' |
361 |
sfluxstartdate(i) = 0 |
runoff0file = ' ' |
362 |
runoffstartdate(i) = 0 |
ustress0file = ' ' |
363 |
ustressstartdate(i) = 0 |
vstress0file = ' ' |
364 |
vstressstartdate(i) = 0 |
uwind0file = ' ' |
365 |
uwindstartdate(i) = 0 |
vwind0file = ' ' |
366 |
vwindstartdate(i) = 0 |
wspeed0file = ' ' |
367 |
swfluxstartdate(i) = 0 |
swflux0file = ' ' |
368 |
lwfluxstartdate(i) = 0 |
lwflux0file = ' ' |
369 |
swdownstartdate(i) = 0 |
swdown0file = ' ' |
370 |
lwdownstartdate(i) = 0 |
lwdown0file = ' ' |
371 |
obcsNstartdate(i) = 0 |
apressure0file = ' ' |
372 |
obcsSstartdate(i) = 0 |
|
373 |
obcsEstartdate(i) = 0 |
c Start dates. |
374 |
obcsWstartdate(i) = 0 |
hfluxstartdate = 0. |
375 |
apressurestartdate(i)= 0 |
atempstartdate = 0. |
376 |
enddo |
aqhstartdate = 0. |
377 |
|
evapstartdate = 0. |
378 |
|
precipstartdate = 0. |
379 |
|
snowprecipstartdate = 0. |
380 |
|
sfluxstartdate = 0. |
381 |
|
runoffstartdate = 0. |
382 |
|
ustressstartdate = 0. |
383 |
|
vstressstartdate = 0. |
384 |
|
uwindstartdate = 0. |
385 |
|
vwindstartdate = 0. |
386 |
|
wspeedstartdate = 0. |
387 |
|
swfluxstartdate = 0. |
388 |
|
lwfluxstartdate = 0. |
389 |
|
swdownstartdate = 0. |
390 |
|
lwdownstartdate = 0. |
391 |
|
obcsNstartdate = 0. |
392 |
|
obcsSstartdate = 0. |
393 |
|
obcsEstartdate = 0. |
394 |
|
obcsWstartdate = 0. |
395 |
|
apressurestartdate = 0. |
396 |
|
|
397 |
c Initialise file type and field precision |
c Initialise file type and field precision |
398 |
exf_iprec = 32 |
exf_iprec = 32 |
399 |
exf_yftype = 'RL' |
exf_yftype = 'RL' |
400 |
|
useExfYearlyFields = .FALSE. |
401 |
|
twoDigitYear = .FALSE. |
402 |
|
useExfCheckRange = .TRUE. |
403 |
|
|
404 |
c Input scaling factors. |
c Input scaling factors. |
405 |
exf_inscal_hfl = 1. _d 0 |
exf_inscal_hflux = 1. _d 0 |
406 |
exf_inscal_ust = 1. _d 0 |
exf_inscal_sflux = 1. _d 0 |
407 |
exf_inscal_vst = 1. _d 0 |
exf_inscal_ustress = 1. _d 0 |
408 |
exf_inscal_swf = 1. _d 0 |
exf_inscal_vstress = 1. _d 0 |
409 |
|
exf_inscal_uwind = 1. _d 0 |
410 |
|
exf_inscal_vwind = 1. _d 0 |
411 |
|
exf_inscal_wspeed = 1. _d 0 |
412 |
|
exf_inscal_swflux = 1. _d 0 |
413 |
|
exf_inscal_lwflux = 1. _d 0 |
414 |
|
exf_inscal_precip = 1. _d 0 |
415 |
|
exf_inscal_snowprecip = 1. _d 0 |
416 |
exf_inscal_sst = 1. _d 0 |
exf_inscal_sst = 1. _d 0 |
417 |
exf_inscal_sss = 1. _d 0 |
exf_inscal_sss = 1. _d 0 |
418 |
|
exf_inscal_atemp = 1. _d 0 |
419 |
|
exf_offset_atemp = 0. _d 0 |
420 |
|
exf_inscal_aqh = 1. _d 0 |
421 |
|
exf_inscal_evap = 1. _d 0 |
422 |
exf_inscal_apressure = 1. _d 0 |
exf_inscal_apressure = 1. _d 0 |
423 |
exf_inscal_sfl = 1. _d 0 |
exf_inscal_runoff = 1. _d 0 |
424 |
cds convert runoff from m/yr to m/s and change sign. |
exf_inscal_swdown = 1. _d 0 |
425 |
exf_inscal_runoff = -1.0/(86400.*365.0) |
exf_inscal_lwdown = 1. _d 0 |
426 |
|
|
427 |
c Output scaling factors. |
c Output scaling factors. |
428 |
exf_outscal_hfl = 1. _d 0 |
exf_outscal_hflux = 1. _d 0 |
429 |
exf_outscal_ust = 1. _d 0 |
exf_outscal_sflux = 1. _d 0 |
430 |
exf_outscal_vst = 1. _d 0 |
exf_outscal_ustress = 1. _d 0 |
431 |
exf_outscal_swf = 1. _d 0 |
exf_outscal_vstress = 1. _d 0 |
432 |
|
exf_outscal_swflux = 1. _d 0 |
433 |
exf_outscal_sst = 1. _d 0 |
exf_outscal_sst = 1. _d 0 |
434 |
exf_outscal_sss = 1. _d 0 |
exf_outscal_sss = 1. _d 0 |
435 |
exf_outscal_apressure= 1. _d 0 |
exf_outscal_apressure= 1. _d 0 |
436 |
exf_outscal_sfl = 1. _d 0 |
|
437 |
c |
#ifdef USE_EXF_INTERPOLATION |
438 |
EXFwindOnBgrid = .FALSE. |
ustress_lon0 = thetaMin |
439 |
|
uwind_lon0 = thetaMin |
440 |
|
vstress_lon0 = thetaMin + delX(1) / 2 |
441 |
|
hflux_lon0 = thetaMin + delX(1) / 2 |
442 |
|
sflux_lon0 = thetaMin + delX(1) / 2 |
443 |
|
swflux_lon0 = thetaMin + delX(1) / 2 |
444 |
|
runoff_lon0 = thetaMin + delX(1) / 2 |
445 |
|
atemp_lon0 = thetaMin + delX(1) / 2 |
446 |
|
aqh_lon0 = thetaMin + delX(1) / 2 |
447 |
|
evap_lon0 = thetaMin + delX(1) / 2 |
448 |
|
precip_lon0 = thetaMin + delX(1) / 2 |
449 |
|
snowprecip_lon0 = thetaMin + delX(1) / 2 |
450 |
|
vwind_lon0 = thetaMin + delX(1) / 2 |
451 |
|
wspeed_lon0 = thetaMin + delX(1) / 2 |
452 |
|
lwflux_lon0 = thetaMin + delX(1) / 2 |
453 |
|
swdown_lon0 = thetaMin + delX(1) / 2 |
454 |
|
lwdown_lon0 = thetaMin + delX(1) / 2 |
455 |
|
apressure_lon0 = thetaMin + delX(1) / 2 |
456 |
|
vstress_lat0 = phimin |
457 |
|
vwind_lat0 = phimin |
458 |
|
wspeed_lat0 = phimin |
459 |
|
ustress_lat0 = phimin + delY(1) / 2 |
460 |
|
hflux_lat0 = phimin + delY(1) / 2 |
461 |
|
sflux_lat0 = phimin + delY(1) / 2 |
462 |
|
runoff_lat0 = phimin + delY(1) / 2 |
463 |
|
swflux_lat0 = phimin + delY(1) / 2 |
464 |
|
atemp_lat0 = phimin + delY(1) / 2 |
465 |
|
aqh_lat0 = phimin + delY(1) / 2 |
466 |
|
evap_lat0 = phimin + delY(1) / 2 |
467 |
|
precip_lat0 = phimin + delY(1) / 2 |
468 |
|
snowprecip_lat0 = phimin + delY(1) / 2 |
469 |
|
uwind_lat0 = phimin + delY(1) / 2 |
470 |
|
lwflux_lat0 = phimin + delY(1) / 2 |
471 |
|
swdown_lat0 = phimin + delY(1) / 2 |
472 |
|
lwdown_lat0 = phimin + delY(1) / 2 |
473 |
|
apressure_lat0 = phimin + delY(1) / 2 |
474 |
|
ustress_nlon = Nx |
475 |
|
ustress_nlat = Ny |
476 |
|
vstress_nlon = Nx |
477 |
|
vstress_nlat = Ny |
478 |
|
hflux_nlon = Nx |
479 |
|
hflux_nlat = Ny |
480 |
|
sflux_nlon = Nx |
481 |
|
sflux_nlat = Ny |
482 |
|
swflux_nlon = Nx |
483 |
|
swflux_nlat = Ny |
484 |
|
runoff_nlon = Nx |
485 |
|
runoff_nlat = Ny |
486 |
|
atemp_nlon = Nx |
487 |
|
atemp_nlat = Ny |
488 |
|
aqh_nlon = Nx |
489 |
|
aqh_nlat = Ny |
490 |
|
evap_nlon = Nx |
491 |
|
evap_nlat = Ny |
492 |
|
precip_nlon = Nx |
493 |
|
snowprecip_nlon = Nx |
494 |
|
precip_nlat = Ny |
495 |
|
snowprecip_nlat = Ny |
496 |
|
uwind_nlon = Nx |
497 |
|
uwind_nlat = Ny |
498 |
|
vwind_nlon = Nx |
499 |
|
vwind_nlat = Ny |
500 |
|
wspeed_nlon = Nx |
501 |
|
wspeed_nlat = Ny |
502 |
|
lwflux_nlon = Nx |
503 |
|
lwflux_nlat = Ny |
504 |
|
swdown_nlon = Nx |
505 |
|
swdown_nlat = Ny |
506 |
|
lwdown_nlon = Nx |
507 |
|
lwdown_nlat = Ny |
508 |
|
apressure_nlon = Nx |
509 |
|
apressure_nlat = Ny |
510 |
|
Ustress_lon_inc = delX(1) |
511 |
|
vstress_lon_inc = delX(1) |
512 |
|
hflux_lon_inc = delX(1) |
513 |
|
sflux_lon_inc = delX(1) |
514 |
|
swflux_lon_inc = delX(1) |
515 |
|
runoff_lon_inc = delX(1) |
516 |
|
atemp_lon_inc = delX(1) |
517 |
|
aqh_lon_inc = delX(1) |
518 |
|
evap_lon_inc = delX(1) |
519 |
|
precip_lon_inc = delX(1) |
520 |
|
snowprecip_lon_inc = delX(1) |
521 |
|
uwind_lon_inc = delX(1) |
522 |
|
vwind_lon_inc = delX(1) |
523 |
|
wspeed_lon_inc = delX(1) |
524 |
|
lwflux_lon_inc = delX(1) |
525 |
|
swdown_lon_inc = delX(1) |
526 |
|
lwdown_lon_inc = delX(1) |
527 |
|
apressure_lon_inc = delX(1) |
528 |
|
DO i=1,MAX_LAT_INC |
529 |
|
IF (i.LT.Ny) THEN |
530 |
|
vstress_lat_inc(i) = delY(i) |
531 |
|
vwind_lat_inc(i) = delY(i) |
532 |
|
wspeed_lat_inc(i) = delY(i) |
533 |
|
ustress_lat_inc(i) = (delY(i) + delY(i)) / 2. |
534 |
|
hflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
535 |
|
sflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
536 |
|
swflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
537 |
|
runoff_lat_inc(i) = (delY(i) + delY(i)) / 2. |
538 |
|
atemp_lat_inc(i) = (delY(i) + delY(i)) / 2. |
539 |
|
aqh_lat_inc(i) = (delY(i) + delY(i)) / 2. |
540 |
|
evap_lat_inc(i) = (delY(i) + delY(i)) / 2. |
541 |
|
precip_lat_inc(i) = (delY(i) + delY(i)) / 2. |
542 |
|
snowprecip_lat_inc(i) = (delY(i) + delY(i)) / 2. |
543 |
|
uwind_lat_inc(i) = (delY(i) + delY(i)) / 2. |
544 |
|
lwflux_lat_inc(i) = (delY(i) + delY(i)) / 2. |
545 |
|
swdown_lat_inc(i) = (delY(i) + delY(i)) / 2. |
546 |
|
lwdown_lat_inc(i) = (delY(i) + delY(i)) / 2. |
547 |
|
apressure_lat_inc(i) = (delY(i) + delY(i)) / 2. |
548 |
|
ELSE |
549 |
|
ustress_lat_inc(i) = 0. |
550 |
|
vstress_lat_inc(i) = 0. |
551 |
|
hflux_lat_inc(i) = 0. |
552 |
|
sflux_lat_inc(i) = 0. |
553 |
|
swflux_lat_inc(i) = 0. |
554 |
|
runoff_lat_inc(i) = 0. |
555 |
|
atemp_lat_inc(i) = 0. |
556 |
|
aqh_lat_inc(i) = 0. |
557 |
|
evap_lat_inc(i) = 0. |
558 |
|
precip_lat_inc(i) = 0. |
559 |
|
snowprecip_lat_inc(i) = 0. |
560 |
|
uwind_lat_inc(i) = 0. |
561 |
|
vwind_lat_inc(i) = 0. |
562 |
|
wspeed_lat_inc(i) = 0. |
563 |
|
lwflux_lat_inc(i) = 0. |
564 |
|
swdown_lat_inc(i) = 0. |
565 |
|
lwdown_lat_inc(i) = 0. |
566 |
|
apressure_lat_inc(i) = 0. |
567 |
|
ENDIF |
568 |
|
ENDDO |
569 |
|
#endif /* USE_EXF_INTERPOLATION */ |
570 |
|
|
571 |
c Check for the availability of the right calendar version. |
c Check for the availability of the right calendar version. |
572 |
if ( calendarversion .ne. usescalendarversion ) then |
if ( calendarversion .ne. usescalendarversion ) then |
579 |
endif |
endif |
580 |
|
|
581 |
c Next, read the forcing data file. |
c Next, read the forcing data file. |
582 |
call nml_filter( 'data.exf', scrunit1, myThid ) |
WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf' |
583 |
if (scrunit1 .eq. 0) then |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
584 |
stop 'exf_readparms: reading namelist failed' |
& SQUEEZE_RIGHT , 1) |
|
end if |
|
|
read( scrunit1, nml = exf_nml ) |
|
|
close( scrunit1 ) |
|
585 |
|
|
586 |
c Complete the start date specifications for the forcing |
CALL OPEN_COPY_DATA_FILE( |
587 |
c fields to get a complete calendar date array. |
I 'data.exf', 'EXF_READPARMS', |
588 |
|
O iUnit, |
589 |
|
I myThid ) |
590 |
|
|
591 |
|
READ( iUnit, nml = exf_nml ) |
592 |
|
|
593 |
|
WRITE(msgBuf,'(A)') |
594 |
|
& 'EXF_READPARMS: finished reading data.exf' |
595 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
596 |
|
& SQUEEZE_RIGHT , 1) |
597 |
|
|
598 |
|
CLOSE( iUnit ) |
599 |
|
|
600 |
c check for consistency |
call exf_check( mythid ) |
601 |
|
|
602 |
if (.NOT. |
c Complete the start date specifications for the forcing |
603 |
& (exf_iprec .EQ. 32 .OR. exf_iprec .EQ. 64) |
c fields to get a complete calendar date array. |
|
& ) then |
|
|
stop 'stop in exf_readparms: value of exf_iprec not allowed' |
|
|
else if (.NOT. |
|
|
& (exf_yftype .EQ. 'RS' .OR. |
|
|
& exf_yftype .EQ. 'RL') |
|
|
& ) then |
|
|
stop 'stop in exf_readparms: value of exf_yftype not allowed' |
|
|
end if |
|
604 |
|
|
605 |
#ifdef ALLOW_ATM_WIND |
#ifdef ALLOW_ATM_WIND |
606 |
call cal_FullDate( uwindstartdate1, uwindstartdate2, |
if ( uwindfile .NE. ' ' ) then |
607 |
& uwindstartdate , mythid ) |
call cal_FullDate ( uwindstartdate1 , uwindstartdate2, |
608 |
call cal_FullDate( vwindstartdate1, vwindstartdate2, |
& date_array ,mythid ) |
609 |
& vwindstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
610 |
|
call cal_ToSeconds ( difftime, uwindstartdate ,mythid ) |
611 |
|
uwindstartdate = modelstart + uwindstartdate |
612 |
|
endif |
613 |
|
if ( vwindfile .NE. ' ' ) then |
614 |
|
call cal_FullDate ( vwindstartdate1 , vwindstartdate2, |
615 |
|
& date_array ,mythid ) |
616 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
617 |
|
call cal_ToSeconds ( difftime, vwindstartdate ,mythid ) |
618 |
|
vwindstartdate = modelstart + vwindstartdate |
619 |
|
endif |
620 |
|
if ( wspeedfile .NE. ' ' ) then |
621 |
|
call cal_FullDate ( wspeedstartdate1, wspeedstartdate2, |
622 |
|
& date_array ,mythid ) |
623 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
624 |
|
call cal_ToSeconds ( difftime, wspeedstartdate ,mythid ) |
625 |
|
wspeedstartdate = modelstart + wspeedstartdate |
626 |
|
endif |
627 |
#else |
#else |
628 |
call cal_FullDate( ustressstartdate1, ustressstartdate2, |
if ( ustressfile .NE. ' ' ) then |
629 |
& ustressstartdate , mythid ) |
call cal_FullDate ( ustressstartdate1 , ustressstartdate2, |
630 |
call cal_FullDate( vstressstartdate1, vstressstartdate2, |
& date_array ,mythid ) |
631 |
& vstressstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
632 |
|
call cal_ToSeconds ( difftime, ustressstartdate ,mythid ) |
633 |
|
ustressstartdate = modelstart + ustressstartdate |
634 |
|
endif |
635 |
|
if ( vstressfile .NE. ' ' ) then |
636 |
|
call cal_FullDate ( vstressstartdate1 , vstressstartdate2, |
637 |
|
& date_array ,mythid ) |
638 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
639 |
|
call cal_ToSeconds ( difftime, vstressstartdate ,mythid ) |
640 |
|
vstressstartdate = modelstart + vstressstartdate |
641 |
|
endif |
642 |
#endif |
#endif |
643 |
|
|
644 |
#ifdef ALLOW_ATM_TEMP |
#ifdef ALLOW_ATM_TEMP |
645 |
call cal_FullDate( atempstartdate1, atempstartdate2, |
if ( atempfile .NE. ' ' ) then |
646 |
& atempstartdate , mythid ) |
call cal_FullDate ( atempstartdate1 , atempstartdate2, |
647 |
call cal_FullDate( aqhstartdate1, aqhstartdate2, |
& date_array ,mythid ) |
648 |
& aqhstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
649 |
call cal_FullDate( lwfluxstartdate1, lwfluxstartdate2, |
call cal_ToSeconds ( difftime, atempstartdate ,mythid ) |
650 |
& lwfluxstartdate , mythid ) |
atempstartdate = modelstart + atempstartdate |
651 |
call cal_FullDate( precipstartdate1, precipstartdate2, |
endif |
652 |
& precipstartdate , mythid ) |
if ( aqhfile .NE. ' ' ) then |
653 |
|
call cal_FullDate ( aqhstartdate1 , aqhstartdate2, |
654 |
|
& date_array ,mythid ) |
655 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
656 |
|
call cal_ToSeconds ( difftime, aqhstartdate ,mythid ) |
657 |
|
aqhstartdate = modelstart + aqhstartdate |
658 |
|
endif |
659 |
|
if ( lwfluxfile .NE. ' ' ) then |
660 |
|
call cal_FullDate ( lwfluxstartdate1 , lwfluxstartdate2, |
661 |
|
& date_array ,mythid ) |
662 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
663 |
|
call cal_ToSeconds ( difftime, lwfluxstartdate ,mythid ) |
664 |
|
lwfluxstartdate = modelstart + lwfluxstartdate |
665 |
|
endif |
666 |
|
if ( precipfile .NE. ' ' ) then |
667 |
|
call cal_FullDate ( precipstartdate1 , precipstartdate2, |
668 |
|
& date_array ,mythid ) |
669 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
670 |
|
call cal_ToSeconds ( difftime, precipstartdate ,mythid ) |
671 |
|
precipstartdate = modelstart + precipstartdate |
672 |
|
endif |
673 |
|
if ( snowprecipfile .NE. ' ' ) then |
674 |
|
call cal_FullDate( snowprecipstartdate1, snowprecipstartdate2, |
675 |
|
& date_array ,mythid ) |
676 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
677 |
|
call cal_ToSeconds ( difftime, snowprecipstartdate, mythid ) |
678 |
|
snowprecipstartdate = modelstart + snowprecipstartdate |
679 |
|
endif |
680 |
#else |
#else |
681 |
call cal_FullDate( hfluxstartdate1, hfluxstartdate2, |
if ( hfluxfile .NE. ' ' ) then |
682 |
& hfluxstartdate , mythid ) |
call cal_FullDate ( hfluxstartdate1 , hfluxstartdate2, |
683 |
call cal_FullDate( sfluxstartdate1, sfluxstartdate2, |
& date_array ,mythid ) |
684 |
& sfluxstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
685 |
|
call cal_ToSeconds ( difftime, hfluxstartdate ,mythid ) |
686 |
|
hfluxstartdate = modelstart + hfluxstartdate |
687 |
|
endif |
688 |
|
if ( sfluxfile .NE. ' ' ) then |
689 |
|
call cal_FullDate ( sfluxstartdate1 , sfluxstartdate2, |
690 |
|
& date_array ,mythid ) |
691 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
692 |
|
call cal_ToSeconds ( difftime, sfluxstartdate ,mythid ) |
693 |
|
sfluxstartdate = modelstart + sfluxstartdate |
694 |
|
endif |
695 |
#endif |
#endif |
696 |
|
|
697 |
#if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) |
#if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) |
698 |
call cal_FullDate( swfluxstartdate1, swfluxstartdate2, |
if ( swfluxfile .NE. ' ' ) then |
699 |
& swfluxstartdate , mythid ) |
call cal_FullDate ( swfluxstartdate1 , swfluxstartdate2, |
700 |
|
& date_array ,mythid ) |
701 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
702 |
|
call cal_ToSeconds ( difftime, swfluxstartdate ,mythid ) |
703 |
|
swfluxstartdate = modelstart + swfluxstartdate |
704 |
|
endif |
705 |
#endif |
#endif |
706 |
|
|
707 |
#ifdef EXF_READ_EVAP |
#ifdef EXF_READ_EVAP |
708 |
call cal_FullDate( evapstartdate1, evapstartdate2, |
if ( evapfile .NE. ' ' ) then |
709 |
& evapstartdate , mythid ) |
call cal_FullDate ( evapstartdate1 , evapstartdate2, |
710 |
#endif EXF_READ_EVAP |
& date_array ,mythid ) |
711 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
712 |
|
call cal_ToSeconds ( difftime, evapstartdate ,mythid ) |
713 |
|
evapstartdate = modelstart + evapstartdate |
714 |
|
endif |
715 |
|
#endif |
716 |
|
|
717 |
#ifdef ALLOW_RUNOFF |
#ifdef ALLOW_RUNOFF |
718 |
call cal_FullDate( runoffstartdate1, runoffstartdate2, |
if ( runofffile .NE. ' ' .AND. runoffperiod .NE. 0. ) then |
719 |
& runoffstartdate , mythid ) |
call cal_FullDate ( runoffstartdate1 , runoffstartdate2, |
720 |
|
& date_array ,mythid ) |
721 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
722 |
|
call cal_ToSeconds ( difftime, runoffstartdate ,mythid ) |
723 |
|
runoffstartdate = modelstart + runoffstartdate |
724 |
|
endif |
725 |
#endif |
#endif |
726 |
|
|
727 |
#ifdef ALLOW_DOWNWARD_RADIATION |
#ifdef ALLOW_DOWNWARD_RADIATION |
728 |
call cal_FullDate( swdownstartdate1, swdownstartdate2, |
if ( swdownfile .NE. ' ' ) then |
729 |
& swdownstartdate , mythid ) |
call cal_FullDate ( swdownstartdate1 , swdownstartdate2, |
730 |
call cal_FullDate( lwdownstartdate1, lwdownstartdate2, |
& date_array ,mythid ) |
731 |
& lwdownstartdate , mythid ) |
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
732 |
|
call cal_ToSeconds ( difftime, swdownstartdate ,mythid ) |
733 |
|
swdownstartdate = modelstart + swdownstartdate |
734 |
|
endif |
735 |
|
if ( lwdownfile .NE. ' ' ) then |
736 |
|
call cal_FullDate ( lwdownstartdate1 , lwdownstartdate2, |
737 |
|
& date_array ,mythid ) |
738 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
739 |
|
call cal_ToSeconds ( difftime, lwdownstartdate ,mythid ) |
740 |
|
lwdownstartdate = modelstart + lwdownstartdate |
741 |
|
endif |
742 |
|
#endif |
743 |
|
|
744 |
|
#ifdef ATMOSPHERIC_LOADING |
745 |
|
if ( apressurefile .NE. ' ' ) then |
746 |
|
call cal_FullDate ( apressurestartdate1, apressurestartdate2, |
747 |
|
& date_array ,mythid ) |
748 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
749 |
|
call cal_ToSeconds ( difftime, apressurestartdate ,mythid ) |
750 |
|
apressurestartdate = modelstart + apressurestartdate |
751 |
|
endif |
752 |
#endif |
#endif |
753 |
|
|
754 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
755 |
#ifdef ALLOW_OBCS_NORTH |
#ifdef ALLOW_OBCS_NORTH |
756 |
call cal_FullDate( obcsNstartdate1, obcsNstartdate2, |
if ( obcsNperiod .NE. 0 ) then |
757 |
& obcsNstartdate , mythid ) |
call cal_FullDate ( obcsNstartdate1 , obcsNstartdate2, |
758 |
|
& date_array ,mythid ) |
759 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
760 |
|
call cal_ToSeconds ( difftime, obcsNstartdate ,mythid ) |
761 |
|
obcsNstartdate = modelstart + obcsNstartdate |
762 |
|
endif |
763 |
#endif |
#endif |
764 |
#ifdef ALLOW_OBCS_SOUTH |
#ifdef ALLOW_OBCS_SOUTH |
765 |
call cal_FullDate( obcsSstartdate1, obcsSstartdate2, |
if ( obcsSperiod .NE. 0 ) then |
766 |
& obcsSstartdate , mythid ) |
call cal_FullDate ( obcsSstartdate1 , obcsSstartdate2, |
767 |
|
& date_array ,mythid ) |
768 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
769 |
|
call cal_ToSeconds ( difftime, obcsSstartdate ,mythid ) |
770 |
|
obcsSstartdate = modelstart + obcsSstartdate |
771 |
|
endif |
772 |
#endif |
#endif |
773 |
#ifdef ALLOW_OBCS_EAST |
#ifdef ALLOW_OBCS_EAST |
774 |
call cal_FullDate( obcsEstartdate1, obcsEstartdate2, |
if ( obcsEperiod .NE. 0 ) then |
775 |
& obcsEstartdate , mythid ) |
call cal_FullDate ( obcsEstartdate1 , obcsEstartdate2, |
776 |
|
& date_array ,mythid ) |
777 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
778 |
|
call cal_ToSeconds ( difftime, obcsEstartdate ,mythid ) |
779 |
|
obcsEstartdate = modelstart + obcsEstartdate |
780 |
|
endif |
781 |
#endif |
#endif |
782 |
#ifdef ALLOW_OBCS_WEST |
#ifdef ALLOW_OBCS_WEST |
783 |
call cal_FullDate( obcsWstartdate1, obcsWstartdate2, |
if ( obcsNperiod .NE. 0 ) then |
784 |
& obcsWstartdate , mythid ) |
call cal_FullDate ( obcsWstartdate1 , obcsWstartdate2, |
785 |
|
& date_array ,mythid ) |
786 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
787 |
|
call cal_ToSeconds ( difftime, obcsWstartdate ,mythid ) |
788 |
|
obcsWstartdate = modelstart + obcsWstartdate |
789 |
|
endif |
790 |
#endif |
#endif |
791 |
#endif /* ALLOW_OBCS */ |
#endif /* ALLOW_OBCS */ |
792 |
|
|
|
#ifdef ATMOSPHERIC_LOADING |
|
|
call cal_FullDate(apressurestartdate1,apressurestartdate2, |
|
|
& apressurestartdate , mythid ) |
|
|
#endif |
|
|
|
|
793 |
_END_MASTER( mythid ) |
_END_MASTER( mythid ) |
794 |
|
|
795 |
_BARRIER |
_BARRIER |