/[MITgcm]/MITgcm_contrib/SOSE/BoxAdj/code_ad/ctrl.h
ViewVC logotype

Annotation of /MITgcm_contrib/SOSE/BoxAdj/code_ad/ctrl.h

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


Revision 1.1 - (hide annotations) (download)
Tue Apr 19 23:33:00 2011 UTC (14 years, 8 months ago) by mmazloff
Branch: MAIN
File MIME type: text/plain
cleaning

1 mmazloff 1.1 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl.h,v 1.52 2011/03/15 16:39:45 mlosch Exp $
2     C $Name: $
3    
4    
5     c ==================================================================
6     c HEADER CONTROLVARS
7     c ==================================================================
8     c
9     c o Control variables of the ECCO state estimation tool.
10     c
11     c Depending on the specific problem to be studied users will have to
12     c modify this header file.
13     c
14     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
15     c
16     c changed: Christian Eckert eckert@mit.edu
17     c
18     c
19     c ==================================================================
20     c HEADER CONTROLVARS
21     c ==================================================================
22     c
23     c nwet[c/s/w]tile - Number of wet points in a tile for center (c),
24     c south (s), and western (w) mask, resp. .
25    
26     integer dimgen2d
27     integer dimgen3d
28     parameter ( dimgen2d = 1, dimgen3d = 0 )
29    
30     integer maxcvars
31     #if (defined (CTRL_SET_OLD_MAXCVARS_30))
32     parameter ( maxcvars = 30 )
33     #elif (defined (CTRL_SET_OLD_MAXCVARS_40))
34     parameter ( maxcvars = 40 )
35     #else
36     parameter ( maxcvars = 60 )
37     #endif
38    
39     cph ctrlprec will be set to 32 for ECCO to reduce I/O
40     cph but jeopardizes some gradient checks, so should be
41     cph set to 64 by default.
42     cph Need to put this in namelist at some point!
43     integer ctrlprec
44     #ifdef CTRL_SET_PREC_32
45     parameter ( ctrlprec = 32 )
46     #else
47     parameter ( ctrlprec = 64 )
48     #endif
49    
50     #ifdef ALLOW_ADMTLM
51     integer admtlmrec
52     parameter( admtlmrec = Nx*Ny*(4*Nr+1) )
53     common / controlvars_admtlm_r /
54     & cbuffGlobal
55     _RL cbuffGlobal( admtlmrec )
56     #endif
57    
58     common /controlparams_r/
59     & delZexp,
60     & forcingPrecond
61    
62     _RL delZexp
63     _RL forcingPrecond
64    
65     common /controlvars_l /
66     & doInitXX,
67     & doAdmTlm,
68     & doPackDiag,
69     & doZscaleUnpack,
70     & doZscalePack,
71     & doMainUnpack,
72     & doMainPack,
73     & doSinglePrecTapelev,
74     & doAdmtlmBypassAD
75    
76     logical doInitXX
77     logical doAdmTlm
78     logical doPackDiag
79     logical doZscaleUnpack
80     logical doZscalePack
81     logical doMainUnpack
82     logical doMainPack
83     logical doSinglePrecTapelev
84     logical doAdmtlmBypassAD
85    
86     common /controlvars_i/
87     & nvartype,
88     & nvarlength,
89     & ncvarindex,
90     & ncvarrecs,
91     & ncvarrecstart,
92     & ncvarrecsend,
93     & ncvarxmax,
94     & ncvarymax,
95     & ncvarnrmax,
96     & nwetctile,
97     & nwetstile,
98     & nwetwtile,
99     & nwetvtile,
100     & nwetcglobal,
101     & nwetsglobal,
102     & nwetwglobal,
103     & nwetvglobal,
104     & nbuffglobal
105     integer nvartype
106     integer nvarlength
107     integer ncvarindex ( maxcvars )
108     integer ncvarrecs ( maxcvars )
109     integer ncvarrecstart ( maxcvars )
110     integer ncvarrecsend ( maxcvars )
111     integer ncvarxmax ( maxcvars )
112     integer ncvarymax ( maxcvars )
113     integer ncvarnrmax ( maxcvars )
114     integer nwetctile ( nsx,nsy,nr )
115     integer nwetstile ( nsx,nsy,nr )
116     integer nwetwtile ( nsx,nsy,nr )
117     integer nwetvtile ( nsx,nsy,nr )
118     integer nwetcglobal ( nr )
119     integer nwetsglobal ( nr )
120     integer nwetwglobal ( nr )
121     integer nwetvglobal ( nr )
122     integer nbuffglobal
123    
124     #ifdef ALLOW_OBCSN_CONTROL
125     common /controlvars_i_obcsn/
126     & nwetobcsn,
127     & nwetobcsnglo
128     integer nwetobcsn ( nsx,nsy,nr,nobcs )
129     integer nwetobcsnglo ( nr,nobcs )
130     #endif
131     #ifdef ALLOW_OBCSS_CONTROL
132     common /controlvars_i_obcss/
133     & nwetobcss,
134     & nwetobcssglo
135     integer nwetobcss ( nsx,nsy,nr,nobcs )
136     integer nwetobcssglo ( nr,nobcs )
137     #endif
138     #ifdef ALLOW_OBCSW_CONTROL
139     common /controlvars_i_obcsw/
140     & nwetobcsw,
141     & nwetobcswglo
142     integer nwetobcsw ( nsx,nsy,nr,nobcs )
143     integer nwetobcswglo ( nr,nobcs )
144     #endif
145     #ifdef ALLOW_OBCSE_CONTROL
146     common /controlvars_i_obcse/
147     & nwetobcse,
148     & nwetobcseglo
149     integer nwetobcse ( nsx,nsy,nr,nobcs )
150     integer nwetobcseglo ( nr,nobcs )
151     #endif
152    
153     common /controlvars_c/
154     & ncvargrd
155     & , yadprefix
156     character*(1) ncvargrd(maxcvars)
157     character*(2) yadprefix
158    
159     common /controlvec_header_i/
160     & filenvartype,
161     & filenvarlength,
162     & fileOptimCycle,
163     & filencbuffindex,
164     & fileIg,
165     & fileJg,
166     & fileI,
167     & fileJ,
168     & filensx,
169     & filensy,
170     & filek,
171     & filenWetcGlobal,
172     & filenWetsGlobal,
173     & filenWetwGlobal,
174     & filenWetvGlobal,
175     & filencvarindex,
176     & filencvarrecs,
177     & filencvarxmax,
178     & filencvarymax,
179     & filencvarnrmax
180     integer filenvartype
181     integer filenvarlength
182     integer fileOptimCycle
183     integer filencbuffindex
184     integer fileIg
185     integer fileJg
186     integer fileI
187     integer fileJ
188     integer filensx
189     integer filensy
190     integer filek
191     integer filenWetcGlobal(nr)
192     integer filenWetsGlobal(nr)
193     integer filenWetwGlobal(nr)
194     integer filenWetvGlobal(nr)
195     integer filencvarindex(maxcvars)
196     integer filencvarrecs(maxcvars)
197     integer filencvarxmax(maxcvars)
198     integer filencvarymax(maxcvars)
199     integer filencvarnrmax(maxcvars)
200    
201     common /controlvec_header_r/
202     & filefc
203     _RL filefc
204    
205     common /controlvec_header_c/
206     & fileYctrlid,
207     & filencvargrd
208     character*(10) fileYctrlid
209     character*( 1) filencvargrd(maxcvars)
210    
211     c Define unit weight as a placeholder
212     common /ctrl_weights_unit_r/
213     & wunit,
214     & wareaunit
215     _RL wunit (nr,nsx,nsy)
216     _RL wareaunit (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
217    
218     #ifndef ALLOW_ECCO
219     common /ctrl_weights_atmos_r/
220     & whflux,
221     & wsflux,
222     & wtauu,
223     & wtauv,
224     & watemp,
225     & waqh,
226     & wprecip,
227     & wswflux,
228     & wswdown,
229     & wuwind,
230     & wvwind,
231     & wlwflux,
232     & wlwdown,
233     & wevap,
234     & wsnowprecip,
235     & wapressure,
236     & wrunoff,
237     & wsst,
238     & wsss,
239     & wbp
240     _RL whflux (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
241     _RL wsflux (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
242     _RL wtauu (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
243     _RL wtauv (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
244     _RL watemp (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
245     _RL waqh (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
246     _RL wprecip (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
247     _RL wswflux (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
248     _RL wswdown (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
249     _RL wuwind (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
250     _RL wvwind (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
251     _RL wlwflux (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
252     _RL wlwdown (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
253     _RL wevap (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
254     _RL wsnowprecip (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
255     _RL wapressure(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
256     _RL wrunoff (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
257     _RL wsst (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
258     _RL wsss (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
259     _RL wbp (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
260     #endif
261    
262     c Control variables:
263     c ==================
264     c
265     c xx_theta - control vector temperature part.
266     c xx_salt - control vector salt part.
267     c xx_hflux - control vector surface heat flux part.
268     c xx_sflux - control vector surface salt flux part.
269     c xx_tauu - control vector zonal wind stress part.
270     c xx_tauv - control vector meridional wind stress part.
271     cph(
272     c xx_... are to be replaced by tmpfld2d/3d throughout the code;
273     c control variables are written to / read from active files
274     c TAMC sees xx_..._dummy
275    
276     common /controlvars_r/
277     & tmpfld2d
278     & , tmpfld3d
279     _RL tmpfld2d
280     & (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
281     _RL tmpfld3d
282     & (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
283    
284     #ifdef ALLOW_AUTODIFF_OPENAD
285     common /controlvars_r_openad/
286     & xx_theta
287     & , xx_salt
288     & , xx_uvel
289     & , xx_vvel
290     & , xx_etan
291     # ifdef ALLOW_DIFFKR_CONTROL
292     & , xx_diffkr
293     # endif
294     # ifdef ALLOW_KAPGM_CONTROL
295     & , xx_kapgm
296     # endif
297     _RL xx_theta(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
298     _RL xx_salt(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
299     _RL xx_uvel(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
300     _RL xx_vvel(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
301     _RL xx_etan(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
302     # ifdef ALLOW_DIFFKR_CONTROL
303     _RL xx_diffkr(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
304     # endif
305     # ifdef ALLOW_KAPGM_CONTROL
306     _RL xx_kapgm(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
307     # endif
308     #endif
309    
310     c Auxiliary storage arrays for the control variables:
311     c ===================================================
312     c
313     c xx_hflux0 - heat flux record before current date.
314     c xx_hflux1 - heat flux record after current date
315     c xx_sflux0 - salt flux record before current date.
316     c xx_sflux1 - salt flux record after current date.
317     c xx_tauu0 - zonal wind stress record before current date.
318     c xx_tauu1 - zonal wind stress record after current date.
319     c xx_tauv0 - meridional wind stress record before current date.
320     c xx_tauv1 - meridional wind stress record after current date.
321    
322     #if (defined (ALLOW_HFLUX_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_HFLUX0_CONTROL)))
323     common /controlaux_hflux_r/
324     & xx_hflux0,
325     & xx_hflux1
326     #elif (defined (ALLOW_ATEMP_CONTROL))
327     common /controlaux_atemp_r/
328     & xx_atemp0,
329     & xx_atemp1
330     #endif
331    
332     #if (defined (ALLOW_SFLUX_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_SFLUX0_CONTROL)))
333     common /controlaux_swflux_r/
334     & xx_sflux0,
335     & xx_sflux1
336     #elif (defined (ALLOW_AQH_CONTROL))
337     common /controlaux_aqh_r/
338     & xx_aqh0,
339     & xx_aqh1
340     #endif
341    
342     #if (defined (ALLOW_USTRESS_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_TAUU0_CONTROL)))
343     common /controlaux_ustress_r/
344     & xx_tauu0,
345     & xx_tauu1
346     #elif (defined (ALLOW_UWIND_CONTROL))
347     common /controlaux_uwind_r/
348     & xx_uwind0,
349     & xx_uwind1
350     #endif
351    
352     #if (defined (ALLOW_VSTRESS_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_TAUV0_CONTROL)))
353     common /controlaux_vstress_r/
354     & xx_tauv0,
355     & xx_tauv1
356     #elif (defined (ALLOW_VWIND_CONTROL))
357     common /controlaux_vwind_r/
358     & xx_vwind0,
359     & xx_vwind1
360     #endif
361    
362     #ifdef ALLOW_OBCS_CONTROL
363     #if (defined (ALLOW_OBCSN_CONTROL))
364     common /controlaux_obcsn_r/
365     & xx_obcsn0,
366     & xx_obcsn1
367     #endif
368    
369     #if (defined (ALLOW_OBCSS_CONTROL))
370     common /controlaux_obcss_r/
371     & xx_obcss0,
372     & xx_obcss1
373     #endif
374     #if (defined (ALLOW_OBCSW_CONTROL))
375     common /controlaux_obcsw_r/
376     & xx_obcsw0,
377     & xx_obcsw1
378     #endif
379     #if (defined (ALLOW_OBCSE_CONTROL))
380     common /controlaux_obcse_r/
381     & xx_obcse0,
382     & xx_obcse1
383     #endif
384     #ifdef ALLOW_OBCS_CONTROL_MODES
385     common /ih_modes/ modesv
386     _RL modesv (nr,nr,nr)
387     #endif
388     #endif
389    
390     #if (defined (ALLOW_PRECIP_CONTROL))
391     common /controlaux_precip_r/
392     & xx_precip0,
393     & xx_precip1
394     #endif
395    
396     #if (defined (ALLOW_SWFLUX_CONTROL))
397     common /controlaux_swflux_r/
398     & xx_swflux0,
399     & xx_swflux1
400     #endif
401    
402     #if (defined (ALLOW_SWDOWN_CONTROL))
403     common /controlaux_swdown_r/
404     & xx_swdown0,
405     & xx_swdown1
406     #endif
407    
408     #if (defined (ALLOW_LWFLUX_CONTROL))
409     common /controlaux_lwflux_r/
410     & xx_lwflux0,
411     & xx_lwflux1
412     #endif
413    
414     #if (defined (ALLOW_LWDOWN_CONTROL))
415     common /controlaux_lwdown_r/
416     & xx_lwdown0,
417     & xx_lwdown1
418     #endif
419    
420     #if (defined (ALLOW_EVAP_CONTROL))
421     common /controlaux_evap_r/
422     & xx_evap0,
423     & xx_evap1
424     #endif
425    
426     #if (defined (ALLOW_SNOWPRECIP_CONTROL))
427     common /controlaux_snowprecip_r/
428     & xx_snowprecip0,
429     & xx_snowprecip1
430     #endif
431    
432     #if (defined (ALLOW_APRESSURE_CONTROL))
433     common /controlaux_apressure_r/
434     & xx_apressure0,
435     & xx_apressure1
436     #endif
437    
438     #if (defined (ALLOW_RUNOFF_CONTROL))
439     common /controlaux_runoff_r/
440     & xx_runoff0,
441     & xx_runoff1
442     #endif
443    
444     #if (defined (ALLOW_SST_CONTROL))
445     common /controlaux_sst_r/
446     & xx_sst0,
447     & xx_sst1
448     #endif
449     #if (defined (ALLOW_SSS_CONTROL))
450     common /controlaux_sss_r/
451     & xx_sss0,
452     & xx_sss1
453     #endif
454    
455     #if (defined (ALLOW_HFLUX_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_HFLUX0_CONTROL)))
456     _RL xx_hflux0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
457     _RL xx_hflux1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
458     #elif (defined (ALLOW_ATEMP_CONTROL))
459     _RL xx_atemp0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
460     _RL xx_atemp1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
461     #endif
462     #if (defined (ALLOW_SFLUX_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_SFLUX0_CONTROL)))
463     _RL xx_sflux0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
464     _RL xx_sflux1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
465     #elif (defined (ALLOW_AQH_CONTROL))
466     _RL xx_aqh0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
467     _RL xx_aqh1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
468     #endif
469     #if (defined (ALLOW_USTRESS_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_TAUU0_CONTROL)))
470     _RL xx_tauu0(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
471     _RL xx_tauu1(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
472     #elif (defined (ALLOW_UWIND_CONTROL))
473     _RL xx_uwind0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
474     _RL xx_uwind1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
475     #endif
476     #if (defined (ALLOW_VSTRESS_CONTROL) || (defined (ALLOW_AUTODIFF_OPENAD) && defined (ALLOW_TAUV0_CONTROL)))
477     _RL xx_tauv0(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
478     _RL xx_tauv1(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
479     #elif (defined (ALLOW_VWIND_CONTROL))
480     _RL xx_vwind0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
481     _RL xx_vwind1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
482     #endif
483     #if (defined (ALLOW_PRECIP_CONTROL))
484     _RL xx_precip0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
485     _RL xx_precip1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
486     #endif
487     #if (defined (ALLOW_SWFLUX_CONTROL))
488     _RL xx_swflux0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
489     _RL xx_swflux1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
490     #endif
491     #if (defined (ALLOW_SWDOWN_CONTROL))
492     _RL xx_swdown0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
493     _RL xx_swdown1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
494     #endif
495     #if (defined (ALLOW_LWFLUX_CONTROL))
496     _RL xx_lwflux0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
497     _RL xx_lwflux1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
498     #endif
499     #if (defined (ALLOW_LWDOWN_CONTROL))
500     _RL xx_lwdown0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
501     _RL xx_lwdown1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
502     #endif
503     #if (defined (ALLOW_EVAP_CONTROL))
504     _RL xx_evap0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
505     _RL xx_evap1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
506     #endif
507     #if (defined (ALLOW_SNOWPRECIP_CONTROL))
508     _RL xx_snowprecip0
509     & (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
510     _RL xx_snowprecip1
511     & (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
512     #endif
513     #if (defined (ALLOW_APRESSURE_CONTROL))
514     _RL xx_apressure0
515     & (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
516     _RL xx_apressure1
517     & (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
518     #endif
519     #if (defined (ALLOW_RUNOFF_CONTROL))
520     _RL xx_runoff0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
521     _RL xx_runoff1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
522     #endif
523     #if (defined (ALLOW_SST_CONTROL))
524     _RL xx_sst0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
525     _RL xx_sst1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
526     #endif
527     #if (defined (ALLOW_SSS_CONTROL))
528     _RL xx_sss0 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
529     _RL xx_sss1 (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
530     #endif
531    
532     #ifdef ALLOW_OBCSN_CONTROL
533     _RL xx_obcsn0 (1-Olx:sNx+Olx,Nr,nSx,nSy,nobcs)
534     _RL xx_obcsn1 (1-Olx:sNx+Olx,Nr,nSx,nSy,nobcs)
535     #endif
536     #ifdef ALLOW_OBCSS_CONTROL
537     _RL xx_obcss0 (1-Olx:sNx+Olx,Nr,nSx,nSy,nobcs)
538     _RL xx_obcss1 (1-Olx:sNx+Olx,Nr,nSx,nSy,nobcs)
539     #endif
540     #ifdef ALLOW_OBCSW_CONTROL
541     _RL xx_obcsw0 (1-Oly:sNy+Oly,Nr,nSx,nSy,nobcs)
542     _RL xx_obcsw1 (1-Oly:sNy+Oly,Nr,nSx,nSy,nobcs)
543     #endif
544     #ifdef ALLOW_OBCSE_CONTROL
545     _RL xx_obcse0 (1-Oly:sNy+Oly,Nr,nSx,nSy,nobcs)
546     _RL xx_obcse1 (1-Oly:sNy+Oly,Nr,nSx,nSy,nobcs)
547     #endif
548    
549    
550     c Files where the control variables are stored:
551     c =============================================
552     c
553     c xx_theta_file - control vector temperature part.
554     c xx_salt_file - control vector salinity part.
555     c xx_hflux_file - control vector surface heat flux file.
556     c xx_sflux_file - control vector surface salt flux file.
557     c xx_tauu_file - control vector zonal wind stress file.
558     c xx_tauv_file - control vector meridional wind stress file.
559     c xx_obcsn_file - control vector Uvel at boundary
560     c xx_obcss_file - control vector Vvel at boundary
561     c xx_obcsw_file - control vector temp. at boundary
562     c xx_obcse_file - control vector salin. at boundary
563     common /controlfiles_c/
564     & xx_theta_file
565     & , xx_salt_file
566     & , xx_hflux_file
567     & , xx_sflux_file
568     & , xx_tauu_file
569     & , xx_tauv_file
570     & , xx_atemp_file
571     & , xx_aqh_file
572     & , xx_precip_file
573     & , xx_swflux_file
574     & , xx_swdown_file
575     & , xx_lwflux_file
576     & , xx_lwdown_file
577     & , xx_evap_file
578     & , xx_snowprecip_file
579     & , xx_apressure_file
580     & , xx_runoff_file
581     & , xx_uwind_file
582     & , xx_vwind_file
583     & , xx_obcsn_file
584     & , xx_obcss_file
585     & , xx_obcsw_file
586     & , xx_obcse_file
587     & , xx_diffkr_file
588     & , xx_kapgm_file
589     & , xx_kapredi_file
590     & , xx_tr1_file
591     & , xx_sst_file
592     & , xx_sss_file
593     & , xx_depth_file
594     & , xx_efluxy_file
595     & , xx_efluxp_file
596     & , xx_bottomdrag_file
597     & , xx_edtaux_file
598     & , xx_edtauy_file
599     & , xx_uvel_file
600     & , xx_vvel_file
601     & , xx_etan_file
602     & , xx_relaxsst_file
603     & , xx_relaxsss_file
604     & , xx_theta_ini_fin_file
605     & , xx_salt_ini_fin_file
606     & , xx_siarea_file
607     & , xx_siheff_file
608     & , xx_sihsnow_file
609     & , xx_gen2d_file
610     & , xx_gen3d_file
611     cHFLUXM_CONTROL
612     & , xx_hfluxm_file
613     cHFLUXM_CONTROL
614    
615     character*(MAX_LEN_FNAM) xx_theta_file
616     character*(MAX_LEN_FNAM) xx_salt_file
617     character*(MAX_LEN_FNAM) xx_hflux_file
618     character*(MAX_LEN_FNAM) xx_sflux_file
619     character*(MAX_LEN_FNAM) xx_tauu_file
620     character*(MAX_LEN_FNAM) xx_tauv_file
621     character*(MAX_LEN_FNAM) xx_atemp_file
622     character*(MAX_LEN_FNAM) xx_aqh_file
623     character*(MAX_LEN_FNAM) xx_precip_file
624     character*(MAX_LEN_FNAM) xx_swflux_file
625     character*(MAX_LEN_FNAM) xx_swdown_file
626     character*(MAX_LEN_FNAM) xx_lwflux_file
627     character*(MAX_LEN_FNAM) xx_lwdown_file
628     character*(MAX_LEN_FNAM) xx_evap_file
629     character*(MAX_LEN_FNAM) xx_snowprecip_file
630     character*(MAX_LEN_FNAM) xx_apressure_file
631     character*(MAX_LEN_FNAM) xx_runoff_file
632     character*(MAX_LEN_FNAM) xx_uwind_file
633     character*(MAX_LEN_FNAM) xx_vwind_file
634     character*(MAX_LEN_FNAM) xx_obcsn_file
635     character*(MAX_LEN_FNAM) xx_obcss_file
636     character*(MAX_LEN_FNAM) xx_obcsw_file
637     character*(MAX_LEN_FNAM) xx_obcse_file
638     character*(MAX_LEN_FNAM) xx_diffkr_file
639     character*(MAX_LEN_FNAM) xx_kapgm_file
640     character*(MAX_LEN_FNAM) xx_kapredi_file
641     character*(MAX_LEN_FNAM) xx_tr1_file
642     character*(MAX_LEN_FNAM) xx_sst_file
643     character*(MAX_LEN_FNAM) xx_sss_file
644     character*(MAX_LEN_FNAM) xx_depth_file
645     character*(MAX_LEN_FNAM) xx_efluxy_file
646     character*(MAX_LEN_FNAM) xx_efluxp_file
647     character*(MAX_LEN_FNAM) xx_bottomdrag_file
648     character*(MAX_LEN_FNAM) xx_edtaux_file
649     character*(MAX_LEN_FNAM) xx_edtauy_file
650     character*(MAX_LEN_FNAM) xx_uvel_file
651     character*(MAX_LEN_FNAM) xx_vvel_file
652     character*(MAX_LEN_FNAM) xx_etan_file
653     character*(MAX_LEN_FNAM) xx_relaxsst_file
654     character*(MAX_LEN_FNAM) xx_relaxsss_file
655     character*(MAX_LEN_FNAM) xx_theta_ini_fin_file
656     character*(MAX_LEN_FNAM) xx_salt_ini_fin_file
657     character*(MAX_LEN_FNAM) xx_siarea_file
658     character*(MAX_LEN_FNAM) xx_siheff_file
659     character*(MAX_LEN_FNAM) xx_sihsnow_file
660     character*(MAX_LEN_FNAM) xx_gen2d_file
661     character*(MAX_LEN_FNAM) xx_gen3d_file
662     cHFLUXM_CONTROL
663     character*(MAX_LEN_FNAM) xx_hfluxm_file
664     cHFLUXM_CONTROL
665    
666     common /packnames_c/
667     & yadmark,
668     & ctrlname,
669     & costname,
670     & scalname,
671     & maskname,
672     & metaname,
673     & yctrlid,
674     & yctrlposunpack,
675     & yctrlpospack
676     character*2 yadmark
677     character*9 ctrlname
678     character*9 costname
679     character*9 scalname
680     character*9 maskname
681     character*9 metaname
682     character*10 yctrlid
683     character*4 yctrlposunpack
684     character*4 yctrlpospack
685    
686     c Calendar information for the control variables:
687     c ===============================================
688     c
689     c xx_${varname}period - sampling interval for the ${varname} control
690     c part in seconds
691     c special cases for ifdef ALLOW_CAL (in anology to pkg/exf):
692     c xx_${varname}period = -12. : control parameter is the seasonal cycle
693     c xx_${varname}period = 0. : control parameter is constant in time
694     c
695     c The naming convention follows mostly that of the exf-pkg. A few
696     c examples follow:
697     c xx_atempperiod - sampling interval for the atmospheric surface
698     c temperature control part.
699     c ...
700     c xx_hfluxperiod - sampling interval for the heat flux control part.
701     c xx_sfluxperiod - sampling interval for the salt flux control part.
702     c xx_tauuperiod - sampling interval for the zonal wind
703     c stress control part.
704     c xx_tauvperiod - sampling interval for the meridional wind
705     c stress control part.
706     c ...
707     c xx_obcsuperiod - sampling interval for open boundary u-velocity
708     c control part.
709     c xx_obcsvperiod - sampling interval for open boundary v-velocity
710     c control part.
711     c xx_obcstperiod - sampling interval for open boundary temperature
712     c control part.
713     c xx_obcssperiod - sampling interval for open boundary salinity
714     c control part.
715    
716     common /controltimes_r/
717     & xx_hfluxperiod
718     & , xx_sfluxperiod
719     & , xx_tauuperiod
720     & , xx_tauvperiod
721     & , xx_atempperiod
722     & , xx_aqhperiod
723     & , xx_precipperiod
724     & , xx_swfluxperiod
725     & , xx_swdownperiod
726     & , xx_lwfluxperiod
727     & , xx_lwdownperiod
728     & , xx_evapperiod
729     & , xx_snowprecipperiod
730     & , xx_apressureperiod
731     & , xx_runoffperiod
732     & , xx_uwindperiod
733     & , xx_vwindperiod
734     & , xx_sstperiod
735     & , xx_sssperiod
736     & , xx_obcsnperiod
737     & , xx_obcssperiod
738     & , xx_obcswperiod
739     & , xx_obcseperiod
740     _RL xx_hfluxperiod
741     _RL xx_sfluxperiod
742     _RL xx_tauuperiod
743     _RL xx_tauvperiod
744     _RL xx_atempperiod
745     _RL xx_aqhperiod
746     _RL xx_precipperiod
747     _RL xx_swfluxperiod
748     _RL xx_swdownperiod
749     _RL xx_lwfluxperiod
750     _RL xx_lwdownperiod
751     _RL xx_evapperiod
752     _RL xx_snowprecipperiod
753     _RL xx_apressureperiod
754     _RL xx_runoffperiod
755     _RL xx_uwindperiod
756     _RL xx_vwindperiod
757     _RL xx_sstperiod
758     _RL xx_sssperiod
759     _RL xx_obcsnperiod
760     _RL xx_obcssperiod
761     _RL xx_obcswperiod
762     _RL xx_obcseperiod
763    
764     common /ctrl_param_trend_removal/
765     & xx_hflux_remo_intercept, xx_hflux_remo_slope,
766     & xx_sflux_remo_intercept, xx_sflux_remo_slope,
767     & xx_tauu_remo_intercept, xx_tauu_remo_slope,
768     & xx_tauv_remo_intercept, xx_tauv_remo_slope,
769     & xx_atemp_remo_intercept, xx_atemp_remo_slope,
770     & xx_aqh_remo_intercept, xx_aqh_remo_slope,
771     & xx_precip_remo_intercept, xx_precip_remo_slope,
772     & xx_swflux_remo_intercept, xx_swflux_remo_slope,
773     & xx_swdown_remo_intercept, xx_swdown_remo_slope,
774     & xx_lwflux_remo_intercept, xx_lwflux_remo_slope,
775     & xx_lwdown_remo_intercept, xx_lwdown_remo_slope,
776     & xx_evap_remo_intercept, xx_evap_remo_slope,
777     & xx_snowprecip_remo_intercept,
778     & xx_snowprecip_remo_slope,
779     & xx_apressure_remo_intercept,
780     & xx_apressure_remo_slope,
781     & xx_runoff_remo_intercept, xx_runoff_remo_slope,
782     & xx_uwind_remo_intercept, xx_uwind_remo_slope,
783     & xx_vwind_remo_intercept, xx_vwind_remo_slope
784    
785     _RL xx_hflux_remo_intercept, xx_hflux_remo_slope
786     _RL xx_sflux_remo_intercept, xx_sflux_remo_slope
787     _RL xx_tauu_remo_intercept, xx_tauu_remo_slope
788     _RL xx_tauv_remo_intercept, xx_tauv_remo_slope
789     _RL xx_atemp_remo_intercept, xx_atemp_remo_slope
790     _RL xx_aqh_remo_intercept, xx_aqh_remo_slope
791     _RL xx_precip_remo_intercept, xx_precip_remo_slope
792     _RL xx_swflux_remo_intercept, xx_swflux_remo_slope
793     _RL xx_swdown_remo_intercept, xx_swdown_remo_slope
794     _RL xx_lwflux_remo_intercept, xx_lwflux_remo_slope
795     _RL xx_lwdown_remo_intercept, xx_lwdown_remo_slope
796     _RL xx_evap_remo_intercept, xx_evap_remo_slope
797     _RL xx_snowprecip_remo_intercept
798     _RL xx_snowprecip_remo_slope
799     _RL xx_apressure_remo_intercept
800     _RL xx_apressure_remo_slope
801     _RL xx_runoff_remo_intercept, xx_runoff_remo_slope
802     _RL xx_uwind_remo_intercept, xx_uwind_remo_slope
803     _RL xx_vwind_remo_intercept, xx_vwind_remo_slope
804    
805    
806     c xx_hfluxstartdate - start date for the heat flux control part.
807     c xx_sfluxstartdate - start date for the salt flux control part.
808     c xx_tauustartdate - start date for the zonal wind stress
809     c control part.
810     c xx_tauvstartdate - start date for the meridional wind stress
811     c control part.
812    
813     common /controltimes_i/
814     & xx_hfluxstartdate1
815     & , xx_hfluxstartdate2
816     & , xx_sfluxstartdate1
817     & , xx_sfluxstartdate2
818     & , xx_tauustartdate1
819     & , xx_tauustartdate2
820     & , xx_tauvstartdate1
821     & , xx_tauvstartdate2
822     & , xx_atempstartdate1
823     & , xx_atempstartdate2
824     & , xx_aqhstartdate1
825     & , xx_aqhstartdate2
826     & , xx_precipstartdate1
827     & , xx_precipstartdate2
828     & , xx_swfluxstartdate1
829     & , xx_swfluxstartdate2
830     & , xx_swdownstartdate1
831     & , xx_swdownstartdate2
832     & , xx_snowprecipstartdate1
833     & , xx_snowprecipstartdate2
834     & , xx_lwfluxstartdate1
835     & , xx_lwfluxstartdate2
836     & , xx_lwdownstartdate1
837     & , xx_lwdownstartdate2
838     & , xx_evapstartdate1
839     & , xx_evapstartdate2
840     & , xx_apressurestartdate1
841     & , xx_apressurestartdate2
842     & , xx_runoffstartdate1
843     & , xx_runoffstartdate2
844     & , xx_uwindstartdate1
845     & , xx_uwindstartdate2
846     & , xx_vwindstartdate1
847     & , xx_vwindstartdate2
848     & , xx_sststartdate1
849     & , xx_sststartdate2
850     & , xx_sssstartdate1
851     & , xx_sssstartdate2
852     & , xx_hfluxstartdate
853     & , xx_sfluxstartdate
854     & , xx_tauustartdate
855     & , xx_tauvstartdate
856     & , xx_atempstartdate
857     & , xx_aqhstartdate
858     & , xx_precipstartdate
859     & , xx_swfluxstartdate
860     & , xx_swdownstartdate
861     & , xx_uwindstartdate
862     & , xx_snowprecipstartdate
863     & , xx_lwfluxstartdate
864     & , xx_lwdownstartdate
865     & , xx_evapstartdate
866     & , xx_apressurestartdate
867     & , xx_runoffstartdate
868     & , xx_vwindstartdate
869     & , xx_sststartdate
870     & , xx_sssstartdate
871     & , xx_obcsnstartdate1
872     & , xx_obcsnstartdate2
873     & , xx_obcssstartdate1
874     & , xx_obcssstartdate2
875     & , xx_obcswstartdate1
876     & , xx_obcswstartdate2
877     & , xx_obcsestartdate1
878     & , xx_obcsestartdate2
879     & , xx_obcsnstartdate
880     & , xx_obcssstartdate
881     & , xx_obcswstartdate
882     & , xx_obcsestartdate
883     integer xx_hfluxstartdate1
884     integer xx_hfluxstartdate2
885     integer xx_sfluxstartdate1
886     integer xx_sfluxstartdate2
887     integer xx_tauustartdate1
888     integer xx_tauustartdate2
889     integer xx_tauvstartdate1
890     integer xx_tauvstartdate2
891     integer xx_atempstartdate1
892     integer xx_atempstartdate2
893     integer xx_aqhstartdate1
894     integer xx_aqhstartdate2
895     integer xx_precipstartdate1
896     integer xx_precipstartdate2
897     integer xx_swfluxstartdate1
898     integer xx_swfluxstartdate2
899     integer xx_swdownstartdate1
900     integer xx_swdownstartdate2
901     integer xx_snowprecipstartdate1
902     integer xx_snowprecipstartdate2
903     integer xx_lwfluxstartdate1
904     integer xx_lwfluxstartdate2
905     integer xx_lwdownstartdate1
906     integer xx_lwdownstartdate2
907     integer xx_evapstartdate1
908     integer xx_evapstartdate2
909     integer xx_apressurestartdate1
910     integer xx_apressurestartdate2
911     integer xx_runoffstartdate1
912     integer xx_runoffstartdate2
913     integer xx_uwindstartdate1
914     integer xx_uwindstartdate2
915     integer xx_vwindstartdate1
916     integer xx_vwindstartdate2
917     integer xx_sststartdate1
918     integer xx_sststartdate2
919     integer xx_sssstartdate1
920     integer xx_sssstartdate2
921     integer xx_obcsnstartdate1
922     integer xx_obcsnstartdate2
923     integer xx_obcssstartdate1
924     integer xx_obcssstartdate2
925     integer xx_obcswstartdate1
926     integer xx_obcswstartdate2
927     integer xx_obcsestartdate1
928     integer xx_obcsestartdate2
929    
930     integer xx_hfluxstartdate(4)
931     integer xx_sfluxstartdate(4)
932     integer xx_tauustartdate(4)
933     integer xx_tauvstartdate(4)
934     integer xx_atempstartdate(4)
935     integer xx_aqhstartdate(4)
936     integer xx_precipstartdate(4)
937     integer xx_swfluxstartdate(4)
938     integer xx_swdownstartdate(4)
939     integer xx_snowprecipstartdate(4)
940     integer xx_lwfluxstartdate(4)
941     integer xx_lwdownstartdate(4)
942     integer xx_evapstartdate(4)
943     integer xx_apressurestartdate(4)
944     integer xx_runoffstartdate(4)
945     integer xx_uwindstartdate(4)
946     integer xx_vwindstartdate(4)
947     integer xx_sststartdate(4)
948     integer xx_sssstartdate(4)
949     integer xx_obcsnstartdate(4)
950     integer xx_obcssstartdate(4)
951     integer xx_obcswstartdate(4)
952     integer xx_obcsestartdate(4)
953    
954     character*( 80) fname_theta(2)
955     character*( 80) fname_salt(2)
956     character*( 80) fname_hflux(2)
957     character*( 80) fname_sflux(2)
958     character*( 80) fname_tauu(2)
959     character*( 80) fname_tauv(2)
960     character*( 80) fname_atemp(2)
961     character*( 80) fname_aqh(2)
962     character*( 80) fname_precip(2)
963     character*( 80) fname_swflux(2)
964     character*( 80) fname_swdown(2)
965     character*( 80) fname_snowprecip(2)
966     character*( 80) fname_lwflux(2)
967     character*( 80) fname_lwdown(2)
968     character*( 80) fname_evap(2)
969     character*( 80) fname_apressure(2)
970     character*( 80) fname_runoff(2)
971     character*( 80) fname_uwind(2)
972     character*( 80) fname_vwind(2)
973     character*( 80) fname_obcsn(2)
974     character*( 80) fname_obcss(2)
975     character*( 80) fname_obcsw(2)
976     character*( 80) fname_obcse(2)
977     character*( 80) fname_diffkr(2)
978     character*( 80) fname_kapgm(2)
979     character*( 80) fname_kapredi(2)
980     character*( 80) fname_tr1(2)
981     character*( 80) fname_sst(2)
982     character*( 80) fname_sss(2)
983     character*( 80) fname_depth(2)
984     character*( 80) fname_hfacc(2)
985     character*( 80) fname_efluxy(2)
986     character*( 80) fname_efluxp(2)
987     character*( 80) fname_bottomdrag(2)
988     character*( 80) fname_edtaux(2)
989     character*( 80) fname_edtauy(2)
990     character*( 80) fname_uvel(2)
991     character*( 80) fname_vvel(2)
992     character*( 80) fname_etan(2)
993     character*( 80) fname_relaxsst(2)
994     character*( 80) fname_relaxsss(2)
995     character*( 80) fname_siarea(2)
996     character*( 80) fname_siheff(2)
997     character*( 80) fname_sihsnow(2)
998     character*( 80) fname_gen2d(2)
999     character*( 80) fname_gen3d(2)
1000     cHFLUXM_CONTROL
1001     character*( 80) fname_hfluxm(2)
1002     cHFLUXM_CONTROL
1003    
1004     #ifdef ALLOW_ADMTLM
1005     integer maxm, maxn
1006     parameter ( maxm = Nx*Ny*(4*Nr+1), maxn=Nx*Ny*(4*Nr+1) )
1007    
1008     common /admtlm_i/ nveccount
1009     integer nveccount
1010    
1011     common /admtlm_r/ phtmpadmtlm
1012     double precision phtmpadmtlm(maxn)
1013     #endif
1014    
1015    
1016     c ==================================================================
1017     c END OF HEADER CONTROLVARS
1018     c ==================================================================
1019    
1020    

  ViewVC Help
Powered by ViewVC 1.1.22