1 |
C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_init_fixed.F,v 1.8 2008/02/22 20:25:54 dimitri Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "EXF_OPTIONS.h" |
5 |
#ifdef ALLOW_OBCS |
6 |
# include "OBCS_OPTIONS.h" |
7 |
#endif |
8 |
|
9 |
CBOP |
10 |
C !ROUTINE: EXF_INIT_FIXED |
11 |
C !INTERFACE: |
12 |
SUBROUTINE EXF_INIT_FIXED( myThid ) |
13 |
|
14 |
C !DESCRIPTION: \bv |
15 |
C *==========================================================* |
16 |
C | SUBROUTINE EXF_INIT_FIXED |
17 |
C | o Routine to initialize EXF variables |
18 |
C | that are kept fixed during the run. |
19 |
C *==========================================================* |
20 |
C \ev |
21 |
C !USES: |
22 |
IMPLICIT NONE |
23 |
|
24 |
C === Global variables === |
25 |
#include "EEPARAMS.h" |
26 |
#include "SIZE.h" |
27 |
#include "PARAMS.h" |
28 |
#include "cal.h" |
29 |
#include "EXF_PARAM.h" |
30 |
#include "EXF_CONSTANTS.h" |
31 |
#ifdef ALLOW_OBCS |
32 |
# include "OBCS.h" |
33 |
#endif |
34 |
|
35 |
C !INPUT/OUTPUT PARAMETERS: |
36 |
C === Routine arguments === |
37 |
C myThid :: my Thread Id number |
38 |
INTEGER myThid |
39 |
CEOP |
40 |
|
41 |
C !LOCAL VARIABLES: |
42 |
C === Local variables === |
43 |
INTEGER date_array(4), difftime(4), yearStartDate(4) |
44 |
|
45 |
c Complete the start date specifications for the forcing |
46 |
c fields to get a complete calendar date array. |
47 |
c FLDstartdate, for FLD = { uwind, vwind, wspeed, etc. }, |
48 |
c returns time in seconds of first FLD record from the |
49 |
c beginning of the model integration or, if useYearlyFields, |
50 |
c from the beginning of the year. |
51 |
|
52 |
_BEGIN_MASTER( myThid ) |
53 |
|
54 |
#ifdef ALLOW_ATM_WIND |
55 |
IF ( uwindfile .NE. ' ' .AND. uwindperiod .GT. 0. ) THEN |
56 |
CALL cal_FullDate ( uwindstartdate1, uwindstartdate2, |
57 |
& date_array, myThid ) |
58 |
IF ( useExfYearlyFields ) THEN |
59 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
60 |
yearStartDate(2) = 0 |
61 |
yearStartDate(3) = date_array(3) |
62 |
yearStartDate(4) = date_array(4) |
63 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
64 |
CALL cal_ToSeconds ( difftime, uwindstartdate ,myThid) |
65 |
ELSE |
66 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
67 |
CALL cal_ToSeconds ( difftime, uwindstartdate ,myThid) |
68 |
uwindstartdate = modelstart + uwindstartdate |
69 |
ENDIF |
70 |
ENDIF |
71 |
IF ( vwindfile .NE. ' ' .AND. vwindperiod .GT. 0. ) THEN |
72 |
CALL cal_FullDate ( vwindstartdate1, vwindstartdate2, |
73 |
& date_array, myThid ) |
74 |
IF ( useExfYearlyFields ) THEN |
75 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
76 |
yearStartDate(2) = 0 |
77 |
yearStartDate(3) = date_array(3) |
78 |
yearStartDate(4) = date_array(4) |
79 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
80 |
CALL cal_ToSeconds ( difftime, vwindstartdate ,myThid) |
81 |
ELSE |
82 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
83 |
CALL cal_ToSeconds ( difftime, vwindstartdate ,myThid) |
84 |
vwindstartdate = modelstart + vwindstartdate |
85 |
ENDIF |
86 |
ENDIF |
87 |
#endif /* ALLOW_ATM_WIND */ |
88 |
IF ( wspeedfile .NE. ' ' .AND. wspeedperiod .GT. 0. ) THEN |
89 |
CALL cal_FullDate ( wspeedstartdate1, wspeedstartdate2, |
90 |
& date_array, myThid ) |
91 |
IF ( useExfYearlyFields ) THEN |
92 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
93 |
yearStartDate(2) = 0 |
94 |
yearStartDate(3) = date_array(3) |
95 |
yearStartDate(4) = date_array(4) |
96 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
97 |
CALL cal_ToSeconds ( difftime, wspeedstartdate ,myThid) |
98 |
ELSE |
99 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
100 |
CALL cal_ToSeconds ( difftime, wspeedstartdate ,myThid) |
101 |
wspeedstartdate = modelstart + wspeedstartdate |
102 |
ENDIF |
103 |
ENDIF |
104 |
IF ( ustressfile .NE. ' ' .AND. ustressperiod .GT. 0. ) THEN |
105 |
CALL cal_FullDate ( ustressstartdate1, ustressstartdate2, |
106 |
& date_array, myThid ) |
107 |
IF ( useExfYearlyFields ) THEN |
108 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
109 |
yearStartDate(2) = 0 |
110 |
yearStartDate(3) = date_array(3) |
111 |
yearStartDate(4) = date_array(4) |
112 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
113 |
CALL cal_ToSeconds ( difftime, ustressstartdate ,myThid) |
114 |
ELSE |
115 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
116 |
CALL cal_ToSeconds ( difftime, ustressstartdate ,myThid) |
117 |
ustressstartdate = modelstart + ustressstartdate |
118 |
ENDIF |
119 |
ENDIF |
120 |
IF ( vstressfile .NE. ' ' .AND. vstressperiod .GT. 0. ) THEN |
121 |
CALL cal_FullDate ( vstressstartdate1, vstressstartdate2, |
122 |
& date_array, myThid ) |
123 |
IF ( useExfYearlyFields ) THEN |
124 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
125 |
yearStartDate(2) = 0 |
126 |
yearStartDate(3) = date_array(3) |
127 |
yearStartDate(4) = date_array(4) |
128 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
129 |
CALL cal_ToSeconds ( difftime, vstressstartdate ,myThid) |
130 |
ELSE |
131 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
132 |
CALL cal_ToSeconds ( difftime, vstressstartdate ,myThid) |
133 |
vstressstartdate = modelstart + vstressstartdate |
134 |
ENDIF |
135 |
ENDIF |
136 |
|
137 |
#ifdef ALLOW_ATM_TEMP |
138 |
IF ( atempfile .NE. ' ' .AND. atempperiod .GT. 0. ) THEN |
139 |
CALL cal_FullDate ( atempstartdate1, atempstartdate2, |
140 |
& date_array, myThid ) |
141 |
IF ( useExfYearlyFields ) THEN |
142 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
143 |
yearStartDate(2) = 0 |
144 |
yearStartDate(3) = date_array(3) |
145 |
yearStartDate(4) = date_array(4) |
146 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
147 |
CALL cal_ToSeconds ( difftime, atempstartdate ,myThid) |
148 |
ELSE |
149 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
150 |
CALL cal_ToSeconds ( difftime, atempstartdate ,myThid) |
151 |
atempstartdate = modelstart + atempstartdate |
152 |
ENDIF |
153 |
ENDIF |
154 |
IF ( aqhfile .NE. ' ' .AND. aqhperiod .GT. 0. ) THEN |
155 |
CALL cal_FullDate ( aqhstartdate1, aqhstartdate2, |
156 |
& date_array, myThid ) |
157 |
IF ( useExfYearlyFields ) THEN |
158 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
159 |
yearStartDate(2) = 0 |
160 |
yearStartDate(3) = date_array(3) |
161 |
yearStartDate(4) = date_array(4) |
162 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
163 |
CALL cal_ToSeconds ( difftime, aqhstartdate ,myThid) |
164 |
ELSE |
165 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
166 |
CALL cal_ToSeconds ( difftime, aqhstartdate ,myThid) |
167 |
aqhstartdate = modelstart + aqhstartdate |
168 |
ENDIF |
169 |
ENDIF |
170 |
IF ( lwfluxfile .NE. ' ' .AND. lwfluxperiod .GT. 0. ) THEN |
171 |
CALL cal_FullDate ( lwfluxstartdate1, lwfluxstartdate2, |
172 |
& date_array, myThid ) |
173 |
IF ( useExfYearlyFields ) THEN |
174 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
175 |
yearStartDate(2) = 0 |
176 |
yearStartDate(3) = date_array(3) |
177 |
yearStartDate(4) = date_array(4) |
178 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
179 |
CALL cal_ToSeconds ( difftime, lwfluxstartdate ,myThid) |
180 |
ELSE |
181 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
182 |
CALL cal_ToSeconds ( difftime, lwfluxstartdate ,myThid) |
183 |
lwfluxstartdate = modelstart + lwfluxstartdate |
184 |
ENDIF |
185 |
ENDIF |
186 |
IF ( precipfile .NE. ' ' .AND. precipperiod .GT. 0. ) THEN |
187 |
CALL cal_FullDate ( precipstartdate1, precipstartdate2, |
188 |
& date_array, myThid ) |
189 |
IF ( useExfYearlyFields ) THEN |
190 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
191 |
yearStartDate(2) = 0 |
192 |
yearStartDate(3) = date_array(3) |
193 |
yearStartDate(4) = date_array(4) |
194 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
195 |
CALL cal_ToSeconds ( difftime, precipstartdate ,myThid) |
196 |
ELSE |
197 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
198 |
CALL cal_ToSeconds ( difftime, precipstartdate ,myThid) |
199 |
precipstartdate = modelstart + precipstartdate |
200 |
ENDIF |
201 |
ENDIF |
202 |
IF ( snowprecipfile .NE. ' ' .AND. snowprecipperiod .GT. 0. ) THEN |
203 |
CALL cal_FullDate( snowprecipstartdate1, snowprecipstartdate2, |
204 |
& date_array, myThid ) |
205 |
IF ( useExfYearlyFields ) THEN |
206 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
207 |
yearStartDate(2) = 0 |
208 |
yearStartDate(3) = date_array(3) |
209 |
yearStartDate(4) = date_array(4) |
210 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
211 |
CALL cal_ToSeconds ( difftime, snowprecipstartdate ,myThid) |
212 |
ELSE |
213 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
214 |
CALL cal_ToSeconds ( difftime, snowprecipstartdate ,myThid) |
215 |
snowprecipstartdate=modelstart + snowprecipstartdate |
216 |
ENDIF |
217 |
ENDIF |
218 |
#else /* ifndef ALLOW_ATM_TEMP */ |
219 |
IF ( hfluxfile .NE. ' ' .AND. hfluxperiod .GT. 0. ) THEN |
220 |
CALL cal_FullDate ( hfluxstartdate1, hfluxstartdate2, |
221 |
& date_array, myThid ) |
222 |
IF ( useExfYearlyFields ) THEN |
223 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
224 |
yearStartDate(2) = 0 |
225 |
yearStartDate(3) = date_array(3) |
226 |
yearStartDate(4) = date_array(4) |
227 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
228 |
CALL cal_ToSeconds ( difftime, hfluxstartdate ,myThid) |
229 |
ELSE |
230 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
231 |
CALL cal_ToSeconds ( difftime, hfluxstartdate ,myThid) |
232 |
hfluxstartdate = modelstart + hfluxstartdate |
233 |
ENDIF |
234 |
ENDIF |
235 |
IF ( sfluxfile .NE. ' ' .AND. sfluxperiod .GT. 0. ) THEN |
236 |
CALL cal_FullDate ( sfluxstartdate1, sfluxstartdate2, |
237 |
& date_array, myThid ) |
238 |
IF ( useExfYearlyFields ) THEN |
239 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
240 |
yearStartDate(2) = 0 |
241 |
yearStartDate(3) = date_array(3) |
242 |
yearStartDate(4) = date_array(4) |
243 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
244 |
CALL cal_ToSeconds ( difftime, sfluxstartdate ,myThid) |
245 |
ELSE |
246 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
247 |
CALL cal_ToSeconds ( difftime, sfluxstartdate ,myThid) |
248 |
sfluxstartdate = modelstart + sfluxstartdate |
249 |
ENDIF |
250 |
ENDIF |
251 |
#endif /* ALLOW_ATM_TEMP */ |
252 |
|
253 |
#if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) |
254 |
IF ( swfluxfile .NE. ' ' .AND. swfluxperiod .GT. 0. ) THEN |
255 |
CALL cal_FullDate ( swfluxstartdate1, swfluxstartdate2, |
256 |
& date_array, myThid ) |
257 |
IF ( useExfYearlyFields ) THEN |
258 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
259 |
yearStartDate(2) = 0 |
260 |
yearStartDate(3) = date_array(3) |
261 |
yearStartDate(4) = date_array(4) |
262 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
263 |
CALL cal_ToSeconds ( difftime, swfluxstartdate ,myThid) |
264 |
ELSE |
265 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
266 |
CALL cal_ToSeconds ( difftime, swfluxstartdate ,myThid) |
267 |
swfluxstartdate = modelstart + swfluxstartdate |
268 |
ENDIF |
269 |
ENDIF |
270 |
#endif /* defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) */ |
271 |
|
272 |
#ifdef EXF_READ_EVAP |
273 |
IF ( evapfile .NE. ' ' .AND. evapperiod .GT. 0. ) THEN |
274 |
CALL cal_FullDate ( evapstartdate1, evapstartdate2, |
275 |
& date_array, myThid ) |
276 |
IF ( useExfYearlyFields ) THEN |
277 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
278 |
yearStartDate(2) = 0 |
279 |
yearStartDate(3) = date_array(3) |
280 |
yearStartDate(4) = date_array(4) |
281 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
282 |
CALL cal_ToSeconds ( difftime, evapstartdate ,myThid) |
283 |
ELSE |
284 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
285 |
CALL cal_ToSeconds ( difftime, evapstartdate ,myThid) |
286 |
evapstartdate = modelstart + evapstartdate |
287 |
ENDIF |
288 |
ENDIF |
289 |
#endif /* EXF_READ_EVAP */ |
290 |
|
291 |
#ifdef ALLOW_RUNOFF |
292 |
IF ( runofffile .NE. ' ' .AND. runoffperiod .GT. 0. ) THEN |
293 |
CALL cal_FullDate ( runoffstartdate1, runoffstartdate2, |
294 |
& date_array, myThid ) |
295 |
IF ( useExfYearlyFields ) THEN |
296 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
297 |
yearStartDate(2) = 0 |
298 |
yearStartDate(3) = date_array(3) |
299 |
yearStartDate(4) = date_array(4) |
300 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
301 |
CALL cal_ToSeconds ( difftime, runoffstartdate ,myThid) |
302 |
ELSE |
303 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
304 |
CALL cal_ToSeconds ( difftime, runoffstartdate ,myThid) |
305 |
runoffstartdate = modelstart + runoffstartdate |
306 |
ENDIF |
307 |
ENDIF |
308 |
#endif /* ALLOW_RUNOFF */ |
309 |
|
310 |
#ifdef ALLOW_DOWNWARD_RADIATION |
311 |
IF ( swdownfile .NE. ' ' .AND. swdownperiod .GT. 0. ) THEN |
312 |
CALL cal_FullDate ( swdownstartdate1, swdownstartdate2, |
313 |
& date_array, myThid ) |
314 |
IF ( useExfYearlyFields ) THEN |
315 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
316 |
yearStartDate(2) = 0 |
317 |
yearStartDate(3) = date_array(3) |
318 |
yearStartDate(4) = date_array(4) |
319 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
320 |
CALL cal_ToSeconds ( difftime, swdownstartdate ,myThid) |
321 |
ELSE |
322 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
323 |
CALL cal_ToSeconds ( difftime, swdownstartdate ,myThid) |
324 |
swdownstartdate = modelstart + swdownstartdate |
325 |
ENDIF |
326 |
ENDIF |
327 |
IF ( lwdownfile .NE. ' ' .AND. lwdownperiod .GT. 0. ) THEN |
328 |
CALL cal_FullDate ( lwdownstartdate1, lwdownstartdate2, |
329 |
& date_array, myThid ) |
330 |
IF ( useExfYearlyFields ) THEN |
331 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
332 |
yearStartDate(2) = 0 |
333 |
yearStartDate(3) = date_array(3) |
334 |
yearStartDate(4) = date_array(4) |
335 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
336 |
CALL cal_ToSeconds ( difftime, lwdownstartdate ,myThid) |
337 |
ELSE |
338 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
339 |
CALL cal_ToSeconds ( difftime, lwdownstartdate ,myThid) |
340 |
lwdownstartdate = modelstart + lwdownstartdate |
341 |
ENDIF |
342 |
ENDIF |
343 |
#endif /* ALLOW_DOWNWARD_RADIATION */ |
344 |
|
345 |
#ifdef ATMOSPHERIC_LOADING |
346 |
IF ( apressurefile .NE. ' ' .AND. apressureperiod .GT. 0. ) THEN |
347 |
CALL cal_FullDate ( apressurestartdate1, apressurestartdate2, |
348 |
& date_array, myThid ) |
349 |
IF ( useExfYearlyFields ) THEN |
350 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
351 |
yearStartDate(2) = 0 |
352 |
yearStartDate(3) = date_array(3) |
353 |
yearStartDate(4) = date_array(4) |
354 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
355 |
CALL cal_ToSeconds ( difftime, apressurestartdate ,myThid) |
356 |
ELSE |
357 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
358 |
CALL cal_ToSeconds ( difftime, apressurestartdate ,myThid) |
359 |
apressurestartdate= modelstart + apressurestartdate |
360 |
ENDIF |
361 |
ENDIF |
362 |
#endif /* ATMOSPHERIC_LOADING */ |
363 |
|
364 |
#ifdef ALLOW_ICE_AREAMASK |
365 |
IF ( areamaskfile .NE. ' ' .AND. areamaskperiod .GT. 0. ) THEN |
366 |
CALL cal_FullDate ( areamaskstartdate1, areamaskstartdate2, |
367 |
& date_array, myThid ) |
368 |
IF ( useExfYearlyFields ) THEN |
369 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
370 |
yearStartDate(2) = 0 |
371 |
yearStartDate(3) = date_array(3) |
372 |
yearStartDate(4) = date_array(4) |
373 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
374 |
CALL cal_ToSeconds ( difftime, areamaskstartdate ,myThid) |
375 |
ELSE |
376 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
377 |
CALL cal_ToSeconds ( difftime, areamaskstartdate ,myThid) |
378 |
areamaskstartdate= modelstart + areamaskstartdate |
379 |
ENDIF |
380 |
ENDIF |
381 |
#endif /* ALLOW_ICE_AREAMASK */ |
382 |
|
383 |
#ifdef ALLOW_OBCS |
384 |
# ifdef ALLOW_OBCS_NORTH |
385 |
IF ( obcsNperiod .GT. 0 ) THEN |
386 |
CALL cal_FullDate ( obcsNstartdate1, obcsNstartdate2, |
387 |
& date_array, myThid ) |
388 |
IF ( useOBCSYearlyFields ) THEN |
389 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
390 |
yearStartDate(2) = 0 |
391 |
yearStartDate(3) = date_array(3) |
392 |
yearStartDate(4) = date_array(4) |
393 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
394 |
CALL cal_ToSeconds ( difftime, obcsNstartdate ,myThid) |
395 |
ELSE |
396 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
397 |
CALL cal_ToSeconds ( difftime, obcsNstartdate ,myThid) |
398 |
obcsNstartdate = modelstart + obcsNstartdate |
399 |
ENDIF |
400 |
ENDIF |
401 |
# endif /* ALLOW_OBCS_NORTH */ |
402 |
# ifdef ALLOW_OBCS_SOUTH |
403 |
IF ( obcsSperiod .GT. 0 ) THEN |
404 |
CALL cal_FullDate ( obcsSstartdate1, obcsSstartdate2, |
405 |
& date_array, myThid ) |
406 |
IF ( useOBCSYearlyFields ) THEN |
407 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
408 |
yearStartDate(2) = 0 |
409 |
yearStartDate(3) = date_array(3) |
410 |
yearStartDate(4) = date_array(4) |
411 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
412 |
CALL cal_ToSeconds ( difftime, obcsSstartdate ,myThid) |
413 |
ELSE |
414 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
415 |
CALL cal_ToSeconds ( difftime, obcsSstartdate ,myThid) |
416 |
obcsSstartdate = modelstart + obcsSstartdate |
417 |
ENDIF |
418 |
ENDIF |
419 |
# endif /* ALLOW_OBCS_SOUTH */ |
420 |
# ifdef ALLOW_OBCS_EAST |
421 |
IF ( obcsEperiod .GT. 0 ) THEN |
422 |
CALL cal_FullDate ( obcsEstartdate1, obcsEstartdate2, |
423 |
& date_array, myThid ) |
424 |
IF ( useOBCSYearlyFields ) THEN |
425 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
426 |
yearStartDate(2) = 0 |
427 |
yearStartDate(3) = date_array(3) |
428 |
yearStartDate(4) = date_array(4) |
429 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
430 |
CALL cal_ToSeconds ( difftime, obcsEstartdate ,myThid) |
431 |
ELSE |
432 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
433 |
CALL cal_ToSeconds ( difftime, obcsEstartdate ,myThid) |
434 |
obcsEstartdate = modelstart + obcsEstartdate |
435 |
ENDIF |
436 |
ENDIF |
437 |
# endif /* ALLOW_OBCS_EAST */ |
438 |
# ifdef ALLOW_OBCS_WEST |
439 |
IF ( obcsWperiod .GT. 0 ) THEN |
440 |
CALL cal_FullDate ( obcsWstartdate1, obcsWstartdate2, |
441 |
& date_array, myThid ) |
442 |
IF ( useOBCSYearlyFields ) THEN |
443 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
444 |
yearStartDate(2) = 0 |
445 |
yearStartDate(3) = date_array(3) |
446 |
yearStartDate(4) = date_array(4) |
447 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
448 |
CALL cal_ToSeconds ( difftime, obcsWstartdate ,myThid) |
449 |
ELSE |
450 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
451 |
CALL cal_ToSeconds ( difftime, obcsWstartdate ,myThid) |
452 |
obcsWstartdate = modelstart + obcsWstartdate |
453 |
ENDIF |
454 |
ENDIF |
455 |
# endif /* ALLOW_OBCS_WEST */ |
456 |
# ifdef ALLOW_SEAICE |
457 |
# ifdef ALLOW_OBCS_NORTH |
458 |
IF ( siobNperiod .GT. 0 ) THEN |
459 |
CALL cal_FullDate ( siobNstartdate1, siobNstartdate2, |
460 |
& date_array, myThid ) |
461 |
IF ( useOBCSYearlyFields ) THEN |
462 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
463 |
yearStartDate(2) = 0 |
464 |
yearStartDate(3) = date_array(3) |
465 |
yearStartDate(4) = date_array(4) |
466 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
467 |
CALL cal_ToSeconds ( difftime, siobNstartdate ,myThid) |
468 |
ELSE |
469 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
470 |
CALL cal_ToSeconds ( difftime, siobNstartdate ,myThid) |
471 |
siobNstartdate = modelstart + siobNstartdate |
472 |
ENDIF |
473 |
ENDIF |
474 |
# endif /* ALLOW_OBCS_NORTH */ |
475 |
# ifdef ALLOW_OBCS_SOUTH |
476 |
IF ( siobSperiod .GT. 0 ) THEN |
477 |
CALL cal_FullDate ( siobSstartdate1, siobSstartdate2, |
478 |
& date_array, myThid ) |
479 |
IF ( useOBCSYearlyFields ) THEN |
480 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
481 |
yearStartDate(2) = 0 |
482 |
yearStartDate(3) = date_array(3) |
483 |
yearStartDate(4) = date_array(4) |
484 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
485 |
CALL cal_ToSeconds ( difftime, siobSstartdate ,myThid) |
486 |
ELSE |
487 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
488 |
CALL cal_ToSeconds ( difftime, siobSstartdate ,myThid) |
489 |
siobSstartdate = modelstart + siobSstartdate |
490 |
ENDIF |
491 |
ENDIF |
492 |
# endif /* ALLOW_OBCS_SOUTH */ |
493 |
# ifdef ALLOW_OBCS_EAST |
494 |
IF ( siobEperiod .GT. 0 ) THEN |
495 |
CALL cal_FullDate ( siobEstartdate1, siobEstartdate2, |
496 |
& date_array, myThid ) |
497 |
IF ( useOBCSYearlyFields ) THEN |
498 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
499 |
yearStartDate(2) = 0 |
500 |
yearStartDate(3) = date_array(3) |
501 |
yearStartDate(4) = date_array(4) |
502 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
503 |
CALL cal_ToSeconds ( difftime, siobEstartdate ,myThid) |
504 |
ELSE |
505 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
506 |
CALL cal_ToSeconds ( difftime, siobEstartdate ,myThid) |
507 |
siobEstartdate = modelstart + siobEstartdate |
508 |
ENDIF |
509 |
ENDIF |
510 |
# endif /* ALLOW_OBCS_EAST */ |
511 |
# ifdef ALLOW_OBCS_WEST |
512 |
IF ( siobWperiod .GT. 0 ) THEN |
513 |
CALL cal_FullDate ( siobWstartdate1, siobWstartdate2, |
514 |
& date_array, myThid ) |
515 |
IF ( useOBCSYearlyFields ) THEN |
516 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
517 |
yearStartDate(2) = 0 |
518 |
yearStartDate(3) = date_array(3) |
519 |
yearStartDate(4) = date_array(4) |
520 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
521 |
CALL cal_ToSeconds ( difftime, siobWstartdate ,myThid) |
522 |
ELSE |
523 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
524 |
CALL cal_ToSeconds ( difftime, siobWstartdate ,myThid) |
525 |
siobWstartdate = modelstart + siobWstartdate |
526 |
ENDIF |
527 |
ENDIF |
528 |
# endif /* ALLOW_OBCS_WEST */ |
529 |
# endif /* ALLOW_SEAICE */ |
530 |
#endif /* ALLOW_OBCS */ |
531 |
|
532 |
#ifdef ALLOW_CLIMSST_RELAXATION |
533 |
IF ( climsstfile .NE. ' ' .AND. climsstperiod .GT. 0. ) THEN |
534 |
CALL cal_FullDate( climsststartdate1, climsststartdate2, |
535 |
& date_array, myThid ) |
536 |
IF ( useExfYearlyFields ) THEN |
537 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
538 |
yearStartDate(2) = 0 |
539 |
yearStartDate(3) = date_array(3) |
540 |
yearStartDate(4) = date_array(4) |
541 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
542 |
CALL cal_ToSeconds (difftime, climsststartdate ,myThid) |
543 |
ELSE |
544 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
545 |
CALL cal_ToSeconds (difftime, climsststartdate ,myThid) |
546 |
climsststartdate = modelstart + climsststartdate |
547 |
ENDIF |
548 |
ENDIF |
549 |
#endif /* ALLOW_CLIMSST_RELAXATION */ |
550 |
|
551 |
#ifdef ALLOW_CLIMSSS_RELAXATION |
552 |
IF ( climsssfile .NE. ' ' .AND. climsssperiod .GT. 0. ) THEN |
553 |
CALL cal_FullDate( climsssstartdate1, climsssstartdate2, |
554 |
& date_array, myThid ) |
555 |
IF ( useExfYearlyFields ) THEN |
556 |
yearStartDate(1) = int(date_array(1)/10000.) * 10000 + 101 |
557 |
yearStartDate(2) = 0 |
558 |
yearStartDate(3) = date_array(3) |
559 |
yearStartDate(4) = date_array(4) |
560 |
CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid) |
561 |
CALL cal_ToSeconds (difftime, climsssstartdate ,myThid) |
562 |
ELSE |
563 |
CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid) |
564 |
CALL cal_ToSeconds (difftime, climsssstartdate ,myThid) |
565 |
climsssstartdate = modelstart + climsssstartdate |
566 |
ENDIF |
567 |
ENDIF |
568 |
#endif /* ALLOW_CLIMSSS_RELAXATION */ |
569 |
|
570 |
_END_MASTER( myThid ) |
571 |
_BARRIER |
572 |
|
573 |
C-- Summarize the External forcing's setup. |
574 |
CALL EXF_SUMMARY( myThid ) |
575 |
|
576 |
#ifdef ALLOW_DIAGNOSTICS |
577 |
IF ( useDiagnostics ) THEN |
578 |
CALL EXF_DIAGNOSTICS_INIT( myThid ) |
579 |
ENDIF |
580 |
#endif |
581 |
|
582 |
RETURN |
583 |
END |