/[MITgcm]/MITgcm/pkg/ctrl/ctrl_init.F
ViewVC logotype

Annotation of /MITgcm/pkg/ctrl/ctrl_init.F

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


Revision 1.11 - (hide annotations) (download)
Thu Oct 30 19:09:05 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint54f_post, checkpoint51t_post, checkpoint55i_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint55c_post, checkpoint52e_pre, checkpoint52e_post, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint52m_post, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint51r_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint55a_post, checkpoint53b_post, checkpoint52a_post, ecco_c52_e35, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51u_post
Branch point for: branch-nonh, netcdf-sm0
Changes since 1.10: +199 -771 lines
ctrl package totally restructured
o pack/unpack now optional and decoupled from
  xx_/adxx_ I/O
o ctrl_pack/unpack cleaned
  (new routines ctrl_init_ctrlvar.F, pkg/ctrl/ctrl_init_wet.F)
o confined inclusion of AD_CONFIG.h to where necessary.

1 edhill 1.10 C
2 heimbach 1.11 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_init.F,v 1.10 2003/10/23 04:41:40 edhill Exp $
3     C $Name: $
4 heimbach 1.1
5     #include "CTRL_CPPOPTIONS.h"
6    
7 heimbach 1.5 subroutine ctrl_init( mythid )
8 heimbach 1.1
9     c ==================================================================
10 heimbach 1.5 c SUBROUTINE ctrl_init
11 heimbach 1.1 c ==================================================================
12     c
13     c o Set parts of the vector of control variables and initialize the
14     c rest to zero.
15     c
16     c The vector of control variables is initialized here. The
17     c temperature and salinity contributions are read from file.
18     c Subsequently, the latter are dimensionalized and the tile
19     c edges are updated.
20     c
21     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
22     c
23     c changed: Christian Eckert eckert@mit.edu 23-Feb-2000
24     c - Restructured the code in order to create a package
25     c for the MITgcmUV.
26     c
27     c Patrick Heimbach heimbach@mit.edu 30-May-2000
28     c - diffsec was falsely declared.
29     c
30     c Patrick Heimbach heimbach@mit.edu 06-Jun-2000
31     c - Transferred some filename declarations
32     c from ctrl_pack/ctrl_unpack to here
33     c - Transferred mask-per-tile to here
34     c - computation of control vector length here
35     c
36     c Patrick Heimbach heimbach@mit.edu 16-Jun-2000
37     c - Added call to ctrl_pack
38     c - Alternatively: transfer writing of scale files to
39     c ctrl_unpack
40     c
41 heimbach 1.9 c Dimitris Menemenlis menemenlis@mit.edu 7-Mar-2003
42     c - To be consistent with usage in ctrl_getrec.F,
43     c startrec and endrec need to be referenced to
44     c model time = 0, not to startTime.
45     c Also "- modelstep" -> "+ modelstep/2":
46     c old: startrec = int((modelstart - diffsecs)/
47     c old: & xx_???period) + 1
48     c old: endrec = int((modelend - diffsecs - modelstep)/
49     c old: & xx_???period) + 2
50     c new: startrec = int((modelstart + startTime - diffsecs)/
51     c new: & xx_???period) + 1
52     c new: endrec = int((modelend + startTime - diffsecs + modelstep/2)/
53     c new: & xx_???period) + 2
54     c
55 heimbach 1.11 c heimbach@mit.edu totally restructured 28-Oct-2003
56     c
57 heimbach 1.1 c ==================================================================
58 heimbach 1.5 c SUBROUTINE ctrl_init
59 heimbach 1.1 c ==================================================================
60    
61     implicit none
62    
63     c == global variables ==
64    
65     #include "EEPARAMS.h"
66     #include "SIZE.h"
67     #include "PARAMS.h"
68     #include "GRID.h"
69     #include "ctrl.h"
70    
71 heimbach 1.11 #ifdef ALLOW_CAL
72 heimbach 1.9 # include "cal.h"
73 heimbach 1.5 #endif
74     #ifdef ALLOW_OBCS_CONTROL
75     # include "OBCS.h"
76     #endif
77     #ifdef ALLOW_ECCO_OPTIMIZATION
78 heimbach 1.9 # include "optim.h"
79 heimbach 1.5 #endif
80    
81 heimbach 1.1 c == routine arguments ==
82    
83     integer mythid
84    
85     c == local variables ==
86    
87 heimbach 1.11 #ifndef ALLOW_ECCO_OPTIMIZATION
88     integer optimcycle
89     #endif
90 heimbach 1.1 integer ntmp
91 heimbach 1.11 integer ivar
92 heimbach 1.1
93 heimbach 1.5 integer iobcs
94 heimbach 1.1 integer il
95     integer errio
96     integer startrec
97     integer endrec
98 heimbach 1.11 integer diffrec
99 heimbach 1.5 integer difftime(4)
100     _RL diffsecs
101 heimbach 1.1
102     character*(max_len_prec) record
103     character*(max_len_mbuf) msgbuf
104 heimbach 1.11 character*2 whichxyz
105 heimbach 1.5
106 heimbach 1.1 c == external ==
107    
108     integer ilnblnk
109     external ilnblnk
110    
111     c == end of interface ==
112    
113 heimbach 1.11 #ifndef ALLOW_ECCO_OPTIMIZATION
114     optimcycle = 0
115 heimbach 1.9 #endif
116    
117 heimbach 1.1 c-- Set default values.
118 heimbach 1.11 do ivar = 1,maxcvars
119     ncvarindex(ivar) = -1
120     ncvarrecs(ivar) = 0
121     ncvarxmax(ivar) = 0
122     ncvarymax(ivar) = 0
123     ncvarnrmax(ivar) = 0
124     ncvargrd(ivar) = '?'
125     enddo
126 heimbach 1.1
127     _BARRIER
128    
129     c-- =====================
130     c-- Initial state fields.
131     c-- =====================
132    
133 heimbach 1.5 cph(
134     cph index 7-10 reserved for atmos. state,
135     cph index 11-14 reserved for open boundaries,
136     cph index 15-16 reserved for mixing coeff.
137     cph index 17 reserved for passive tracer TR1
138     cph index 18,19 reserved for sst, sss
139     cph index 20 for hFacC
140 heimbach 1.6 cph index 21-22 for efluxy, efluxp
141     cph index 23-24 for bottom drag
142 heimbach 1.5 cph)
143    
144 heimbach 1.9 c-------------------------------------------------------------------------------
145 heimbach 1.6 c--
146 heimbach 1.1 #ifdef ALLOW_THETA0_CONTROL
147 heimbach 1.5 c-- Initial state temperature contribution.
148 heimbach 1.11 call ctrl_init_ctrlvar (
149     & xx_theta_file, 1, 101, 1, 1, 1,
150     & snx, sny, nr, 'c', '3d', mythid )
151 heimbach 1.1 #endif /* ALLOW_THETA0_CONTROL */
152    
153 heimbach 1.9 c-------------------------------------------------------------------------------
154 heimbach 1.6 c--
155 heimbach 1.1 #ifdef ALLOW_SALT0_CONTROL
156 heimbach 1.5 c-- Initial state salinity contribution.
157 heimbach 1.11 call ctrl_init_ctrlvar (
158     & xx_salt_file, 2, 102, 1, 1, 1,
159     & snx, sny, nr, 'c', '3d', mythid )
160 heimbach 1.1 #endif /* ALLOW_SALT0_CONTROL */
161    
162 heimbach 1.5 c-- ===========================
163     c-- Surface flux contributions.
164     c-- ===========================
165    
166 heimbach 1.9 c-------------------------------------------------------------------------------
167 heimbach 1.6 c--
168 heimbach 1.5 #if (defined (ALLOW_HFLUX_CONTROL))
169     c-- Heat flux.
170    
171 heimbach 1.11 # ifdef ALLOW_CAL
172     call cal_FullDate( xx_hfluxstartdate1, xx_hfluxstartdate2,
173     & xx_hfluxstartdate , mythid )
174 heimbach 1.5 call cal_TimePassed( xx_hfluxstartdate, modelstartdate,
175     & difftime, mythid )
176     call cal_ToSeconds ( difftime, diffsecs, mythid )
177 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
178 heimbach 1.5 & xx_hfluxperiod) + 1
179 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
180 heimbach 1.5 & xx_hfluxperiod) + 2
181 heimbach 1.11 # else
182 heimbach 1.5 startrec = 1
183     endrec = 1
184 heimbach 1.11 # endif
185     diffrec = endrec - startrec + 1
186     call ctrl_init_ctrlvar (
187     & xx_hflux_file, 3, 103, diffrec, startrec, endrec,
188     & snx, sny, 1, 'c', 'xy', mythid )
189 heimbach 1.5
190     #elif (defined (ALLOW_ATEMP_CONTROL))
191     c-- Atmos. temperature
192    
193 heimbach 1.11 # ifdef ALLOW_CAL
194     call cal_FullDate( xx_atempstartdate1, xx_atempstartdate2,
195     & xx_atempstartdate , mythid )
196 heimbach 1.5 call cal_TimePassed( xx_atempstartdate, modelstartdate,
197     & difftime, mythid )
198     call cal_ToSeconds ( difftime, diffsecs, mythid )
199 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
200 heimbach 1.5 & xx_atempperiod) + 1
201 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
202 heimbach 1.5 & xx_atempperiod) + 2
203 heimbach 1.11 # else
204 heimbach 1.5 startrec = 1
205     endrec = 1
206 heimbach 1.11 # endif
207     diffrec = endrec - startrec + 1
208     call ctrl_init_ctrlvar (
209     & xx_atemp_file, 7, 107, diffrec, startrec, endrec,
210     & snx, sny, 1, 'c', 'xy', mythid )
211 heimbach 1.5
212     #elif (defined (ALLOW_HFLUX0_CONTROL))
213     c-- initial forcing only
214 heimbach 1.11 call ctrl_init_ctrlvar (
215     & xx_hflux_file, 3, 103, 1, 1, 1,
216     & snx, sny, 1, 'c', 'xy', mythid )
217 heimbach 1.1
218 heimbach 1.5 #endif /* ALLOW_HFLUX_CONTROL */
219    
220 heimbach 1.9 c-------------------------------------------------------------------------------
221 heimbach 1.6 c--
222 heimbach 1.5 #if (defined (ALLOW_SFLUX_CONTROL))
223     c-- Salt flux.
224    
225 heimbach 1.11 # ifdef ALLOW_CAL
226     call cal_FullDate( xx_sfluxstartdate1, xx_sfluxstartdate2,
227     & xx_sfluxstartdate , mythid )
228 heimbach 1.5 call cal_TimePassed( xx_sfluxstartdate, modelstartdate,
229     & difftime, mythid )
230     call cal_ToSeconds ( difftime, diffsecs, mythid )
231 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
232 heimbach 1.5 & xx_sfluxperiod) + 1
233 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
234 heimbach 1.5 & xx_sfluxperiod) + 2
235 heimbach 1.11 # else
236 heimbach 1.5 startrec = 1
237     endrec = 1
238 heimbach 1.11 # endif
239     diffrec = endrec - startrec + 1
240     call ctrl_init_ctrlvar (
241     & xx_sflux_file, 4, 104, diffrec, startrec, endrec,
242     & snx, sny, 1, 'c', 'xy', mythid )
243    
244 heimbach 1.5 #elif (defined (ALLOW_AQH_CONTROL))
245     c-- Atmos. humidity
246    
247 heimbach 1.11 # ifdef ALLOW_CAL
248     call cal_FullDate( xx_aqhstartdate1, xx_aqhstartdate2,
249     & xx_aqhstartdate , mythid )
250 heimbach 1.5 call cal_TimePassed( xx_aqhstartdate, modelstartdate,
251     & difftime, mythid )
252     call cal_ToSeconds ( difftime, diffsecs, mythid )
253 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
254 heimbach 1.5 & xx_aqhperiod) + 1
255 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
256 heimbach 1.5 & xx_aqhperiod) + 2
257 heimbach 1.11 # else
258 heimbach 1.5 startrec = 1
259     endrec = 1
260 heimbach 1.11 # endif
261     diffrec = endrec - startrec + 1
262     call ctrl_init_ctrlvar (
263     & xx_aqh_file, 8, 108, diffrec, startrec, endrec,
264     & snx, sny, 1, 'c', 'xy', mythid )
265 heimbach 1.5
266     #elif (defined (ALLOW_SFLUX0_CONTROL))
267     c-- initial forcing only
268 heimbach 1.11 call ctrl_init_ctrlvar (
269     & xx_sflux_file, 4, 104, 1, 1, 1,
270     & snx, sny, 1, 'c', 'xy', mythid )
271 heimbach 1.1
272 heimbach 1.5 #endif /* ALLOW_SFLUX_CONTROL */
273    
274 heimbach 1.9 c-------------------------------------------------------------------------------
275 heimbach 1.6 c--
276 heimbach 1.5 #if (defined (ALLOW_USTRESS_CONTROL))
277     c-- Zonal wind stress.
278    
279 heimbach 1.11 # ifdef ALLOW_CAL
280     call cal_FullDate( xx_tauustartdate1, xx_tauustartdate2,
281     & xx_tauustartdate, mythid )
282 heimbach 1.5 call cal_TimePassed( xx_tauustartdate, modelstartdate,
283     & difftime, mythid )
284     call cal_ToSeconds ( difftime, diffsecs, mythid )
285 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
286 heimbach 1.5 & xx_tauuperiod) + 1
287 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
288 heimbach 1.5 & xx_tauuperiod) + 2
289 heimbach 1.11 # else
290 heimbach 1.5 startrec = 1
291     endrec = 1
292 heimbach 1.11 # endif
293     diffrec = endrec - startrec + 1
294     call ctrl_init_ctrlvar (
295     & xx_tauu_file, 5, 105, diffrec, startrec, endrec,
296     & snx, sny, 1, 'w', 'xy', mythid )
297 heimbach 1.5
298     #elif (defined (ALLOW_UWIND_CONTROL))
299     c-- Zonal wind speed.
300    
301 heimbach 1.11 # ifdef ALLOW_CAL
302     call cal_FullDate( xx_uwindstartdate1, xx_uwindstartdate2,
303     & xx_uwindstartdate , mythid )
304 heimbach 1.5 call cal_TimePassed( xx_uwindstartdate, modelstartdate,
305     & difftime, mythid )
306     call cal_ToSeconds ( difftime, diffsecs, mythid )
307 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
308 heimbach 1.5 & xx_uwindperiod) + 1
309 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
310 heimbach 1.5 & xx_uwindperiod) + 2
311 heimbach 1.11 # else
312 heimbach 1.5 startrec = 1
313     endrec = 1
314 heimbach 1.11 # endif
315     diffrec = endrec - startrec + 1
316     call ctrl_init_ctrlvar (
317     & xx_uwind_file, 9, 109, diffrec, startrec, endrec,
318     & snx, sny, 1, 'w', 'xy', mythid )
319 heimbach 1.5
320     #elif (defined (ALLOW_TAUU0_CONTROL))
321     c-- initial forcing only
322 heimbach 1.11 call ctrl_init_ctrlvar (
323     & xx_tauu_file, 5, 105, 1, 1, 1,
324     & snx, sny, 1, 'w', 'xy', mythid )
325 heimbach 1.1
326 heimbach 1.5 #endif /* ALLOW_USTRESS_CONTROL */
327    
328 heimbach 1.9 c-------------------------------------------------------------------------------
329 heimbach 1.6 c--
330 heimbach 1.5 #if (defined (ALLOW_VSTRESS_CONTROL))
331     c-- Meridional wind stress.
332    
333 heimbach 1.11 # ifdef ALLOW_CAL
334     call cal_FullDate( xx_tauvstartdate1, xx_tauvstartdate2,
335     & xx_tauvstartdate, mythid )
336 heimbach 1.5 call cal_TimePassed( xx_tauvstartdate, modelstartdate,
337     & difftime, mythid )
338     call cal_ToSeconds ( difftime, diffsecs, mythid )
339 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
340 heimbach 1.5 & xx_tauvperiod) + 1
341 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
342 heimbach 1.5 & xx_tauvperiod) + 2
343 heimbach 1.11 # else
344 heimbach 1.5 startrec = 1
345     endrec = 1
346 heimbach 1.11 # endif
347     diffrec = endrec - startrec + 1
348     call ctrl_init_ctrlvar (
349     & xx_tauv_file, 6, 106, diffrec, startrec, endrec,
350     & snx, sny, 1, 's', 'xy', mythid )
351 heimbach 1.5
352     #elif (defined (ALLOW_VWIND_CONTROL))
353     c-- Meridional wind speed.
354    
355 heimbach 1.11 # ifdef ALLOW_CAL
356     call cal_FullDate( xx_vwindstartdate1, xx_vwindstartdate2,
357     & xx_vwindstartdate , mythid )
358 heimbach 1.5 call cal_TimePassed( xx_vwindstartdate, modelstartdate,
359     & difftime, mythid )
360     call cal_ToSeconds ( difftime, diffsecs, mythid )
361 heimbach 1.9 startrec = int((modelstart + startTime - diffsecs)/
362 heimbach 1.5 & xx_vwindperiod) + 1
363 heimbach 1.9 endrec = int((modelend + startTime - diffsecs + modelstep/2)/
364 heimbach 1.5 & xx_vwindperiod) + 2
365 heimbach 1.11 # else
366 heimbach 1.5 startrec = 1
367     endrec = 1
368 heimbach 1.11 # endif
369     diffrec = endrec - startrec + 1
370     call ctrl_init_ctrlvar (
371     & xx_vwind_file, 10, 110, diffrec, startrec, endrec,
372     & snx, sny, 1, 's', 'xy', mythid )
373 heimbach 1.5
374     #elif (defined (ALLOW_TAUV0_CONTROL))
375     c-- initial forcing only
376 heimbach 1.11 diffrec = endrec - startrec + 1
377     call ctrl_init_ctrlvar (
378     & xx_tauv_file, 6, 106, 1, 1, 1,
379     & snx, sny, 1, 's', 'xy', mythid )
380 heimbach 1.1
381 heimbach 1.5 #endif /* ALLOW_VSTRESS_CONTROL */
382    
383 heimbach 1.11 c-- ===========================
384     c-- Open boundary contributions.
385     c-- ===========================
386    
387 heimbach 1.9 c-------------------------------------------------------------------------------
388 heimbach 1.6 c--
389 heimbach 1.5 #ifdef ALLOW_OBCSN_CONTROL
390     c-- Northern obc.
391    
392 heimbach 1.11 # ifdef ALLOW_CAL
393     call cal_FullDate( xx_obcsnstartdate1, xx_obcsnstartdate2,
394     & xx_obcsnstartdate, mythid )
395 heimbach 1.5 call cal_TimePassed( xx_obcsnstartdate, modelstartdate,
396     & difftime, mythid )
397     call cal_ToSeconds ( difftime, diffsecs, mythid )
398 heimbach 1.9 startrec = int((modelstart - diffsecs)/xx_obcsnperiod) + 1
399 heimbach 1.11 startrec = (startrec - 1)*nobcs + 1
400 heimbach 1.9 endrec = int((modelend - diffsecs)/xx_obcsnperiod) + 2
401 heimbach 1.11 endrec = (endrec - startrec + 1)*nobcs
402     # else
403 heimbach 1.5 startrec = 1
404     endrec = 1
405 heimbach 1.11 # endif
406     diffrec = endrec*nobcs
407     call ctrl_init_ctrlvar (
408     & xx_obcsn_file, 11, 111, diffrec, startrec, endrec,
409     & snx, sny, nr, 'm', 'xz', mythid )
410 heimbach 1.5
411     #endif /* ALLOW_OBCSN_CONTROL */
412    
413 heimbach 1.11 c-------------------------------------------------------------------------------
414     c--
415 heimbach 1.5 #ifdef ALLOW_OBCSS_CONTROL
416     c-- Southern obc.
417    
418 heimbach 1.11 # ifdef ALLOW_CAL
419     call cal_FullDate( xx_obcssstartdate1, xx_obcssstartdate2,
420     & xx_obcssstartdate, mythid )
421 heimbach 1.5 call cal_TimePassed( xx_obcssstartdate, modelstartdate,
422     & difftime, mythid )
423     call cal_ToSeconds ( difftime, diffsecs, mythid )
424 heimbach 1.9 startrec = int((modelstart - diffsecs)/xx_obcssperiod) + 1
425 heimbach 1.11 startrec = (startrec - 1)*nobcs + 1
426 heimbach 1.9 endrec = int((modelend - diffsecs)/xx_obcssperiod) + 2
427 heimbach 1.11 endrec = (endrec - startrec + 1)*nobcs
428     # else
429 heimbach 1.5 startrec = 1
430     endrec = 1
431 heimbach 1.11 # endif
432     diffrec = endrec*nobcs
433     call ctrl_init_ctrlvar (
434     & xx_obcss_file, 12, 112, diffrec, startrec, endrec,
435     & snx, sny, nr, 'm', 'xz', mythid )
436 heimbach 1.5
437     #endif /* ALLOW_OBCSS_CONTROL */
438    
439 heimbach 1.9 c-------------------------------------------------------------------------------
440 heimbach 1.6 c--
441 heimbach 1.5 #ifdef ALLOW_OBCSW_CONTROL
442     c-- Western obc.
443    
444 heimbach 1.11 # ifdef ALLOW_CAL
445     call cal_FullDate( xx_obcswstartdate1, xx_obcswstartdate2,
446     & xx_obcswstartdate, mythid )
447 heimbach 1.5 call cal_TimePassed( xx_obcswstartdate, modelstartdate,
448     & difftime, mythid )
449     call cal_ToSeconds ( difftime, diffsecs, mythid )
450 heimbach 1.9 startrec = int((modelstart - diffsecs)/xx_obcswperiod) + 1
451 heimbach 1.11 startrec = (startrec - 1)*nobcs + 1
452 heimbach 1.9 endrec = int((modelend - diffsecs)/xx_obcswperiod) + 2
453 heimbach 1.11 endrec = (endrec - startrec + 1)*nobcs
454     # else
455 heimbach 1.5 startrec = 1
456     endrec = 1
457 heimbach 1.11 # endif
458     diffrec = endrec*nobcs
459     call ctrl_init_ctrlvar (
460     & xx_obcsw_file, 13, 113, diffrec, startrec, endrec,
461     & snx, sny, nr, 'm', 'yz', mythid )
462 heimbach 1.5
463 heimbach 1.11 #endif /* ALLOW_OBCSW_CONTROL */
464 heimbach 1.5
465 heimbach 1.9 c-------------------------------------------------------------------------------
466 heimbach 1.6 c--
467 heimbach 1.5 #ifdef ALLOW_OBCSE_CONTROL
468     c-- Eastern obc.
469    
470 heimbach 1.11 # ifdef ALLOW_CAL
471     call cal_FullDate( xx_obcsestartdate1, xx_obcsestartdate2,
472     & xx_obcsestartdate, mythid )
473 heimbach 1.5 call cal_TimePassed( xx_obcsestartdate, modelstartdate,
474     & difftime, mythid )
475     call cal_ToSeconds ( difftime, diffsecs, mythid )
476 heimbach 1.9 startrec = int((modelstart - diffsecs)/xx_obcseperiod) + 1
477 heimbach 1.11 startrec = (startrec - 1)*nobcs + 1
478 heimbach 1.9 endrec = int((modelend - diffsecs)/xx_obcseperiod) + 2
479 heimbach 1.11 endrec = (endrec - startrec + 1)*nobcs
480     # else
481 heimbach 1.5 startrec = 1
482     endrec = 1
483 heimbach 1.11 # endif
484     diffrec = endrec*nobcs
485     call ctrl_init_ctrlvar (
486     & xx_obcse_file, 14, 114, diffrec, startrec, endrec,
487     & snx, sny, nr, 'm', 'yz', mythid )
488 heimbach 1.5
489     #endif /* ALLOW_OBCSE_CONTROL */
490 heimbach 1.2
491 heimbach 1.9 c-------------------------------------------------------------------------------
492 heimbach 1.6 c--
493 heimbach 1.3 #ifdef ALLOW_DIFFKR_CONTROL
494 heimbach 1.11 call ctrl_init_ctrlvar (
495     & xx_diffkr_file, 15, 115, 1, 1, 1,
496     & snx, sny, nr, 'c', '3d', mythid )
497 heimbach 1.3 #endif /* ALLOW_DIFFKR_CONTROL */
498    
499 heimbach 1.9 c-------------------------------------------------------------------------------
500 heimbach 1.6 c--
501 heimbach 1.3 #ifdef ALLOW_KAPGM_CONTROL
502 heimbach 1.11 call ctrl_init_ctrlvar (
503     & xx_kapgm_file, 16, 116, 1, 1, 1,
504     & snx, sny, nr, 'c', '3d', mythid )
505 heimbach 1.3 #endif /* ALLOW_KAPGM_CONTROL */
506    
507 heimbach 1.9 c-------------------------------------------------------------------------------
508 heimbach 1.6 c--
509 heimbach 1.2 #ifdef ALLOW_TR10_CONTROL
510 heimbach 1.11 call ctrl_init_ctrlvar (
511     & xx_tr1_file, 17, 117, 1, 1, 1,
512     & snx, sny, nr, 'c', '3d', mythid )
513 heimbach 1.2 #endif /* ALLOW_TR10_CONTROL */
514    
515 heimbach 1.9 c-------------------------------------------------------------------------------
516 heimbach 1.6 c--
517     #ifdef ALLOW_SST0_CONTROL
518 heimbach 1.11 call ctrl_init_ctrlvar (
519     & xx_sst_file, 18, 118, 1, 1, 1,
520     & snx, sny, 1, 'c', 'xy', mythid )
521 heimbach 1.6 #endif /* ALLOW_SST0_CONTROL */
522    
523 heimbach 1.9 c-------------------------------------------------------------------------------
524 heimbach 1.6 c--
525     #ifdef ALLOW_SSS0_CONTROL
526 heimbach 1.11 call ctrl_init_ctrlvar (
527     & xx_sss_file, 19, 119, 1, 1, 1,
528     & snx, sny, 1, 'c', 'xy', mythid )
529 heimbach 1.6 #endif /* ALLOW_SSS0_CONTROL */
530    
531 heimbach 1.9 c-------------------------------------------------------------------------------
532 heimbach 1.6 c--
533     #ifdef ALLOW_HFACC_CONTROL
534 heimbach 1.11 # ifdef ALLOW_HFACC3D_CONTROL
535     call ctrl_init_ctrlvar (
536     & xx_hfacc_file, 20, 120, 1, 1, 1,
537     & snx, sny, nr, 'c', '3d', mythid )
538     # else
539     call ctrl_init_ctrlvar (
540     & xx_hfacc_file, 20, 120, 1, 1, 1,
541     & snx, sny, 1, 'c', 'xy', mythid )
542     # endif /*ALLOW_HFACC3D_CONTROL*/
543 heimbach 1.6 #endif /* ALLOW_HFACC_CONTROL */
544    
545 heimbach 1.9 c-------------------------------------------------------------------------------
546 heimbach 1.6 c--
547 heimbach 1.5 #ifdef ALLOW_EFLUXY0_CONTROL
548 heimbach 1.11 call ctrl_init_ctrlvar (
549     & xx_efluxy_file, 21, 121, 1, 1, 1,
550     & snx, sny, nr, 's', '3d', mythid )
551 heimbach 1.5 #endif /* ALLOW_EFLUXY0_CONTROL */
552    
553 heimbach 1.9 c-------------------------------------------------------------------------------
554 heimbach 1.6 c--
555 heimbach 1.5 #ifdef ALLOW_EFLUXP0_CONTROL
556 heimbach 1.11 call ctrl_init_ctrlvar (
557     & xx_efluxp_file, 22, 122, 1, 1, 1,
558     & snx, sny, nr, 'v', '3d', mythid )
559 heimbach 1.5 #endif /* ALLOW_EFLUXP0_CONTROL */
560 heimbach 1.6
561 heimbach 1.9 c-------------------------------------------------------------------------------
562 heimbach 1.6 c--
563     #ifdef ALLOW_BOTTOMDRAG_CONTROL
564 heimbach 1.11 call ctrl_init_ctrlvar (
565     & xx_bottomdrag_file, 23, 123, 1, 1, 1,
566     & snx, sny, 1, 'c', 'xy', mythid )
567 heimbach 1.6 #endif /* ALLOW_BOTTOMDRAG_CONTROL */
568    
569 heimbach 1.9 c-------------------------------------------------------------------------------
570     c-------------------------------------------------------------------------------
571     c-------------------------------------------------------------------------------
572 heimbach 1.1
573 heimbach 1.11 call ctrl_init_wet( mythid )
574    
575 heimbach 1.1 return
576     end
577    

  ViewVC Help
Powered by ViewVC 1.1.22