/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/ctrl_pack.F
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/ctrl_pack.F

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


Revision 1.3 - (hide annotations) (download)
Thu Dec 19 16:10:21 2013 UTC (12 years, 10 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
stale

1 utke 1.3 C $Header: /u/gcmpack/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/ctrl_pack.F,v 1.2 2007/05/10 05:04:47 utke Exp $
2 utke 1.1 C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CTRL_CPPOPTIONS.h"
6    
7     subroutine ctrl_pack( first, mythid )
8    
9     c ==================================================================
10     c SUBROUTINE ctrl_pack
11     c ==================================================================
12     c
13     c o Compress the control vector such that only ocean points are
14     c written to file.
15     c
16     c started: Christian Eckert eckert@mit.edu 10-Mar=2000
17     c
18     c changed: Patrick Heimbach heimbach@mit.edu 06-Jun-2000
19     c - Transferred some filename declarations
20     c from here to namelist in ctrl_init
21     c
22     c Patrick Heimbach heimbach@mit.edu 16-Jun-2000
23     c - single file name convention with or without
24     c ALLOW_ECCO_OPTIMIZATION
25     c
26     c G. Gebbie, added open boundary control packing,
27     c gebbie@mit.edu 18 -Mar- 2003
28     c
29     c heimbach@mit.edu totally restructured 28-Oct-2003
30     c
31     c ==================================================================
32     c SUBROUTINE ctrl_pack
33     c ==================================================================
34    
35     implicit none
36    
37     c == global variables ==
38    
39     #include "EEPARAMS.h"
40     #include "SIZE.h"
41     #include "PARAMS.h"
42     #include "GRID.h"
43    
44     #include "ctrl.h"
45     #include "optim.h"
46    
47     #ifdef ALLOW_COST
48     # include "cost.h"
49     #endif
50     #ifdef ALLOW_ECCO
51     # include "ecco_cost.h"
52     #else
53     # include "ctrl_weights.h"
54     #endif
55    
56     c == routine arguments ==
57    
58     logical first
59     integer mythid
60    
61     #ifndef EXCLUDE_CTRL_PACK
62     c == local variables ==
63    
64     _RL fcloc
65    
66     integer i, j, k
67     integer ii
68     integer il
69     integer irec
70     integer ig,jg
71     integer ivartype
72     integer iobcs
73    
74     logical doglobalread
75     logical ladinit
76     integer cbuffindex
77     logical lxxadxx
78    
79     integer cunit
80     integer ictrlgrad
81    
82     character*(128) cfile
83     character*( 80) weighttype
84    
85     c == external ==
86    
87     integer ilnblnk
88     external ilnblnk
89    
90     c == end of interface ==
91    
92     #ifndef ALLOW_ECCO_OPTIMIZATION
93     fmin = 0. _d 0
94     #endif
95    
96     c-- Tiled files are used.
97     doglobalread = .false.
98    
99     c-- Initialise adjoint variables on active files.
100     ladinit = .false.
101    
102     c-- Initialise global buffer index
103     nbuffglobal = 0
104    
105     c-- Assign file names.
106    
107     call ctrl_set_fname(xx_theta_file, fname_theta, mythid)
108     call ctrl_set_fname(xx_salt_file, fname_salt, mythid)
109     call ctrl_set_fname(xx_hflux_file, fname_hflux, mythid)
110     call ctrl_set_fname(xx_sflux_file, fname_sflux, mythid)
111     call ctrl_set_fname(xx_tauu_file, fname_tauu, mythid)
112     call ctrl_set_fname(xx_tauv_file, fname_tauv, mythid)
113     call ctrl_set_fname(xx_atemp_file, fname_atemp, mythid)
114     call ctrl_set_fname(xx_aqh_file, fname_aqh, mythid)
115     call ctrl_set_fname(xx_precip_file, fname_precip, mythid)
116     call ctrl_set_fname(xx_swflux_file, fname_swflux, mythid)
117     call ctrl_set_fname(xx_swdown_file, fname_swdown, mythid)
118 utke 1.2 call ctrl_set_fname(xx_lwflux_file, fname_lwflux, mythid)
119     call ctrl_set_fname(xx_lwdown_file, fname_lwdown, mythid)
120     call ctrl_set_fname(xx_evap_file, fname_evap, mythid)
121     call ctrl_set_fname(xx_snowprecip_file, fname_snowprecip, mythid)
122     call ctrl_set_fname(xx_apressure_file, fname_apressure, mythid)
123     call ctrl_set_fname(xx_runoff_file, fname_runoff, mythid)
124    
125 utke 1.1 call ctrl_set_fname(xx_uwind_file, fname_uwind, mythid)
126     call ctrl_set_fname(xx_vwind_file, fname_vwind, mythid)
127     call ctrl_set_fname(xx_obcsn_file, fname_obcsn, mythid)
128     call ctrl_set_fname(xx_obcss_file, fname_obcss, mythid)
129     call ctrl_set_fname(xx_obcsw_file, fname_obcsw, mythid)
130     call ctrl_set_fname(xx_obcse_file, fname_obcse, mythid)
131     call ctrl_set_fname(xx_diffkr_file, fname_diffkr, mythid)
132     call ctrl_set_fname(xx_kapgm_file, fname_kapgm, mythid)
133     call ctrl_set_fname(xx_tr1_file, fname_tr1, mythid)
134     call ctrl_set_fname(xx_sst_file, fname_sst, mythid)
135     call ctrl_set_fname(xx_sss_file, fname_sss, mythid)
136 utke 1.2 call ctrl_set_fname(xx_depth_file, fname_depth, mythid)
137 utke 1.1 call ctrl_set_fname(xx_hfacc_file, fname_hfacc, mythid)
138     call ctrl_set_fname(xx_efluxy_file, fname_efluxy, mythid)
139     call ctrl_set_fname(xx_efluxp_file, fname_efluxp, mythid)
140     call ctrl_set_fname(xx_bottomdrag_file, fname_bottomdrag, mythid)
141     call ctrl_set_fname(xx_edtaux_file, fname_edtaux, mythid)
142     call ctrl_set_fname(xx_edtauy_file, fname_edtauy, mythid)
143     call ctrl_set_fname(xx_uvel_file, fname_uvel, mythid)
144     call ctrl_set_fname(xx_vvel_file, fname_vvel, mythid)
145     call ctrl_set_fname(xx_etan_file, fname_etan, mythid)
146     call ctrl_set_fname(xx_relaxsst_file, fname_relaxsst, mythid)
147     call ctrl_set_fname(xx_relaxsss_file, fname_relaxsss, mythid)
148    
149     c-- Only the master thread will do I/O.
150     _BEGIN_MASTER( mythid )
151    
152     if ( first ) then
153     c >>> Initialise control vector for optimcycle=0 <<<
154     lxxadxx = .TRUE.
155     ictrlgrad = 1
156     fcloc = fmin
157     write(cfile(1:128),'(4a,i4.4)')
158     & ctrlname(1:9),'_',yctrlid(1:10),
159     & yctrlpospack, optimcycle
160     print *, 'ph-pack: packing ', ctrlname(1:9)
161     else
162     c >>> Write gradient vector <<<
163     lxxadxx = .FALSE.
164     ictrlgrad = 2
165     fcloc = fc%v
166     write(cfile(1:128),'(4a,i4.4)')
167     & costname(1:9),'_',yctrlid(1:10),
168     & yctrlpospack, optimcycle
169     print *, 'ph-pack: packing ', costname(1:9)
170     endif
171    
172     call mdsfindunit( cunit, mythid )
173     open( cunit, file = cfile,
174     & status = 'unknown',
175     & form = 'unformatted',
176     & access = 'sequential' )
177    
178     c-- Header information.
179     write(cunit) nvartype
180     write(cunit) nvarlength
181     write(cunit) yctrlid
182     write(cunit) optimCycle
183     write(cunit) fc
184     C place holder of obsolete variable iG
185     write(cunit) 1
186     C place holder of obsolete variable jG
187     write(cunit) 1
188     write(cunit) nsx
189     write(cunit) nsy
190     write(cunit) (nWetcGlobal(k), k=1,nr)
191     write(cunit) (nWetsGlobal(k), k=1,nr)
192     write(cunit) (nWetwGlobal(k), k=1,nr)
193     #ifdef ALLOW_CTRL_WETV
194     write(cunit) (nWetvGlobal(k), k=1,nr)
195     #endif
196    
197     #ifdef ALLOW_OBCSN_CONTROL
198     write(cunit) ((nWetobcsnGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
199     #endif
200     #ifdef ALLOW_OBCSS_CONTROL
201     write(cunit) ((nWetobcssGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
202     #endif
203     #ifdef ALLOW_OBCSW_CONTROL
204     write(cunit) ((nWetobcswGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
205     #endif
206     #ifdef ALLOW_OBCSE_CONTROL
207     write(cunit) ((nWetobcseGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
208     #endif
209     write(cunit) (ncvarindex(i), i=1,maxcvars)
210     write(cunit) (ncvarrecs(i), i=1,maxcvars)
211     write(cunit) (ncvarxmax(i), i=1,maxcvars)
212     write(cunit) (ncvarymax(i), i=1,maxcvars)
213     write(cunit) (ncvarnrmax(i), i=1,maxcvars)
214     write(cunit) (ncvargrd(i), i=1,maxcvars)
215     write(cunit)
216    
217     #ifdef ALLOW_THETA0_CONTROL
218     ivartype = 1
219     write(weighttype(1:80),'(80a)') ' '
220 utke 1.2 write(weighttype(1:80),'(a)') "wthetaLev"
221 utke 1.1 call ctrl_set_pack_xyz(
222     & cunit, ivartype, fname_theta(ictrlgrad), "maskCtrlC",
223     & weighttype, wtheta, lxxadxx, mythid)
224     #endif
225    
226     #ifdef ALLOW_SALT0_CONTROL
227     ivartype = 2
228     write(weighttype(1:80),'(80a)') ' '
229 utke 1.2 write(weighttype(1:80),'(a)') "wsaltLev"
230 utke 1.1 call ctrl_set_pack_xyz(
231     & cunit, ivartype, fname_salt(ictrlgrad), "maskCtrlC",
232     & weighttype, wsalt, lxxadxx, mythid)
233     #endif
234    
235     #if (defined (ALLOW_HFLUX_CONTROL) || defined (ALLOW_HFLUX0_CONTROL))
236     ivartype = 3
237     write(weighttype(1:80),'(80a)') ' '
238     write(weighttype(1:80),'(a)') "whflux"
239     call ctrl_set_pack_xy(
240     & cunit, ivartype, fname_hflux(ictrlgrad), "maskCtrlC",
241     & weighttype, lxxadxx, mythid)
242     #endif
243    
244     #if (defined (ALLOW_SFLUX_CONTROL) || defined (ALLOW_SFLUX0_CONTROL))
245     ivartype = 4
246     write(weighttype(1:80),'(80a)') ' '
247     write(weighttype(1:80),'(a)') "wsflux"
248     call ctrl_set_pack_xy(
249     & cunit, ivartype, fname_sflux(ictrlgrad), "maskCtrlC",
250     & weighttype, lxxadxx, mythid)
251     #endif
252    
253     #if (defined (ALLOW_USTRESS_CONTROL) || defined (ALLOW_TAUU0_CONTROL))
254     ivartype = 5
255     write(weighttype(1:80),'(80a)') ' '
256     write(weighttype(1:80),'(a)') "wtauu"
257     call ctrl_set_pack_xy(
258     & cunit, ivartype, fname_tauu(ictrlgrad), "maskCtrlW",
259     & weighttype, lxxadxx, mythid)
260     #endif
261    
262     #if (defined (ALLOW_VSTRESS_CONTROL) || defined (ALLOW_TAUV0_CONTROL))
263     ivartype = 6
264     write(weighttype(1:80),'(80a)') ' '
265     write(weighttype(1:80),'(a)') "wtauv"
266     call ctrl_set_pack_xy(
267     & cunit, ivartype, fname_tauv(ictrlgrad), "maskCtrlS",
268     & weighttype, lxxadxx, mythid)
269     #endif
270    
271     #ifdef ALLOW_ATEMP_CONTROL
272     ivartype = 7
273     write(weighttype(1:80),'(80a)') ' '
274     write(weighttype(1:80),'(a)') "watemp"
275     call ctrl_set_pack_xy(
276     & cunit, ivartype, fname_atemp(ictrlgrad), "maskCtrlC",
277     & weighttype, lxxadxx, mythid)
278     #endif
279    
280     #ifdef ALLOW_AQH_CONTROL
281     ivartype = 8
282     write(weighttype(1:80),'(80a)') ' '
283     write(weighttype(1:80),'(a)') "waqh"
284     call ctrl_set_pack_xy(
285     & cunit, ivartype, fname_aqh(ictrlgrad), "maskCtrlC",
286     & weighttype, lxxadxx, mythid)
287     #endif
288    
289     #ifdef ALLOW_UWIND_CONTROL
290     ivartype = 9
291     write(weighttype(1:80),'(80a)') ' '
292     write(weighttype(1:80),'(a)') "wuwind"
293     call ctrl_set_pack_xy(
294     & cunit, ivartype, fname_uwind(ictrlgrad), "maskCtrlC",
295     & weighttype, lxxadxx, mythid)
296     #endif
297    
298     #ifdef ALLOW_VWIND_CONTROL
299     ivartype = 10
300     write(weighttype(1:80),'(80a)') ' '
301     write(weighttype(1:80),'(a)') "wvwind"
302     call ctrl_set_pack_xy(
303     & cunit, ivartype, fname_vwind(ictrlgrad), "maskCtrlC",
304     & weighttype, lxxadxx, mythid)
305     #endif
306    
307     #ifdef ALLOW_OBCSN_CONTROL
308     ivartype = 11
309     write(weighttype(1:80),'(80a)') ' '
310     write(weighttype(1:80),'(a)') "wobcsn"
311     call ctrl_set_pack_xz(
312     & cunit, ivartype, fname_obcsn(ictrlgrad), "maskobcsn",
313     & weighttype, wobcsn, lxxadxx, mythid)
314     #endif
315    
316     #ifdef ALLOW_OBCSS_CONTROL
317     ivartype = 12
318     write(weighttype(1:80),'(80a)') ' '
319     write(weighttype(1:80),'(a)') "wobcss"
320     call ctrl_set_pack_xz(
321     & cunit, ivartype, fname_obcss(ictrlgrad), "maskobcss",
322     & weighttype, wobcss, lxxadxx, mythid)
323     #endif
324    
325     #ifdef ALLOW_OBCSW_CONTROL
326     ivartype = 13
327     write(weighttype(1:80),'(80a)') ' '
328     write(weighttype(1:80),'(a)') "wobcsw"
329     call ctrl_set_pack_yz(
330     & cunit, ivartype, fname_obcsw(ictrlgrad), "maskobcsw",
331     & weighttype, wobcsw, lxxadxx, mythid)
332     #endif
333    
334     #ifdef ALLOW_OBCSE_CONTROL
335     ivartype = 14
336     write(weighttype(1:80),'(80a)') ' '
337     write(weighttype(1:80),'(a)') "wobcse"
338     call ctrl_set_pack_yz(
339     & cunit, ivartype, fname_obcse(ictrlgrad), "maskobcse",
340     & weighttype, wobcse, lxxadxx, mythid)
341     #endif
342    
343     #ifdef ALLOW_DIFFKR_CONTROL
344     ivartype = 15
345     write(weighttype(1:80),'(80a)') ' '
346     write(weighttype(1:80),'(a)') "wdiffkr"
347     call ctrl_set_pack_xyz(
348     & cunit, ivartype, fname_diffkr(ictrlgrad), "maskCtrlC",
349 utke 1.2 & weighttype, wdiffkr, lxxadxx, mythid)
350 utke 1.1 #endif
351    
352     #ifdef ALLOW_KAPGM_CONTROL
353     ivartype = 16
354     write(weighttype(1:80),'(80a)') ' '
355     write(weighttype(1:80),'(a)') "wkapgm"
356     call ctrl_set_pack_xyz(
357     & cunit, ivartype, fname_kapgm(ictrlgrad), "maskCtrlC",
358 utke 1.2 & weighttype, wkapgm, lxxadxx, mythid)
359 utke 1.1 #endif
360    
361     #ifdef ALLOW_TR10_CONTROL
362     ivartype = 17
363     write(weighttype(1:80),'(80a)') ' '
364     write(weighttype(1:80),'(a)') "wtr1"
365     call ctrl_set_pack_xyz(
366     & cunit, ivartype, fname_tr1(ictrlgrad), "maskCtrlC",
367     & weighttype, wunit, lxxadxx, mythid)
368     #endif
369    
370     #if (defined (ALLOW_SST_CONTROL) || defined (ALLOW_SST0_CONTROL))
371     ivartype = 18
372     write(weighttype(1:80),'(80a)') ' '
373     write(weighttype(1:80),'(a)') "wsst"
374     call ctrl_set_pack_xy(
375     & cunit, ivartype, fname_sst(ictrlgrad), "maskCtrlC",
376     & weighttype, lxxadxx, mythid)
377     #endif
378    
379     #if (defined (ALLOW_SSS_CONTROL) || defined (ALLOW_SSS0_CONTROL))
380     ivartype = 19
381     write(weighttype(1:80),'(80a)') ' '
382     write(weighttype(1:80),'(a)') "wsss"
383     call ctrl_set_pack_xy(
384 utke 1.2 & cunit, ivartype, fname_sss(ictrlgrad),
385     & "maskCtrlC", weighttype, lxxadxx, mythid)
386 utke 1.1 #endif
387    
388 utke 1.2 #ifdef ALLOW_DEPTH_CONTROL
389     ivartype = 20
390     write(weighttype(1:80),'(80a)') ' '
391     write(weighttype(1:80),'(a)') "wdepth"
392     call ctrl_set_pack_xy(
393     & cunit, ivartype, fname_depth(ictrlgrad),
394     & "maskCtrlC", weighttype, lxxadxx, mythid)
395     #endif /* ALLOW_DEPTH_CONTROL */
396    
397 utke 1.1 #ifdef ALLOW_HFACC_CONTROL
398     ivartype = 20
399     write(weighttype(1:80),'(80a)') ' '
400     write(weighttype(1:80),'(a)') "whfacc"
401     # ifdef ALLOW_HFACC3D_CONTROL
402     call ctrl_set_pack_xyz(
403     & cunit, ivartype, fname_hfacc(ictrlgrad), "maskCtrlC",
404     & weighttype, wunit, lxxadxx, mythid)
405     # else
406     call ctrl_set_pack_xy(
407     & cunit, ivartype, fname_hfacc(ictrlgrad), "maskCtrlC",
408     & weighttype, lxxadxx, mythid)
409     # endif
410     #endif
411    
412     #ifdef ALLOW_EFLUXY0_CONTROL
413     ivartype = 21
414     write(weighttype(1:80),'(80a)') ' '
415     write(weighttype(1:80),'(a)') "wefluxy0"
416     call ctrl_set_pack_xyz(
417     & cunit, ivartype, fname_efluxy(ictrlgrad), "maskCtrlS",
418     & weighttype, wunit, lxxadxx, mythid)
419     #endif
420    
421     #ifdef ALLOW_EFLUXP0_CONTROL
422     ivartype = 22
423     write(weighttype(1:80),'(80a)') ' '
424     write(weighttype(1:80),'(a)') "wefluxp0"
425     call ctrl_set_pack_xyz(
426     & cunit, ivartype, fname_efluxp(ictrlgrad), "maskhFacV",
427     & weighttype, wunit, lxxadxx, mythid)
428     #endif
429    
430     #ifdef ALLOW_BOTTOMDRAG_CONTROL
431     ivartype = 23
432     write(weighttype(1:80),'(80a)') ' '
433     write(weighttype(1:80),'(a)') "wbottomdrag"
434     call ctrl_set_pack_xy(
435     & cunit, ivartype, fname_bottomdrag(ictrlgrad), "maskCtrlC",
436     & weighttype, lxxadxx, mythid)
437     #endif
438    
439     #ifdef ALLOW_EDTAUX_CONTROL
440     ivartype = 25
441     write(weighttype(1:80),'(80a)') ' '
442     write(weighttype(1:80),'(a)') "wedtaux"
443     call ctrl_set_pack_xyz(
444     & cunit, ivartype, fname_edtaux(ictrlgrad), "maskCtrlW",
445 utke 1.2 & weighttype, wedtaux, lxxadxx, mythid)
446 utke 1.1 #endif
447    
448     #ifdef ALLOW_EDTAUY_CONTROL
449     ivartype = 26
450     write(weighttype(1:80),'(80a)') ' '
451     write(weighttype(1:80),'(a)') "wedtauy"
452     call ctrl_set_pack_xyz(
453     & cunit, ivartype, fname_edtauy(ictrlgrad), "maskCtrlS",
454 utke 1.2 & weighttype, wedtauy, lxxadxx, mythid)
455 utke 1.1 #endif
456    
457     #ifdef ALLOW_UVEL0_CONTROL
458     ivartype = 27
459     write(weighttype(1:80),'(80a)') ' '
460     write(weighttype(1:80),'(a)') "wuvel"
461     call ctrl_set_pack_xyz(
462     & cunit, ivartype, fname_uvel(ictrlgrad), "maskCtrlW",
463     & weighttype, wunit, lxxadxx, mythid)
464     #endif
465    
466     #ifdef ALLOW_VVEL0_CONTROL
467     ivartype = 28
468     write(weighttype(1:80),'(80a)') ' '
469     write(weighttype(1:80),'(a)') "wvvel"
470     call ctrl_set_pack_xyz(
471     & cunit, ivartype, fname_vvel(ictrlgrad), "maskCtrlS",
472     & weighttype, wunit, lxxadxx, mythid)
473     #endif
474    
475     #ifdef ALLOW_ETAN0_CONTROL
476     ivartype = 29
477     write(weighttype(1:80),'(80a)') ' '
478     write(weighttype(1:80),'(a)') "wetan"
479     call ctrl_set_pack_xy(
480 utke 1.2 & cunit, ivartype, fname_etan(ictrlgrad),
481     & "maskCtrlC", weighttype, lxxadxx, mythid)
482 utke 1.1 #endif
483    
484     #ifdef ALLOW_RELAXSST_CONTROL
485     ivartype = 30
486     write(weighttype(1:80),'(80a)') ' '
487     write(weighttype(1:80),'(a)') "wrelaxsst"
488     call ctrl_set_pack_xy(
489 utke 1.2 & cunit, ivartype, fname_relaxsst(ictrlgrad),
490     & "maskCtrlC", weighttype, lxxadxx, mythid)
491 utke 1.1 #endif
492    
493     #ifdef ALLOW_RELAXSSS_CONTROL
494     ivartype = 31
495     write(weighttype(1:80),'(80a)') ' '
496     write(weighttype(1:80),'(a)') "wrelaxsss"
497     call ctrl_set_pack_xy(
498 utke 1.2 & cunit, ivartype, fname_relaxsss(ictrlgrad),
499     & "maskCtrlC", weighttype, lxxadxx, mythid)
500 utke 1.1 #endif
501    
502     #ifdef ALLOW_PRECIP_CONTROL
503     ivartype = 32
504     write(weighttype(1:80),'(80a)') ' '
505     write(weighttype(1:80),'(a)') "wprecip"
506     call ctrl_set_pack_xy(
507 utke 1.2 & cunit, ivartype, fname_precip(ictrlgrad),
508     & "maskCtrlC", weighttype, lxxadxx, mythid)
509 utke 1.1 #endif
510    
511     #ifdef ALLOW_SWFLUX_CONTROL
512     ivartype = 33
513     write(weighttype(1:80),'(80a)') ' '
514     write(weighttype(1:80),'(a)') "wswflux"
515     call ctrl_set_pack_xy(
516 utke 1.2 & cunit, ivartype, fname_swflux(ictrlgrad),
517     & "maskCtrlC", weighttype, lxxadxx, mythid)
518 utke 1.1 #endif
519    
520     #ifdef ALLOW_SWDOWN_CONTROL
521     ivartype = 34
522     write(weighttype(1:80),'(80a)') ' '
523     write(weighttype(1:80),'(a)') "wswdown"
524     call ctrl_set_pack_xy(
525 utke 1.2 & cunit, ivartype, fname_swdown(ictrlgrad),
526     & "maskCtrlC", weighttype, lxxadxx, mythid)
527     #endif
528    
529     #ifdef ALLOW_LWFLUX_CONTROL
530     ivartype = 35
531     write(weighttype(1:80),'(80a)') ' '
532     write(weighttype(1:80),'(a)') "wlwflux"
533     call ctrl_set_pack_xy(
534     & cunit, ivartype, fname_lwflux(ictrlgrad),
535     & "maskCtrlC", weighttype, lxxadxx, mythid)
536     #endif
537    
538     #ifdef ALLOW_LWDOWN_CONTROL
539     ivartype = 36
540     write(weighttype(1:80),'(80a)') ' '
541     write(weighttype(1:80),'(a)') "wlwdown"
542     call ctrl_set_pack_xy(
543     & cunit, ivartype, fname_lwdown(ictrlgrad),
544     & "maskCtrlC", weighttype, lxxadxx, mythid)
545     #endif
546    
547     #ifdef ALLOW_EVAP_CONTROL
548     ivartype = 37
549     write(weighttype(1:80),'(80a)') ' '
550     write(weighttype(1:80),'(a)') "wevap"
551     call ctrl_set_pack_xy(
552     & cunit, ivartype, fname_evap(ictrlgrad),
553     & "maskCtrlC", weighttype, lxxadxx, mythid)
554     #endif
555    
556     #ifdef ALLOW_SNOWPRECIP_CONTROL
557     ivartype = 38
558     write(weighttype(1:80),'(80a)') ' '
559     write(weighttype(1:80),'(a)') "wsnowprecip"
560     call ctrl_set_pack_xy(
561     & cunit, ivartype, fname_snowprecip(ictrlgrad),
562     & "maskCtrlC", weighttype, lxxadxx, mythid)
563     #endif
564    
565     #ifdef ALLOW_APRESSURE_CONTROL
566     ivartype = 39
567     write(weighttype(1:80),'(80a)') ' '
568     write(weighttype(1:80),'(a)') "wapressure"
569     call ctrl_set_pack_xy(
570     & cunit, ivartype, fname_apressure(ictrlgrad),
571     & "maskCtrlC", weighttype, lxxadxx, mythid)
572     #endif
573    
574     #ifdef ALLOW_RUNOFF_CONTROL
575     ivartype = 40
576     write(weighttype(1:80),'(80a)') ' '
577     write(weighttype(1:80),'(a)') "wrunoff"
578     call ctrl_set_pack_xy(
579     & cunit, ivartype, fname_runoff(ictrlgrad),
580     & "maskCtrlC", weighttype, lxxadxx, mythid)
581 utke 1.1 #endif
582    
583     close ( cunit )
584    
585     _END_MASTER( mythid )
586    
587     #endif /* EXCLUDE_CTRL_PACK */
588    
589     return
590     end
591    

  ViewVC Help
Powered by ViewVC 1.1.22