1 |
C $Header: /u/gcmpack/MITgcm/pkg/admtlm/admtlm_dsvd2model.F,v 1.8 2012/08/10 19:33:04 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ADMTLM_OPTIONS.h" |
5 |
#ifdef ALLOW_CTRL |
6 |
# include "CTRL_OPTIONS.h" |
7 |
#endif |
8 |
|
9 |
subroutine admtlm_dsvd2model( |
10 |
& first, postprocev, mythid ) |
11 |
|
12 |
c ================================================================== |
13 |
c SUBROUTINE ctrl_unpack |
14 |
c ================================================================== |
15 |
c |
16 |
c o Unpack the control vector such that the land points are filled |
17 |
c in. |
18 |
c |
19 |
c started: Christian Eckert eckert@mit.edu 10-Mar-2000 |
20 |
c |
21 |
c changed: Patrick Heimbach heimbach@mit.edu 06-Jun-2000 |
22 |
c - Transferred some filename declarations |
23 |
c from here to namelist in ctrl_init |
24 |
c |
25 |
c Patrick Heimbach heimbach@mit.edu 16-Jun-2000 |
26 |
c - single file name convention with or without |
27 |
c ALLOW_ECCO_OPTIMIZATION |
28 |
C |
29 |
c Armin Koehl akoehl@ucsd.edu 05-Dec-2000 |
30 |
c - single processor reads global parameter file |
31 |
c and writes multiple xx* and adxx* files |
32 |
c |
33 |
c G Gebbie gebbie@mit.edu 18-Mar-2003 |
34 |
c - open boundary packing |
35 |
c |
36 |
c heimbach@mit.edu totally restructured 28-Oct-2003 |
37 |
c |
38 |
c ================================================================== |
39 |
c SUBROUTINE ctrl_unpack |
40 |
c ================================================================== |
41 |
|
42 |
implicit none |
43 |
|
44 |
c == global variables == |
45 |
|
46 |
#include "EEPARAMS.h" |
47 |
#include "SIZE.h" |
48 |
#include "PARAMS.h" |
49 |
#include "GRID.h" |
50 |
|
51 |
#include "ctrl.h" |
52 |
#include "optim.h" |
53 |
|
54 |
#ifdef ALLOW_COST |
55 |
# include "cost.h" |
56 |
#endif |
57 |
#ifdef ALLOW_ECCO |
58 |
# include "ecco_cost.h" |
59 |
#else |
60 |
# include "ctrl_weights.h" |
61 |
#endif |
62 |
|
63 |
c == routine arguments == |
64 |
|
65 |
logical first |
66 |
logical postprocev |
67 |
integer mythid |
68 |
|
69 |
#ifndef EXCLUDE_CTRL_PACK |
70 |
c == local variables == |
71 |
|
72 |
integer i, j, k |
73 |
integer ii |
74 |
integer il |
75 |
integer irec |
76 |
integer ivartype |
77 |
integer ictrlgrad |
78 |
|
79 |
integer cbuffindex |
80 |
integer cunit |
81 |
|
82 |
character*(128) cfile |
83 |
character*( 80) weighttype |
84 |
|
85 |
logical lxxadxx |
86 |
|
87 |
cgg( Add OBCS mask names. |
88 |
#ifdef ALLOW_OBCSN_CONTROL |
89 |
integer filenWetobcsnGlo(nr,nobcs) |
90 |
#endif |
91 |
#ifdef ALLOW_OBCSS_CONTROL |
92 |
integer filenWetobcssGlo(nr,nobcs) |
93 |
#endif |
94 |
#ifdef ALLOW_OBCSW_CONTROL |
95 |
integer filenWetobcswGlo(nr,nobcs) |
96 |
#endif |
97 |
#ifdef ALLOW_OBCSE_CONTROL |
98 |
integer filenWetobcseGlo(nr,nobcs) |
99 |
#endif |
100 |
integer iobcs |
101 |
cgg) |
102 |
|
103 |
c == external == |
104 |
|
105 |
integer ilnblnk |
106 |
external ilnblnk |
107 |
|
108 |
c == end of interface == |
109 |
|
110 |
#ifndef ALLOW_ECCO_OPTIMIZATION |
111 |
fmin = 0. _d 0 |
112 |
#endif |
113 |
|
114 |
c-- Initialise |
115 |
nbuffGlobal = 0 |
116 |
|
117 |
cph-new( |
118 |
if ( postprocev ) then |
119 |
yadprefix = 'ev' |
120 |
else |
121 |
yadprefix = 'g_' |
122 |
endif |
123 |
nveccount = 0 |
124 |
cph-new) |
125 |
|
126 |
c-- Assign file names. |
127 |
|
128 |
call ctrl_set_fname(xx_theta_file, fname_theta, mythid) |
129 |
call ctrl_set_fname(xx_salt_file, fname_salt, mythid) |
130 |
call ctrl_set_fname(xx_hflux_file, fname_hflux, mythid) |
131 |
call ctrl_set_fname(xx_sflux_file, fname_sflux, mythid) |
132 |
call ctrl_set_fname(xx_tauu_file, fname_tauu, mythid) |
133 |
call ctrl_set_fname(xx_tauv_file, fname_tauv, mythid) |
134 |
call ctrl_set_fname(xx_atemp_file, fname_atemp, mythid) |
135 |
call ctrl_set_fname(xx_aqh_file, fname_aqh, mythid) |
136 |
call ctrl_set_fname(xx_precip_file, fname_precip, mythid) |
137 |
call ctrl_set_fname(xx_swflux_file, fname_swflux, mythid) |
138 |
call ctrl_set_fname(xx_swdown_file, fname_swdown, mythid) |
139 |
call ctrl_set_fname(xx_uwind_file, fname_uwind, mythid) |
140 |
call ctrl_set_fname(xx_vwind_file, fname_vwind, mythid) |
141 |
call ctrl_set_fname(xx_obcsn_file, fname_obcsn, mythid) |
142 |
call ctrl_set_fname(xx_obcss_file, fname_obcss, mythid) |
143 |
call ctrl_set_fname(xx_obcsw_file, fname_obcsw, mythid) |
144 |
call ctrl_set_fname(xx_obcse_file, fname_obcse, mythid) |
145 |
call ctrl_set_fname(xx_diffkr_file, fname_diffkr, mythid) |
146 |
call ctrl_set_fname(xx_kapgm_file, fname_kapgm, mythid) |
147 |
call ctrl_set_fname(xx_tr1_file, fname_tr1, mythid) |
148 |
call ctrl_set_fname(xx_sst_file, fname_sst, mythid) |
149 |
call ctrl_set_fname(xx_sss_file, fname_sss, mythid) |
150 |
call ctrl_set_fname(xx_depth_file, fname_depth, mythid) |
151 |
call ctrl_set_fname(xx_efluxy_file, fname_efluxy, mythid) |
152 |
call ctrl_set_fname(xx_efluxp_file, fname_efluxp, mythid) |
153 |
call ctrl_set_fname(xx_bottomdrag_file, fname_bottomdrag, mythid) |
154 |
call ctrl_set_fname(xx_edtaux_file, fname_edtaux, mythid) |
155 |
call ctrl_set_fname(xx_edtauy_file, fname_edtauy, mythid) |
156 |
call ctrl_set_fname(xx_uvel_file, fname_uvel, mythid) |
157 |
call ctrl_set_fname(xx_vvel_file, fname_vvel, mythid) |
158 |
call ctrl_set_fname(xx_etan_file, fname_etan, mythid) |
159 |
call ctrl_set_fname(xx_relaxsst_file, fname_relaxsst, mythid) |
160 |
call ctrl_set_fname(xx_relaxsss_file, fname_relaxsss, mythid) |
161 |
|
162 |
c-- Only the master thread will do I/O. |
163 |
_BEGIN_MASTER( mythid ) |
164 |
|
165 |
c ********************************************************************* |
166 |
|
167 |
if ( first ) then |
168 |
c >>> Initialise control vector for optimcycle=0 <<< |
169 |
lxxadxx = .TRUE. |
170 |
ictrlgrad = 1 |
171 |
write(cfile(1:128),'(4a,i4.4)') |
172 |
& ctrlname(1:9),'_',yctrlid(1:10), |
173 |
& yctrlposunpack(1:4), optimcycle |
174 |
print *, 'ph-pack: unpacking ', ctrlname(1:9) |
175 |
else |
176 |
c >>> Write gradient vector <<< |
177 |
lxxadxx = .FALSE. |
178 |
ictrlgrad = 2 |
179 |
write(cfile(1:128),'(4a,i4.4)') |
180 |
& costname(1:9),'_',yctrlid(1:10), |
181 |
& yctrlposunpack(1:4), optimcycle |
182 |
print *, 'ph-pack: unpacking ', costname(1:9) |
183 |
endif |
184 |
|
185 |
call mdsfindunit( cunit, mythid ) |
186 |
|
187 |
#ifdef ALLOW_ADMTLM |
188 |
|
189 |
if (postprocev) then |
190 |
cph do a dummy read of initialized EV fields |
191 |
cph they will be overwritten by array phtmpadmtlm |
192 |
write(cfile(1:128),'(a)') ' ' |
193 |
write(cfile,'(a,i4.4)') |
194 |
& 'admtlm_eigen', optimcycle |
195 |
else |
196 |
write(cfile(1:128),'(a)') ' ' |
197 |
write(cfile,'(a,i4.4)') |
198 |
& 'admtlm_vector.it', optimcycle |
199 |
endif |
200 |
print *, 'ph-pack: unpacking ', cfile |
201 |
cph open( cunit, file = cfile, |
202 |
cph & status = 'old', |
203 |
cph & form = 'unformatted', |
204 |
cph & access = 'sequential' ) |
205 |
|
206 |
#else /* ndef ALLOW_ADMTLM */ |
207 |
|
208 |
open( cunit, file = cfile, |
209 |
& status = 'old', |
210 |
& form = 'unformatted', |
211 |
& access = 'sequential' ) |
212 |
|
213 |
c-- Header information. |
214 |
read(cunit) filenvartype |
215 |
read(cunit) filenvarlength |
216 |
read(cunit) fileYctrlid |
217 |
read(cunit) fileOptimCycle |
218 |
read(cunit) filefc |
219 |
read(cunit) fileIg |
220 |
read(cunit) fileJg |
221 |
read(cunit) filensx |
222 |
read(cunit) filensy |
223 |
read(cunit) (filenWetcGlobal(k), k=1,nr) |
224 |
read(cunit) (filenWetsGlobal(k), k=1,nr) |
225 |
read(cunit) (filenWetwGlobal(k), k=1,nr) |
226 |
#ifdef ALLOW_CTRL_WETV |
227 |
read(cunit) (filenWetvGlobal(k), k=1,nr) |
228 |
#endif |
229 |
|
230 |
cgg( Add OBCS mask information to the header. |
231 |
#ifdef ALLOW_OBCSN_CONTROL |
232 |
read(cunit) ((filenWetobcsnGlo(k,iobcs), |
233 |
& k=1,nr), iobcs= 1,nobcs) |
234 |
#endif |
235 |
#ifdef ALLOW_OBCSS_CONTROL |
236 |
read(cunit) ((filenWetobcssGlo(k,iobcs), |
237 |
& k=1,nr), iobcs= 1,nobcs) |
238 |
#endif |
239 |
#ifdef ALLOW_OBCSW_CONTROL |
240 |
read(cunit) ((filenWetobcswGlo(k,iobcs), |
241 |
& k=1,nr), iobcs= 1,nobcs) |
242 |
#endif |
243 |
#ifdef ALLOW_OBCSE_CONTROL |
244 |
read(cunit) ((filenWetobcseGlo(k,iobcs), |
245 |
& k=1,nr), iobcs= 1,nobcs) |
246 |
#endif |
247 |
cgg) |
248 |
read(cunit) (filencvarindex(i), i=1,maxcvars) |
249 |
read(cunit) (filencvarrecs(i), i=1,maxcvars) |
250 |
read(cunit) (filencvarxmax(i), i=1,maxcvars) |
251 |
read(cunit) (filencvarymax(i), i=1,maxcvars) |
252 |
read(cunit) (filencvarnrmax(i), i=1,maxcvars) |
253 |
read(cunit) (filencvargrd(i), i=1,maxcvars) |
254 |
read(cunit) |
255 |
|
256 |
c Check file header info. |
257 |
c |
258 |
if ( filenvarlength .NE. nvarlength ) then |
259 |
print *, 'WARNING: wrong nvarlength ', |
260 |
& filenvarlength, nvarlength |
261 |
STOP 'in S/R ctrl_unpack' |
262 |
else if ( filensx .NE. nsx .OR. filensy .NE. nsy ) then |
263 |
print *, 'WARNING: wrong nsx or nsy ', |
264 |
& filensx, nsx, filensy, nsy |
265 |
STOP 'in S/R ctrl_unpack' |
266 |
endif |
267 |
do k = 1, nr |
268 |
if ( filenWetcGlobal(k) .NE. nWetcGlobal(k) .OR. |
269 |
& filenWetsGlobal(k) .NE. nWetsGlobal(k) .OR. |
270 |
& filenWetwGlobal(k) .NE. nWetwGlobal(k) .OR. |
271 |
& filenWetvGlobal(k) .NE. nWetvGlobal(k) ) then |
272 |
print *, 'WARNING: wrong nWet?Global for k = ', k |
273 |
STOP |
274 |
endif |
275 |
end do |
276 |
|
277 |
cgg( Lets also check the OBCS mask info in the header. |
278 |
|
279 |
#ifdef ALLOW_OBCSN_CONTROL |
280 |
do iobcs = 1, nobcs |
281 |
do k = 1, nr |
282 |
if (filenWetobcsnGlo(k,iobcs) .NE. |
283 |
& nWetobcsnGlo(k,iobcs)) then |
284 |
print *, 'WARNING: OBCSN wrong nWet?Global for k = ', k |
285 |
STOP |
286 |
endif |
287 |
end do |
288 |
end do |
289 |
#endif |
290 |
|
291 |
#ifdef ALLOW_OBCSS_CONTROL |
292 |
do iobcs = 1, nobcs |
293 |
do k = 1, nr |
294 |
if (filenWetobcssGlo(k,iobcs) .NE. |
295 |
& nWetobcssGlo(k,iobcs)) then |
296 |
print *, 'WARNING: OBCSS wrong nWet?Global for k = ', k |
297 |
STOP |
298 |
endif |
299 |
end do |
300 |
end do |
301 |
#endif |
302 |
|
303 |
#ifdef ALLOW_OBCSW_CONTROL |
304 |
do iobcs = 1, nobcs |
305 |
do k = 1, nr |
306 |
if (filenWetobcswGlo(k,iobcs) .NE. |
307 |
& nWetobcswGlo(k,iobcs)) then |
308 |
print *, 'WARNING: OBCSW wrong nWet?Global for k = ', k |
309 |
STOP |
310 |
endif |
311 |
end do |
312 |
end do |
313 |
#endif |
314 |
|
315 |
#ifdef ALLOW_OBCSE_CONTROL |
316 |
do iobcs = 1, nobcs |
317 |
do k = 1, nr |
318 |
if (filenWetobcseGlo(k,iobcs) .NE. |
319 |
& nWetobcseGlo(k,iobcs)) then |
320 |
print *, 'WARNING: OBCSE wrong nWet?Global for k = ', k |
321 |
STOP |
322 |
endif |
323 |
end do |
324 |
end do |
325 |
#endif |
326 |
cgg) End OBCS mask check. |
327 |
|
328 |
#endif /* ndef ALLOW_ADMTLM */ |
329 |
|
330 |
c---------------------------------------------------------------------- |
331 |
|
332 |
#ifdef ALLOW_THETA0_CONTROL |
333 |
ivartype = 1 |
334 |
write(weighttype(1:80),'(80a)') ' ' |
335 |
write(weighttype(1:80),'(a)') "wtheta" |
336 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
337 |
& fname_theta(ictrlgrad), "maskCtrlC", |
338 |
& weighttype, wtheta, nwetcglobal, mythid) |
339 |
#endif |
340 |
|
341 |
#ifdef ALLOW_SALT0_CONTROL |
342 |
ivartype = 2 |
343 |
write(weighttype(1:80),'(80a)') ' ' |
344 |
write(weighttype(1:80),'(a)') "wsalt" |
345 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
346 |
& fname_salt(ictrlgrad), "maskCtrlC", |
347 |
& weighttype, wsalt, nwetcglobal, mythid) |
348 |
#endif |
349 |
|
350 |
#if (defined (ALLOW_HFLUX_CONTROL) || defined (ALLOW_HFLUX0_CONTROL)) |
351 |
ivartype = 3 |
352 |
write(weighttype(1:80),'(80a)') ' ' |
353 |
write(weighttype(1:80),'(a)') "whflux" |
354 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
355 |
& fname_hflux(ictrlgrad), "maskCtrlC", |
356 |
& weighttype, nwetcglobal, mythid) |
357 |
#endif |
358 |
|
359 |
#if (defined (ALLOW_SFLUX_CONTROL) || defined (ALLOW_SFLUX0_CONTROL)) |
360 |
ivartype = 4 |
361 |
write(weighttype(1:80),'(80a)') ' ' |
362 |
write(weighttype(1:80),'(a)') "wsflux" |
363 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
364 |
& fname_sflux(ictrlgrad), "maskCtrlC", |
365 |
& weighttype, nwetcglobal, mythid) |
366 |
#endif |
367 |
|
368 |
#if (defined (ALLOW_USTRESS_CONTROL) || defined (ALLOW_TAUU0_CONTROL)) |
369 |
ivartype = 5 |
370 |
write(weighttype(1:80),'(80a)') ' ' |
371 |
write(weighttype(1:80),'(a)') "wtauu" |
372 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
373 |
& fname_tauu(ictrlgrad), "maskCtrlW", |
374 |
& weighttype, nwetwglobal, mythid) |
375 |
#endif |
376 |
|
377 |
#if (defined (ALLOW_VSTRESS_CONTROL) || defined (ALLOW_TAUV0_CONTROL)) |
378 |
ivartype = 6 |
379 |
write(weighttype(1:80),'(80a)') ' ' |
380 |
write(weighttype(1:80),'(a)') "wtauv" |
381 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
382 |
& fname_tauv(ictrlgrad), "maskCtrlS", |
383 |
& weighttype, nwetsglobal, mythid) |
384 |
#endif |
385 |
|
386 |
#ifdef ALLOW_ATEMP_CONTROL |
387 |
ivartype = 7 |
388 |
write(weighttype(1:80),'(80a)') ' ' |
389 |
write(weighttype(1:80),'(a)') "watemp" |
390 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
391 |
& fname_atemp(ictrlgrad), "maskCtrlC", |
392 |
& weighttype, nwetcglobal, mythid) |
393 |
#endif |
394 |
|
395 |
#ifdef ALLOW_AQH_CONTROL |
396 |
ivartype = 8 |
397 |
write(weighttype(1:80),'(80a)') ' ' |
398 |
write(weighttype(1:80),'(a)') "waqh" |
399 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
400 |
& fname_aqh(ictrlgrad), "maskCtrlC", |
401 |
& weighttype, nwetcglobal, mythid) |
402 |
#endif |
403 |
|
404 |
#ifdef ALLOW_UWIND_CONTROL |
405 |
ivartype = 9 |
406 |
write(weighttype(1:80),'(80a)') ' ' |
407 |
write(weighttype(1:80),'(a)') "wuwind" |
408 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
409 |
& fname_uwind(ictrlgrad), "maskCtrlC", |
410 |
& weighttype, nwetcglobal, mythid) |
411 |
#endif |
412 |
|
413 |
#ifdef ALLOW_VWIND_CONTROL |
414 |
ivartype = 10 |
415 |
write(weighttype(1:80),'(80a)') ' ' |
416 |
write(weighttype(1:80),'(a)') "wvwind" |
417 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
418 |
& fname_vwind(ictrlgrad), "maskCtrlC", |
419 |
& weighttype, nwetcglobal, mythid) |
420 |
#endif |
421 |
|
422 |
#ifdef ALLOW_OBCSN_CONTROL |
423 |
ivartype = 11 |
424 |
write(weighttype(1:80),'(80a)') ' ' |
425 |
write(weighttype(1:80),'(a)') "wobcsn" |
426 |
call ctrl_set_unpack_xz( |
427 |
& cunit, ivartype, fname_obcsn(ictrlgrad), "maskobcsn", |
428 |
& weighttype, wobcsn, nWetobcsnGlo, mythid) |
429 |
#endif |
430 |
|
431 |
#ifdef ALLOW_OBCSS_CONTROL |
432 |
ivartype = 12 |
433 |
write(weighttype(1:80),'(80a)') ' ' |
434 |
write(weighttype(1:80),'(a)') "wobcss" |
435 |
call ctrl_set_unpack_xz( |
436 |
& cunit, ivartype, fname_obcss(ictrlgrad), "maskobcss", |
437 |
& weighttype, wobcss, nWetobcssGlo, mythid) |
438 |
#endif |
439 |
|
440 |
#ifdef ALLOW_OBCSW_CONTROL |
441 |
ivartype = 13 |
442 |
write(weighttype(1:80),'(80a)') ' ' |
443 |
write(weighttype(1:80),'(a)') "wobcsw" |
444 |
call ctrl_set_unpack_yz( |
445 |
& cunit, ivartype, fname_obcsw(ictrlgrad), "maskobcsw", |
446 |
& weighttype, wobcsw, nWetobcswGlo, mythid) |
447 |
#endif |
448 |
|
449 |
#ifdef ALLOW_OBCSE_CONTROL |
450 |
ivartype = 14 |
451 |
write(weighttype(1:80),'(80a)') ' ' |
452 |
write(weighttype(1:80),'(a)') "wobcse" |
453 |
call ctrl_set_unpack_yz( |
454 |
& cunit, ivartype, fname_obcse(ictrlgrad), "maskobcse", |
455 |
& weighttype, wobcse, nWetobcseGlo, mythid) |
456 |
#endif |
457 |
|
458 |
#ifdef ALLOW_DIFFKR_CONTROL |
459 |
ivartype = 15 |
460 |
write(weighttype(1:80),'(80a)') ' ' |
461 |
write(weighttype(1:80),'(a)') "wdiffkr" |
462 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
463 |
& fname_diffkr(ictrlgrad), "maskCtrlC", |
464 |
& weighttype, wunit, nwetcglobal, mythid) |
465 |
#endif |
466 |
|
467 |
#ifdef ALLOW_KAPGM_CONTROL |
468 |
ivartype = 16 |
469 |
write(weighttype(1:80),'(80a)') ' ' |
470 |
write(weighttype(1:80),'(a)') "wkapgm" |
471 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
472 |
& fname_kapgm(ictrlgrad), "maskCtrlC", |
473 |
& weighttype, wunit, nwetcglobal, mythid) |
474 |
#endif |
475 |
|
476 |
#ifdef ALLOW_TR10_CONTROL |
477 |
ivartype = 17 |
478 |
write(weighttype(1:80),'(80a)') ' ' |
479 |
write(weighttype(1:80),'(a)') "wtr1" |
480 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
481 |
& fname_tr1(ictrlgrad), "maskCtrlC", |
482 |
& weighttype, wunit, nwetcglobal, mythid) |
483 |
#endif |
484 |
|
485 |
#if (defined (ALLOW_SST_CONTROL) || defined (ALLOW_SST0_CONTROL)) |
486 |
ivartype = 18 |
487 |
write(weighttype(1:80),'(80a)') ' ' |
488 |
write(weighttype(1:80),'(a)') "wsst" |
489 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
490 |
& fname_sst(ictrlgrad), "maskCtrlC", |
491 |
& weighttype, nwetcglobal, mythid) |
492 |
#endif |
493 |
|
494 |
#if (defined (ALLOW_SSS_CONTROL) || defined (ALLOW_SSS0_CONTROL)) |
495 |
ivartype = 19 |
496 |
write(weighttype(1:80),'(80a)') ' ' |
497 |
write(weighttype(1:80),'(a)') "wsss" |
498 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
499 |
& fname_sss(ictrlgrad), "maskCtrlC", |
500 |
& weighttype, nwetcglobal, mythid) |
501 |
#endif |
502 |
|
503 |
#ifdef ALLOW_DEPTH_CONTROL |
504 |
ivartype = 20 |
505 |
write(weighttype(1:80),'(80a)') ' ' |
506 |
write(weighttype(1:80),'(a)') "wdepth" |
507 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
508 |
& fname_depth(ictrlgrad), "maskCtrlC", |
509 |
& weighttype, weighttype, nwetcglobal, mythid) |
510 |
#endif |
511 |
|
512 |
#ifdef ALLOW_EFLUXY0_CONTROL |
513 |
ivartype = 21 |
514 |
write(weighttype(1:80),'(80a)') ' ' |
515 |
write(weighttype(1:80),'(a)') "wefluxy0" |
516 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
517 |
& fname_efluxy(ictrlgrad), "maskCtrlS", |
518 |
& weighttype, wefluxy, nwetsglobal, mythid) |
519 |
#endif |
520 |
|
521 |
#ifdef ALLOW_EFLUXP0_CONTROL |
522 |
ivartype = 22 |
523 |
write(weighttype(1:80),'(80a)') ' ' |
524 |
write(weighttype(1:80),'(a)') "wefluxp0" |
525 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
526 |
& fname_efluxp(ictrlgrad), "maskhFacV", |
527 |
& weighttype, wefluxp, nwetvglobal, mythid) |
528 |
#endif |
529 |
|
530 |
#ifdef ALLOW_BOTTOMDRAG_CONTROL |
531 |
ivartype = 23 |
532 |
write(weighttype(1:80),'(80a)') ' ' |
533 |
write(weighttype(1:80),'(a)') "wbottomdrag" |
534 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
535 |
& fname_bottomdrag(ictrlgrad), "maskCtrlC", |
536 |
& weighttype, nwetcglobal, mythid) |
537 |
#endif |
538 |
|
539 |
#ifdef ALLOW_EDDYPSI_CONTROL |
540 |
ivartype = 25 |
541 |
write(weighttype(1:80),'(80a)') ' ' |
542 |
write(weighttype(1:80),'(a)') "wedtaux" |
543 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
544 |
& fname_edtaux(ictrlgrad), "maskCtrlW", |
545 |
& weighttype, wunit, nwetwglobal, mythid) |
546 |
|
547 |
ivartype = 26 |
548 |
write(weighttype(1:80),'(80a)') ' ' |
549 |
write(weighttype(1:80),'(a)') "wedtauy" |
550 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
551 |
& fname_edtauy(ictrlgrad), "maskCtrlS", |
552 |
& weighttype, wunit, nwetsglobal, mythid) |
553 |
#endif |
554 |
|
555 |
#ifdef ALLOW_UVEL0_CONTROL |
556 |
ivartype = 27 |
557 |
write(weighttype(1:80),'(80a)') ' ' |
558 |
write(weighttype(1:80),'(a)') "wuvvel" |
559 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
560 |
& fname_uvel(ictrlgrad), "maskCtrlW", |
561 |
& weighttype, wuvvel, nwetwglobal, mythid) |
562 |
#endif |
563 |
|
564 |
#ifdef ALLOW_VVEL0_CONTROL |
565 |
ivartype = 28 |
566 |
write(weighttype(1:80),'(80a)') ' ' |
567 |
write(weighttype(1:80),'(a)') "wuvvel" |
568 |
call ctrl_set_unpack_xyz( lxxadxx, cunit, ivartype, |
569 |
& fname_vvel(ictrlgrad), "maskCtrlS", |
570 |
& weighttype, wuvvel, nwetsglobal, mythid) |
571 |
#endif |
572 |
|
573 |
#ifdef ALLOW_ETAN0_CONTROL |
574 |
ivartype = 29 |
575 |
write(weighttype(1:80),'(80a)') ' ' |
576 |
write(weighttype(1:80),'(a)') "wetan" |
577 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
578 |
& fname_etan(ictrlgrad), "maskCtrlC", |
579 |
& weighttype, nwetcglobal, mythid) |
580 |
#endif |
581 |
|
582 |
#ifdef ALLOW_RELAXSST_CONTROL |
583 |
ivartype = 30 |
584 |
write(weighttype(1:80),'(80a)') ' ' |
585 |
write(weighttype(1:80),'(a)') "wrelaxsst" |
586 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
587 |
& fname_relaxsst(ictrlgrad), "maskCtrlC", |
588 |
& weighttype, nwetcglobal, mythid) |
589 |
#endif |
590 |
|
591 |
#ifdef ALLOW_RELAXSSS_CONTROL |
592 |
ivartype = 31 |
593 |
write(weighttype(1:80),'(80a)') ' ' |
594 |
write(weighttype(1:80),'(a)') "wrelaxsss" |
595 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
596 |
& fname_relaxsss(ictrlgrad), "maskCtrlC", |
597 |
& weighttype, nwetcglobal, mythid) |
598 |
#endif |
599 |
|
600 |
#ifdef ALLOW_PRECIP_CONTROL |
601 |
ivartype = 32 |
602 |
write(weighttype(1:80),'(80a)') ' ' |
603 |
write(weighttype(1:80),'(a)') "wprecip" |
604 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
605 |
& fname_precip(ictrlgrad), "maskCtrlC", |
606 |
& weighttype, nwetcglobal, mythid) |
607 |
#endif |
608 |
|
609 |
#ifdef ALLOW_SWFLUX_CONTROL |
610 |
ivartype = 33 |
611 |
write(weighttype(1:80),'(80a)') ' ' |
612 |
write(weighttype(1:80),'(a)') "wswflux" |
613 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
614 |
& fname_swflux(ictrlgrad), "maskCtrlC", |
615 |
& weighttype, nwetcglobal, mythid) |
616 |
#endif |
617 |
|
618 |
#ifdef ALLOW_SWDOWN_CONTROL |
619 |
ivartype = 34 |
620 |
write(weighttype(1:80),'(80a)') ' ' |
621 |
write(weighttype(1:80),'(a)') "wswdown" |
622 |
call ctrl_set_unpack_xy( lxxadxx, cunit, ivartype, |
623 |
& fname_swdown(ictrlgrad), "maskCtrlC", |
624 |
& weighttype, nwetcglobal, mythid) |
625 |
#endif |
626 |
|
627 |
close ( cunit ) |
628 |
|
629 |
_END_MASTER( mythid ) |
630 |
|
631 |
#endif /* EXCLUDE_CTRL_PACK */ |
632 |
|
633 |
return |
634 |
end |