/[MITgcm]/MITgcm/pkg/obcs/obcs_prescribe_read.F
ViewVC logotype

Contents of /MITgcm/pkg/obcs/obcs_prescribe_read.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.18 - (show annotations) (download)
Tue Jan 29 11:25:54 2008 UTC (16 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint59n
Changes since 1.17: +1 -13 lines
Completed mods to exf_getffieldrec.F to properly deal
with year transitions for useExfYearlyFields.

1 C $Header: /u/gcmpack/MITgcm/pkg/obcs/obcs_prescribe_read.F,v 1.17 2008/01/24 20:51:00 mlosch Exp $
2 C $Name: $
3
4 # include "OBCS_OPTIONS.h"
5
6 subroutine obcs_prescribe_read (
7 I mycurrenttime
8 I , mycurrentiter
9 I , mythid
10 & )
11 c |==================================================================|
12 c | SUBROUTINE obcs_prescribe_read |
13 c |==================================================================|
14 c | read open boundary conditions from file |
15 c | N.B.: * uses exf and cal routines for file/record handling |
16 c | * uses ctrl routines for control variable handling |
17 c |==================================================================|
18
19 implicit none
20
21 c == global variables ==
22
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #include "OBCS.h"
27 #ifdef ALLOW_EXF
28 # include "EXF_PARAM.h"
29 #endif
30 #ifdef ALLOW_PTRACERS
31 # include "PTRACERS_SIZE.h"
32 # include "OBCS_PTRACERS.h"
33 #endif /* ALLOW_PTRACERS */
34
35 c == routine arguments ==
36
37 _RL mycurrenttime
38 integer mycurrentiter
39 integer mythid
40
41 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_PRESCRIBE))
42
43 c == local variables ==
44
45 c == end of interface ==
46
47 #ifdef ALLOW_EXF
48 IF ( useEXF ) THEN
49 #ifdef ALLOW_OBCS_NORTH
50 call obcs_prescribe_exf_xz (
51 I obcsNstartdate, obcsNperiod,
52 I useOBCSYearlyFields,
53 U OBNu, OBNu0, OBNu1, OBNufile,
54 U OBNv, OBNv0, OBNv1, OBNvfile,
55 U OBNt, OBNt0, OBNt1, OBNtfile,
56 U OBNs, OBNs0, OBNs1, OBNsfile,
57 #ifdef ALLOW_SEAICE
58 U OBNa, OBNa0, OBNa1, OBNafile,
59 U OBNh, OBNh0, OBNh1, OBNhfile,
60 U OBNsl, OBNsl0, OBNsl1, OBNslfile,
61 U OBNsn, OBNsn0, OBNsn1, OBNsnfile,
62 U OBNuice,OBNuice0,OBNuice1,OBNuicefile,
63 U OBNvice,OBNvice0,OBNvice1,OBNvicefile,
64 #endif
65 #ifdef ALLOW_PTRACERS
66 U OBNptr ,OBNptr0, OBNptr1, OBNptrFile,
67 #endif
68 I mycurrenttime, mycurrentiter, mythid
69 & )
70 #endif /* ALLOW_OBCS_NORTH */
71
72 #ifdef ALLOW_OBCS_SOUTH
73 call obcs_prescribe_exf_xz (
74 I obcsSstartdate, obcsSperiod,
75 I useOBCSYearlyFields,
76 U OBSu, OBSu0, OBSu1, OBSufile,
77 U OBSv, OBSv0, OBSv1, OBSvfile,
78 U OBSt, OBSt0, OBSt1, OBStfile,
79 U OBSs, OBSs0, OBSs1, OBSsfile,
80 #ifdef ALLOW_SEAICE
81 U OBSa, OBSa0, OBSa1, OBSafile,
82 U OBSh, OBSh0, OBSh1, OBShfile,
83 U OBSsl, OBSsl0, OBSsl1, OBSslfile,
84 U OBSsn, OBSsn0, OBSsn1, OBSsnfile,
85 U OBSuice,OBSuice0,OBSuice1,OBSuicefile,
86 U OBSvice,OBSvice0,OBSvice1,OBSvicefile,
87 #endif
88 #ifdef ALLOW_PTRACERS
89 U OBSptr ,OBSptr0, OBSptr1, OBSptrFile,
90 #endif
91 I mycurrenttime, mycurrentiter, mythid
92 & )
93 #endif /* ALLOW_OBCS_SOUTH */
94
95 #ifdef ALLOW_OBCS_EAST
96 call obcs_prescribe_exf_yz (
97 I obcsEstartdate, obcsEperiod,
98 I useOBCSYearlyFields,
99 U OBEu, OBEu0, OBEu1, OBEufile,
100 U OBEv, OBEv0, OBEv1, OBEvfile,
101 U OBEt, OBEt0, OBEt1, OBEtfile,
102 U OBEs, OBEs0, OBEs1, OBEsfile,
103 #ifdef ALLOW_SEAICE
104 U OBEa, OBEa0, OBEa1, OBEafile,
105 U OBEh, OBEh0, OBEh1, OBEhfile,
106 U OBEsl, OBEsl0, OBEsl1, OBEslfile,
107 U OBEsn, OBEsn0, OBEsn1, OBEsnfile,
108 U OBEuice,OBEuice0,OBEuice1,OBEuicefile,
109 U OBEvice,OBEvice0,OBEvice1,OBEvicefile,
110 #endif
111 #ifdef ALLOW_PTRACERS
112 U OBEptr ,OBEptr0, OBEptr1, OBEptrFile,
113 #endif
114 I mycurrenttime, mycurrentiter, mythid
115 & )
116 #endif /* ALLOW_OBCS_EAST */
117
118 #ifdef ALLOW_OBCS_WEST
119 call obcs_prescribe_exf_yz (
120 I obcsWstartdate, obcsWperiod,
121 I useOBCSYearlyFields,
122 U OBWu, OBWu0, OBWu1, OBWufile,
123 U OBWv, OBWv0, OBWv1, OBWvfile,
124 U OBWt, OBWt0, OBWt1, OBWtfile,
125 U OBWs, OBWs0, OBWs1, OBWsfile,
126 #ifdef ALLOW_SEAICE
127 U OBWa, OBWa0, OBWa1, OBWafile,
128 U OBWh, OBWh0, OBWh1, OBWhfile,
129 U OBWsl, OBWsl0, OBWsl1, OBWslfile,
130 U OBWsn, OBWsn0, OBWsn1, OBWsnfile,
131 U OBWuice,OBWuice0,OBWuice1,OBWuicefile,
132 U OBWvice,OBWvice0,OBWvice1,OBWvicefile,
133 #endif
134 #ifdef ALLOW_PTRACERS
135 U OBWptr ,OBWptr0, OBWptr1, OBWptrFile,
136 #endif
137 I mycurrenttime, mycurrentiter, mythid
138 & )
139 #endif /* ALLOW_OBCS_WEST */
140 C ENDIF useEXF
141 ENDIF
142 #endif /* ALLOW_EXF */
143
144 #ifdef ALLOW_OBCS_CONTROL
145 cgg WARNING: Assuming North Open Boundary exists and has same
146 cgg calendar information as other boundaries.
147 call ctrl_obcsbal ( mycurrenttime,mycurrentiter,mythid )
148 #endif
149
150 #ifdef ALLOW_OBCSN_CONTROL
151 call ctrl_getobcsn ( mycurrenttime, mycurrentiter, mythid )
152 #endif
153
154 #ifdef ALLOW_OBCSS_CONTROL
155 call ctrl_getobcss ( mycurrenttime, mycurrentiter, mythid )
156 #endif
157
158 #ifdef ALLOW_OBCSW_CONTROL
159 call ctrl_getobcsw ( mycurrenttime, mycurrentiter, mythid )
160 #endif
161
162 #ifdef ALLOW_OBCSE_CONTROL
163 call ctrl_getobcse ( mycurrenttime, mycurrentiter, mythid )
164 #endif
165
166 IF ( .NOT. useEXF ) THEN
167 CALL OBCS_EXTERNAL_FIELDS_LOAD(
168 & myCurrentTime, myCurrentIter, myThid )
169 ENDIF
170
171 #endif /* ALLOW_OBCS */
172
173 RETURN
174 END
175
176 C=========================================================================
177 C=========================================================================
178
179 subroutine obcs_prescribe_exf_xz (
180 I obcsstartdate, obcsperiod,
181 I useYearlyFields,
182 U OBu, OBu0, OBu1, OBufile,
183 U OBv, OBv0, OBv1, OBvfile,
184 U OBt, OBt0, OBt1, OBtfile,
185 U OBs, OBs0, OBs1, OBsfile,
186 #if defined ALLOW_SEAICE && defined ALLOW_OBCS
187 U OBa, OBa0, OBa1, OBafile,
188 U OBh, OBh0, OBh1, OBhfile,
189 U OBsl, OBsl0, OBsl1, OBslfile,
190 U OBsn, OBsn0, OBsn1, OBsnfile,
191 U OBuice,OBuice0,OBuice1,OBuicefile,
192 U OBvice,OBvice0,OBvice1,OBvicefile,
193 #endif
194 #if defined ALLOW_PTRACERS && defined ALLOW_OBCS
195 U OBptr ,OBptr0, OBptr1, OBptrFile,
196 #endif
197 I mycurrenttime, mycurrentiter, mythid
198 & )
199 c |==================================================================|
200 c | SUBROUTINE obcs_prescribe_exf_xz |
201 c |==================================================================|
202 c | read open boundary conditions from file |
203 c | N.B.: * uses exf and cal routines for file/record handling |
204 c | * uses ctrl routines for control variable handling |
205 c |==================================================================|
206
207 implicit none
208
209 c == global variables ==
210
211 #include "SIZE.h"
212 #include "EEPARAMS.h"
213 #include "PARAMS.h"
214 #ifdef ALLOW_EXF
215 # include "EXF_PARAM.h"
216 #endif
217 #ifdef ALLOW_PTRACERS
218 # include "PTRACERS_SIZE.h"
219 # include "PTRACERS_PARAMS.h"
220 #endif /* ALLOW_PTRACERS */
221
222 c == routine arguments ==
223
224 _RL obcsstartdate
225 _RL obcsperiod
226 LOGICAL useYearlyFields
227 _RL OBu (1-Olx:sNx+Olx,Nr,nSx,nSy)
228 _RL OBv (1-Olx:sNx+Olx,Nr,nSx,nSy)
229 _RL OBt (1-Olx:sNx+Olx,Nr,nSx,nSy)
230 _RL OBs (1-Olx:sNx+Olx,Nr,nSx,nSy)
231 _RL OBu0 (1-Olx:sNx+Olx,Nr,nSx,nSy)
232 _RL OBv0 (1-Olx:sNx+Olx,Nr,nSx,nSy)
233 _RL OBt0 (1-Olx:sNx+Olx,Nr,nSx,nSy)
234 _RL OBs0 (1-Olx:sNx+Olx,Nr,nSx,nSy)
235 _RL OBu1 (1-Olx:sNx+Olx,Nr,nSx,nSy)
236 _RL OBv1 (1-Olx:sNx+Olx,Nr,nSx,nSy)
237 _RL OBt1 (1-Olx:sNx+Olx,Nr,nSx,nSy)
238 _RL OBs1 (1-Olx:sNx+Olx,Nr,nSx,nSy)
239 CHARACTER*(MAX_LEN_FNAM) OBuFile,OBvFile,OBtFile,OBsFile
240 #if defined ALLOW_SEAICE && defined ALLOW_OBCS
241 _RL OBa (1-Olx:sNx+Olx,nSx,nSy)
242 _RL OBh (1-Olx:sNx+Olx,nSx,nSy)
243 _RL OBa0 (1-Olx:sNx+Olx,nSx,nSy)
244 _RL OBh0 (1-Olx:sNx+Olx,nSx,nSy)
245 _RL OBa1 (1-Olx:sNx+Olx,nSx,nSy)
246 _RL OBh1 (1-Olx:sNx+Olx,nSx,nSy)
247 _RL OBsl (1-Olx:sNx+Olx,nSx,nSy)
248 _RL OBsn (1-Olx:sNx+Olx,nSx,nSy)
249 _RL OBsl0 (1-Olx:sNx+Olx,nSx,nSy)
250 _RL OBsn0 (1-Olx:sNx+Olx,nSx,nSy)
251 _RL OBsl1 (1-Olx:sNx+Olx,nSx,nSy)
252 _RL OBsn1 (1-Olx:sNx+Olx,nSx,nSy)
253 _RL OBuice (1-Olx:sNx+Olx,nSx,nSy)
254 _RL OBvice (1-Olx:sNx+Olx,nSx,nSy)
255 _RL OBuice0 (1-Olx:sNx+Olx,nSx,nSy)
256 _RL OBvice0 (1-Olx:sNx+Olx,nSx,nSy)
257 _RL OBuice1 (1-Olx:sNx+Olx,nSx,nSy)
258 _RL OBvice1 (1-Olx:sNx+Olx,nSx,nSy)
259 CHARACTER*(MAX_LEN_FNAM)
260 & OBaFile,OBhFile,OBslFile,OBsnFile,OBuiceFile,OBviceFile
261 #endif /* ALLOW_SEAICE */
262 #if defined ALLOW_PTRACERS && defined ALLOW_OBCS
263 _RL OBptr (1-Olx:sNx+Olx,Nr,nSx,nSy,PTRACERS_num)
264 _RL OBptr0(1-Olx:sNx+Olx,Nr,nSx,nSy,PTRACERS_num)
265 _RL OBptr1(1-Olx:sNx+Olx,Nr,nSx,nSy,PTRACERS_num)
266 CHARACTER*(MAX_LEN_FNAM) OBptrFile(PTRACERS_num)
267 #endif /* ALLOW_PTRACERS */
268 _RL mycurrenttime
269 integer mycurrentiter
270 integer mythid
271
272 #if defined ALLOW_OBCS && defined ALLOW_OBCS_PRESCRIBE \
273 && defined ALLOW_EXF
274
275 c == local variables ==
276 logical first, changed
277 integer count0, count1
278 integer year0, year1
279 _RL fac
280 #ifdef ALLOW_PTRACERS
281 integer iTracer
282 #endif /* ALLOW_PTRACERS */
283
284 c == end of interface ==
285 if ( obcsperiod .eq. -12 ) then
286 c obcsperiod=-12 means input file contains 12 monthly means
287 c record numbers are assumed 1 to 12 corresponding to
288 c Jan. through Dec.
289 call cal_GetMonthsRec(
290 O fac, first, changed,
291 O count0, count1,
292 I mycurrenttime, mycurrentiter, mythid
293 & )
294
295 elseif ( obcsperiod .lt. 0 ) then
296 print *, 'obcsperiod is out of range'
297 STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_XZ'
298 else
299 c get record numbers and interpolation factor
300 call exf_GetFFieldRec(
301 I obcsstartdate, obcsperiod,
302 I useYearlyFields,
303 O fac, first, changed,
304 O count0, count1, year0, year1,
305 I mycurrenttime, mycurrentiter, mythid
306 & )
307 endif
308
309 call exf_set_obcs_xz( OBu, OBu0, OBu1, OBufile, 'u'
310 I , fac, first, changed, useYearlyFields
311 I , obcsperiod, count0, count1, year0, year1
312 I , mycurrenttime, mycurrentiter, mythid )
313 call exf_set_obcs_xz( OBv, OBv0, OBv1, OBvfile, 'v'
314 I , fac, first, changed, useYearlyFields
315 I , obcsperiod, count0, count1, year0, year1
316 I , mycurrenttime, mycurrentiter, mythid )
317 call exf_set_obcs_xz( OBt, OBt0, OBt1, OBtfile, 's'
318 I , fac, first, changed, useYearlyFields
319 I , obcsperiod, count0, count1, year0, year1
320 I , mycurrenttime, mycurrentiter, mythid )
321 call exf_set_obcs_xz( OBs, OBs0, OBs1, OBsfile, 's'
322 I , fac, first, changed, useYearlyFields
323 I , obcsperiod, count0, count1, year0, year1
324 I , mycurrenttime, mycurrentiter, mythid )
325 #ifdef ALLOW_SEAICE
326 IF (useSEAICE) THEN
327 call exf_set_obcs_x ( OBa, OBa0, OBa1, OBafile, 's'
328 I , fac, first, changed, useYearlyFields
329 I , obcsperiod, count0, count1, year0, year1
330 I , mycurrenttime, mycurrentiter, mythid )
331 call exf_set_obcs_x ( OBh, OBh0, OBh1, OBhfile, 's'
332 I , fac, first, changed, useYearlyFields
333 I , obcsperiod, count0, count1, year0, year1
334 I , mycurrenttime, mycurrentiter, mythid )
335 call exf_set_obcs_x ( OBsl, OBsl0, OBsl1, OBslfile, 's'
336 I , fac, first, changed, useYearlyFields
337 I , obcsperiod, count0, count1, year0, year1
338 I , mycurrenttime, mycurrentiter, mythid )
339 call exf_set_obcs_x ( OBsn, OBsn0, OBsn1, OBsnfile, 's'
340 I , fac, first, changed, useYearlyFields
341 I , obcsperiod, count0, count1, year0, year1
342 I , mycurrenttime, mycurrentiter, mythid )
343 call exf_set_obcs_x ( OBuice,OBuice0,OBuice1,OBuicefile,'s'
344 I , fac, first, changed, useYearlyFields
345 I , obcsperiod, count0, count1, year0, year1
346 I , mycurrenttime, mycurrentiter, mythid )
347 call exf_set_obcs_x ( OBvice,OBvice0,OBvice1,OBvicefile,'s'
348 I , fac, first, changed, useYearlyFields
349 I , obcsperiod, count0, count1, year0, year1
350 I , mycurrenttime, mycurrentiter, mythid )
351 ENDIF
352 #endif /* ALLOW_SEAICE */
353 #ifdef ALLOW_PTRACERS
354 if ( usePTRACERS ) then
355 do iTracer = 1, PTRACERS_numInUse
356 call exf_set_obcs_xz( OBptr (1-Olx,1,1,1,iTracer)
357 I , OBptr0(1-Olx,1,1,1,iTracer)
358 I , OBptr1(1-Olx,1,1,1,iTracer)
359 I , OBptrFile(iTracer), 's'
360 I , fac, first, changed, useYearlyFields
361 I , obcsperiod, count0, count1, year0, year1
362 I , mycurrenttime, mycurrentiter, mythid )
363 enddo
364 endif
365 #endif /* ALLOW_PTRACERS */
366
367 #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */
368 RETURN
369 END
370 C=========================================================================
371 C=========================================================================
372
373 subroutine obcs_prescribe_exf_yz (
374 I obcsstartdate, obcsperiod,
375 I useYearlyFields,
376 U OBu, OBu0, OBu1, OBufile,
377 U OBv, OBv0, OBv1, OBvfile,
378 U OBt, OBt0, OBt1, OBtfile,
379 U OBs, OBs0, OBs1, OBsfile,
380 #if defined ALLOW_SEAICE && defined ALLOW_OBCS
381 U OBa, OBa0, OBa1, OBafile,
382 U OBh, OBh0, OBh1, OBhfile,
383 U OBsl, OBsl0, OBsl1, OBslfile,
384 U OBsn, OBsn0, OBsn1, OBsnfile,
385 U OBuice,OBuice0,OBuice1,OBuicefile,
386 U OBvice,OBvice0,OBvice1,OBvicefile,
387 #endif
388 #if defined ALLOW_PTRACERS && defined ALLOW_OBCS
389 U OBptr ,OBptr0, OBptr1, OBptrFile,
390 #endif
391 I mycurrenttime, mycurrentiter, mythid
392 & )
393 c |==================================================================|
394 c | SUBROUTINE obcs_prescribe_exf_yz |
395 c |==================================================================|
396 c | read open boundary conditions from file |
397 c | N.B.: * uses exf and cal routines for file/record handling |
398 c | * uses ctrl routines for control variable handling |
399 c |==================================================================|
400
401 implicit none
402
403 c == global variables ==
404
405 #include "SIZE.h"
406 #include "EEPARAMS.h"
407 #include "PARAMS.h"
408 #ifdef ALLOW_EXF
409 # include "EXF_PARAM.h"
410 #endif
411 #ifdef ALLOW_PTRACERS
412 # include "PTRACERS_SIZE.h"
413 # include "PTRACERS_PARAMS.h"
414 #endif /* ALLOW_PTRACERS */
415
416 c == routine arguments ==
417
418 _RL obcsstartdate
419 _RL obcsperiod
420 LOGICAL useYearlyFields
421 _RL OBu (1-Oly:sNy+Oly,Nr,nSx,nSy)
422 _RL OBv (1-Oly:sNy+Oly,Nr,nSx,nSy)
423 _RL OBt (1-Oly:sNy+Oly,Nr,nSx,nSy)
424 _RL OBs (1-Oly:sNy+Oly,Nr,nSx,nSy)
425 _RL OBu0 (1-Oly:sNy+Oly,Nr,nSx,nSy)
426 _RL OBv0 (1-Oly:sNy+Oly,Nr,nSx,nSy)
427 _RL OBt0 (1-Oly:sNy+Oly,Nr,nSx,nSy)
428 _RL OBs0 (1-Oly:sNy+Oly,Nr,nSx,nSy)
429 _RL OBu1 (1-Oly:sNy+Oly,Nr,nSx,nSy)
430 _RL OBv1 (1-Oly:sNy+Oly,Nr,nSx,nSy)
431 _RL OBt1 (1-Oly:sNy+Oly,Nr,nSx,nSy)
432 _RL OBs1 (1-Oly:sNy+Oly,Nr,nSx,nSy)
433 CHARACTER*(MAX_LEN_FNAM) OBuFile,OBvFile,OBtFile,OBsFile
434 #if defined ALLOW_SEAICE && defined ALLOW_OBCS
435 _RL OBa (1-Oly:sNy+Oly,nSx,nSy)
436 _RL OBh (1-Oly:sNy+Oly,nSx,nSy)
437 _RL OBa0 (1-Oly:sNy+Oly,nSx,nSy)
438 _RL OBh0 (1-Oly:sNy+Oly,nSx,nSy)
439 _RL OBa1 (1-Oly:sNy+Oly,nSx,nSy)
440 _RL OBh1 (1-Oly:sNy+Oly,nSx,nSy)
441 _RL OBsl (1-Oly:sNy+Oly,nSx,nSy)
442 _RL OBsn (1-Oly:sNy+Oly,nSx,nSy)
443 _RL OBsl0 (1-Oly:sNy+Oly,nSx,nSy)
444 _RL OBsn0 (1-Oly:sNy+Oly,nSx,nSy)
445 _RL OBsl1 (1-Oly:sNy+Oly,nSx,nSy)
446 _RL OBsn1 (1-Oly:sNy+Oly,nSx,nSy)
447 _RL OBuice (1-Oly:sNy+Oly,nSx,nSy)
448 _RL OBvice (1-Oly:sNy+Oly,nSx,nSy)
449 _RL OBuice0 (1-Oly:sNy+Oly,nSx,nSy)
450 _RL OBvice0 (1-Oly:sNy+Oly,nSx,nSy)
451 _RL OBuice1 (1-Oly:sNy+Oly,nSx,nSy)
452 _RL OBvice1 (1-Oly:sNy+Oly,nSx,nSy)
453 CHARACTER*(MAX_LEN_FNAM)
454 & OBaFile,OBhFile,OBslFile,OBsnFile,OBuiceFile,OBviceFile
455 #endif /* ALLOW_SEAICE */
456 #if defined ALLOW_PTRACERS && defined ALLOW_OBCS
457 _RL OBptr (1-Oly:sNy+Oly,Nr,nSx,nSy,PTRACERS_num)
458 _RL OBptr0(1-Oly:sNy+Oly,Nr,nSx,nSy,PTRACERS_num)
459 _RL OBptr1(1-Oly:sNy+Oly,Nr,nSx,nSy,PTRACERS_num)
460 CHARACTER*(MAX_LEN_FNAM) OBptrFile(PTRACERS_num)
461 #endif /* ALLOW_PTRACERS */
462 _RL mycurrenttime
463 integer mycurrentiter
464 integer mythid
465
466 #if defined ALLOW_OBCS && defined ALLOW_OBCS_PRESCRIBE \
467 && defined ALLOW_EXF
468
469 c == local variables ==
470 logical first, changed
471 integer count0, count1
472 integer year0, year1
473 _RL fac
474 #ifdef ALLOW_PTRACERS
475 integer iTracer
476 #endif /* ALLOW_PTRACERS */
477
478 c == end of interface ==
479 if ( obcsperiod .eq. -12 ) then
480 c obcsperiod=-12 means input file contains 12 monthly means
481 c record numbers are assumed 1 to 12 corresponding to
482 c Jan. through Dec.
483 call cal_GetMonthsRec(
484 O fac, first, changed,
485 O count0, count1,
486 I mycurrenttime, mycurrentiter, mythid
487 & )
488
489 elseif ( obcsperiod .lt. 0 ) then
490 print *, 'obcsperiod is out of range'
491 STOP 'ABNORMAL END: S/R OBCS_PRESCIBE_EXF_YZ'
492 else
493 c get record numbers and interpolation factor
494 call exf_GetFFieldRec(
495 I obcsstartdate, obcsperiod,
496 I useYearlyFields,
497 O fac, first, changed,
498 O count0, count1, year0, year1,
499 I mycurrenttime, mycurrentiter, mythid
500 & )
501 endif
502
503 call exf_set_obcs_yz( OBu, OBu0, OBu1, OBufile, 'u'
504 I , fac, first, changed, useYearlyFields
505 I , obcsperiod, count0, count1, year0, year1
506 I , mycurrenttime, mycurrentiter, mythid )
507 call exf_set_obcs_yz( OBv, OBv0, OBv1, OBvfile, 'v'
508 I , fac, first, changed, useYearlyFields
509 I , obcsperiod, count0, count1, year0, year1
510 I , mycurrenttime, mycurrentiter, mythid )
511 call exf_set_obcs_yz( OBt, OBt0, OBt1, OBtfile, 's'
512 I , fac, first, changed, useYearlyFields
513 I , obcsperiod, count0, count1, year0, year1
514 I , mycurrenttime, mycurrentiter, mythid )
515 call exf_set_obcs_yz( OBs, OBs0, OBs1, OBsfile, 's'
516 I , fac, first, changed, useYearlyFields
517 I , obcsperiod, count0, count1, year0, year1
518 I , mycurrenttime, mycurrentiter, mythid )
519 #ifdef ALLOW_SEAICE
520 IF (useSEAICE) THEN
521 call exf_set_obcs_y ( OBa, OBa0, OBa1, OBafile, 's'
522 I , fac, first, changed, useYearlyFields
523 I , obcsperiod, count0, count1, year0, year1
524 I , mycurrenttime, mycurrentiter, mythid )
525 call exf_set_obcs_y ( OBh, OBh0, OBh1, OBhfile, 's'
526 I , fac, first, changed, useYearlyFields
527 I , obcsperiod, count0, count1, year0, year1
528 I , mycurrenttime, mycurrentiter, mythid )
529 call exf_set_obcs_y ( OBsl, OBsl0, OBsl1, OBslfile, 's'
530 I , fac, first, changed, useYearlyFields
531 I , obcsperiod, count0, count1, year0, year1
532 I , mycurrenttime, mycurrentiter, mythid )
533 call exf_set_obcs_y ( OBsn, OBsn0, OBsn1, OBsnfile, 's'
534 I , fac, first, changed, useYearlyFields
535 I , obcsperiod, count0, count1, year0, year1
536 I , mycurrenttime, mycurrentiter, mythid )
537 call exf_set_obcs_y ( OBuice,OBuice0,OBuice1,OBuicefile,'s'
538 I , fac, first, changed, useYearlyFields
539 I , obcsperiod, count0, count1, year0, year1
540 I , mycurrenttime, mycurrentiter, mythid )
541 call exf_set_obcs_y ( OBvice,OBvice0,OBvice1,OBvicefile,'s'
542 I , fac, first, changed, useYearlyFields
543 I , obcsperiod, count0, count1, year0, year1
544 I , mycurrenttime, mycurrentiter, mythid )
545 ENDIF
546 #endif /* ALLOW_SEAICE */
547 #ifdef ALLOW_PTRACERS
548 if ( usePTRACERS ) then
549 do iTracer = 1, PTRACERS_numInUse
550 call exf_set_obcs_yz( OBptr (1-Olx,1,1,1,iTracer)
551 I , OBptr0(1-Olx,1,1,1,iTracer)
552 I , OBptr1(1-Olx,1,1,1,iTracer)
553 I , OBptrFile(iTracer), 's'
554 I , fac, first, changed, useYearlyFields
555 I , obcsperiod, count0, count1, year0, year1
556 I , mycurrenttime, mycurrentiter, mythid )
557 enddo
558 endif
559 #endif /* ALLOW_PTRACERS */
560
561 #endif /* ALLOW_OBCS and ALLOW_OBCS_PRESCRIBE and ALLOW_EXF */
562 RETURN
563 END

  ViewVC Help
Powered by ViewVC 1.1.22