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

Contents of /MITgcm/pkg/ctrl/ctrl_summary.F

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


Revision 1.15 - (show annotations) (download)
Tue Jun 16 13:15:27 2015 UTC (9 years ago) by gforget
Branch: MAIN
Changes since 1.14: +1 -5 lines

- ctrl_summary.F : remove un-necessary ALLOW_SMOOTH_CORREL2D
- ctrl_readparms.F : set mult_genarr2d,arr3d,tim2d default to 1.

1 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_summary.F,v 1.14 2015/05/27 18:33:43 gforget Exp $
2 C $Name: $
3
4 #include "CTRL_OPTIONS.h"
5
6 subroutine ctrl_Summary( mythid )
7
8 c ==================================================================
9 c SUBROUTINE ctrl_Summary
10 c ==================================================================
11 c
12 c o Summarize the control vector settings.
13 c
14 c ==================================================================
15 c SUBROUTINE ctrl_Summary
16 c ==================================================================
17
18 implicit none
19
20 c == global variables ==
21
22 #include "EEPARAMS.h"
23 #include "SIZE.h"
24
25 #ifdef ALLOW_CAL
26 # include "cal.h"
27 #endif
28 #ifdef ALLOW_AUTODIFF
29 # include "AUTODIFF_PARAMS.h"
30 #endif
31 #ifdef ALLOW_CTRL
32 # include "ctrl.h"
33 # include "CTRL_SIZE.h"
34 # if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
35 # include "CTRL_GENARR.h"
36 # endif
37 #endif
38
39 c == routine arguments ==
40
41 integer mythid
42
43 c == local variables ==
44
45 integer bi,bj
46 integer i,k
47 integer il
48 integer timeint(4)
49 integer nwetcenter
50 integer nwetsouth
51 integer nwetwest
52
53 character*(max_len_mbuf) msgbuf
54
55 #if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
56 INTEGER iarr, jarr
57 #endif
58
59 c == external ==
60
61 integer ilnblnk
62 external ilnblnk
63
64 c == end of interface ==
65
66 write(msgbuf,'(a)')
67 &' '
68 call print_message( msgbuf, standardmessageunit,
69 & SQUEEZE_RIGHT , mythid)
70 write(msgbuf,'(a)')
71 &'// ======================================================='
72 call print_message( msgbuf, standardmessageunit,
73 & SQUEEZE_RIGHT , mythid)
74 write(msgbuf,'(a)')
75 &'// control vector configuration >>> START <<<'
76 call print_message( msgbuf, standardmessageunit,
77 & SQUEEZE_RIGHT , mythid)
78 write(msgbuf,'(a)')
79 &'// ======================================================='
80 call print_message( msgbuf, standardmessageunit,
81 & SQUEEZE_RIGHT , mythid)
82 write(msgbuf,'(a)')
83 &' '
84 call print_message( msgbuf, standardmessageunit,
85 & SQUEEZE_RIGHT , mythid)
86
87 write(msgbuf,'(a)')
88 &' Total number of ocean points per tile:'
89 call print_message( msgbuf, standardmessageunit,
90 & SQUEEZE_RIGHT , mythid)
91 write(msgbuf,'(a)')
92 &' --------------------------------------'
93 call print_message( msgbuf, standardmessageunit,
94 & SQUEEZE_RIGHT , mythid)
95 write(msgbuf,'(a,i8)') ' snx*sny*nr = ',snx*sny*nr
96 call print_message( msgbuf, standardmessageunit,
97 & SQUEEZE_RIGHT , mythid)
98 write(msgbuf,'(a)')
99 &' '
100 call print_message( msgbuf, standardmessageunit,
101 & SQUEEZE_RIGHT , mythid)
102 write(msgbuf,'(a)')
103 &' Number of ocean points per tile:'
104 call print_message( msgbuf, standardmessageunit,
105 & SQUEEZE_RIGHT , mythid)
106 write(msgbuf,'(a)')
107 &' --------------------------------'
108 call print_message( msgbuf, standardmessageunit,
109 & SQUEEZE_RIGHT , mythid)
110 do bj = 1,nsy
111 do bi = 1,nsx
112 nwetcenter = 0
113 nwetsouth = 0
114 nwetwest = 0
115 do k = 1,nr
116 nwetcenter = nwetcenter + nwetctile(bi,bj,k)
117 nwetsouth = nwetsouth + nwetstile(bi,bj,k)
118 nwetwest = nwetwest + nwetwtile(bi,bj,k)
119 enddo
120 write(msgbuf,'(a,i5.4,i5.4,i7.6,i7.6,i7.6)')
121 & ' bi,bj,#(c/s/w):',bi,bj,nwetcenter,
122 & nwetsouth,
123 & nwetwest
124 call print_message( msgbuf, standardmessageunit,
125 & SQUEEZE_RIGHT , mythid)
126 enddo
127 enddo
128
129 #ifndef PHASE_OUT_OUT_CODES
130
131 #ifdef ALLOW_THETA0_CONTROL
132 write(msgbuf,'(a)')
133 &' '
134 call print_message( msgbuf, standardmessageunit,
135 & SQUEEZE_RIGHT , mythid)
136 write(msgbuf,'(a)')
137 &' Initial state temperature contribution:'
138 call print_message( msgbuf, standardmessageunit,
139 & SQUEEZE_RIGHT , mythid)
140 write(msgbuf,'(a,i5.4)')
141 &' Control variable index: ',ncvarindex(1)
142 call print_message( msgbuf, standardmessageunit,
143 & SQUEEZE_RIGHT , mythid)
144 #endif
145 #ifdef ALLOW_SALT0_CONTROL
146 write(msgbuf,'(a)')
147 &' '
148 call print_message( msgbuf, standardmessageunit,
149 & SQUEEZE_RIGHT , mythid)
150 write(msgbuf,'(a)')
151 &' Initial state salinity contribution:'
152 call print_message( msgbuf, standardmessageunit,
153 & SQUEEZE_RIGHT , mythid)
154 write(msgbuf,'(a,i5.4)')
155 &' Control variable index: ',ncvarindex(2)
156 call print_message( msgbuf, standardmessageunit,
157 & SQUEEZE_RIGHT , mythid)
158 #endif
159 #ifdef ALLOW_HFLUX_CONTROL
160 write(msgbuf,'(a)')
161 &' '
162 call print_message( msgbuf, standardmessageunit,
163 & SQUEEZE_RIGHT , mythid)
164 write(msgbuf,'(a)')
165 &' Heat flux contribution:'
166 call print_message( msgbuf, standardmessageunit,
167 & SQUEEZE_RIGHT , mythid)
168 write(msgbuf,'(a,i5.4)')
169 &' Control variable index: ',ncvarindex(3)
170 call print_message( msgbuf, standardmessageunit,
171 & SQUEEZE_RIGHT , mythid)
172
173 il = ilnblnk(xx_hflux_file)
174 call cal_TimeInterval( xx_hfluxperiod, 'secs', timeint, mythid )
175
176 write(msgbuf,'(a)')
177 &' '
178 call print_message( msgbuf, standardmessageunit,
179 & SQUEEZE_RIGHT , mythid)
180 write(msgbuf,'(a,i9.8,i7.6,1x,a,a)')
181 &' Heat flux contribution starts at: ',
182 & (xx_hfluxstartdate(i), i=1,2),
183 & dayofweek(xx_hfluxstartdate(4)),'.'
184 call print_message( msgbuf, standardmessageunit,
185 & SQUEEZE_RIGHT , mythid)
186 write(msgbuf,'(a,i9.8,i7.6)')
187 &' Heat flux contribution period is: ',
188 & (timeint(i), i=1,2)
189 call print_message( msgbuf, standardmessageunit,
190 & SQUEEZE_RIGHT , mythid)
191 write(msgbuf,'(a)')
192 &' Heat flux contribution is read from file: '
193 call print_message( msgbuf, standardmessageunit,
194 & SQUEEZE_RIGHT , mythid)
195 write(msgbuf,'(a,a,a)')
196 &' >> ',xx_hflux_file(1:il),' <<'
197 call print_message( msgbuf, standardmessageunit,
198 & SQUEEZE_RIGHT , mythid)
199 #endif
200 #ifdef ALLOW_SFLUX_CONTROL
201 write(msgbuf,'(a)')
202 &' '
203 call print_message( msgbuf, standardmessageunit,
204 & SQUEEZE_RIGHT , mythid)
205 write(msgbuf,'(a)')
206 &' Salt flux contribution:'
207 call print_message( msgbuf, standardmessageunit,
208 & SQUEEZE_RIGHT , mythid)
209 write(msgbuf,'(a,i5.4)')
210 &' Control varibale index: ',ncvarindex(4)
211 call print_message( msgbuf, standardmessageunit,
212 & SQUEEZE_RIGHT , mythid)
213
214 il = ilnblnk(xx_sflux_file)
215 call cal_TimeInterval( xx_sfluxperiod, 'secs', timeint, mythid )
216
217 write(msgbuf,'(a)')
218 &' '
219 call print_message( msgbuf, standardmessageunit,
220 & SQUEEZE_RIGHT , mythid)
221 write(msgbuf,'(a,i9.8,i7.6,1x,a,a)')
222 &' Salt flux contribution starts at: ',
223 & (xx_sfluxstartdate(i), i=1,2),
224 & dayofweek(xx_sfluxstartdate(4)),'.'
225 call print_message( msgbuf, standardmessageunit,
226 & SQUEEZE_RIGHT , mythid)
227 write(msgbuf,'(a,i9.8,i7.6)')
228 &' Salt flux contribution period is: ',
229 & (timeint(i), i=1,2)
230 call print_message( msgbuf, standardmessageunit,
231 & SQUEEZE_RIGHT , mythid)
232 write(msgbuf,'(a)')
233 &' Salt flux contribution is read from file: '
234 call print_message( msgbuf, standardmessageunit,
235 & SQUEEZE_RIGHT , mythid)
236 write(msgbuf,'(a,a,a)')
237 &' >> ',xx_sflux_file(1:il),' <<'
238 call print_message( msgbuf, standardmessageunit,
239 & SQUEEZE_RIGHT , mythid)
240 #endif
241 #ifdef ALLOW_USTRESS_CONTROL
242 write(msgbuf,'(a)')
243 &' '
244 call print_message( msgbuf, standardmessageunit,
245 & SQUEEZE_RIGHT , mythid)
246 write(msgbuf,'(a)')
247 &' Zonal wind stress contribution:'
248 call print_message( msgbuf, standardmessageunit,
249 & SQUEEZE_RIGHT , mythid)
250 write(msgbuf,'(a,i5.4)')
251 &' Control variable index: ',ncvarindex(5)
252 call print_message( msgbuf, standardmessageunit,
253 & SQUEEZE_RIGHT , mythid)
254
255 il = ilnblnk(xx_tauu_file)
256 call cal_TimeInterval( xx_tauuperiod, 'secs', timeint, mythid )
257
258 write(msgbuf,'(a)')
259 &' '
260 call print_message( msgbuf, standardmessageunit,
261 & SQUEEZE_RIGHT , mythid)
262 write(msgbuf,'(a,i9.8,i7.6,1x,a,a)')
263 &' Zonal wind stress contribution starts at: ',
264 & (xx_tauustartdate(i), i=1,2),
265 & dayofweek(xx_tauustartdate(4)),'.'
266 call print_message( msgbuf, standardmessageunit,
267 & SQUEEZE_RIGHT , mythid)
268 write(msgbuf,'(a,i9.8,i7.6)')
269 &' Zonal wind stress contribution period is: ',
270 & (timeint(i), i=1,2)
271 call print_message( msgbuf, standardmessageunit,
272 & SQUEEZE_RIGHT , mythid)
273 write(msgbuf,'(a)')
274 &' Zonal wind stress contribution is read from file: '
275 call print_message( msgbuf, standardmessageunit,
276 & SQUEEZE_RIGHT , mythid)
277 write(msgbuf,'(a,a,a)')
278 &' >> ',xx_tauu_file(1:il),' <<'
279 call print_message( msgbuf, standardmessageunit,
280 & SQUEEZE_RIGHT , mythid)
281 #endif
282 #ifdef ALLOW_VSTRESS_CONTROL
283 write(msgbuf,'(a)')
284 &' '
285 call print_message( msgbuf, standardmessageunit,
286 & SQUEEZE_RIGHT , mythid)
287 write(msgbuf,'(a)')
288 &' Meridional wind stress contribution:'
289 call print_message( msgbuf, standardmessageunit,
290 & SQUEEZE_RIGHT , mythid)
291 write(msgbuf,'(a,i5.4)')
292 &' Control variable index: ',ncvarindex(6)
293 call print_message( msgbuf, standardmessageunit,
294 & SQUEEZE_RIGHT , mythid)
295
296 il = ilnblnk(xx_tauv_file)
297 call cal_TimeInterval( xx_tauvperiod, 'secs', timeint, mythid )
298
299 write(msgbuf,'(a)')
300 &' '
301 call print_message( msgbuf, standardmessageunit,
302 & SQUEEZE_RIGHT , mythid)
303 write(msgbuf,'(a,i9.8,i7.6,1x,a,a)')
304 &' Merid. wind stress contribution starts at: ',
305 & (xx_hfluxstartdate(i), i=1,2),
306 & dayofweek(xx_hfluxstartdate(4)),'.'
307 call print_message( msgbuf, standardmessageunit,
308 & SQUEEZE_RIGHT , mythid)
309 write(msgbuf,'(a,i9.8,i7.6)')
310 &' Merid. wind stress contribution period is: ',
311 & (timeint(i), i=1,2)
312 call print_message( msgbuf, standardmessageunit,
313 & SQUEEZE_RIGHT , mythid)
314 write(msgbuf,'(a)')
315 &' Merid. wind stress contribution is read from file: '
316 call print_message( msgbuf, standardmessageunit,
317 & SQUEEZE_RIGHT , mythid)
318 write(msgbuf,'(a,a,a)')
319 &' >> ',xx_tauv_file(1:il),' <<'
320 call print_message( msgbuf, standardmessageunit,
321 & SQUEEZE_RIGHT , mythid)
322 #endif
323
324 #endif /* PHASE_OUT_OUT_CODES */
325
326
327 #ifdef ALLOW_SMOOTH
328
329 write(msgbuf,'(a)') ' '
330 call print_message( msgbuf, standardmessageunit,
331 & SQUEEZE_RIGHT , mythid)
332
333 write(msgbuf,'(a)')
334 &' Settings of diffusion based correlation operators:'
335 call print_message( msgbuf, standardmessageunit,
336 & SQUEEZE_RIGHT , mythid)
337 write(msgbuf,'(a)')
338 &' --------------------------------------------------'
339 call print_message( msgbuf, standardmessageunit,
340 & SQUEEZE_RIGHT , mythid)
341
342 write(msgbuf,'(a,L5,a)')
343 &' ctrlSmoothCorrel3D = ',ctrlSmoothCorrel3D,
344 &' /* use 3D controls correlation */'
345 call print_message( msgbuf, standardmessageunit,
346 & SQUEEZE_RIGHT , mythid)
347
348 write(msgbuf,'(a,L5,a)')
349 &' ctrlSmoothCorrel2D = ',ctrlSmoothCorrel3D,
350 &' /* use 2D controls correlation */'
351 call print_message( msgbuf, standardmessageunit,
352 & SQUEEZE_RIGHT , mythid)
353
354 #ifdef ALLOW_AUTODIFF
355 c allow for switching off correl2d in adjoint
356 write(msgbuf,'(a,L5,a)')
357 &' useSmoothCorrel2DinAdMode = ',useSmoothCorrel2DinAdMode,
358 &' /* use in adjoint mode */'
359 call print_message( msgbuf, standardmessageunit,
360 & SQUEEZE_RIGHT , mythid)
361 #endif
362
363 #endif /* ALLOW_SMOOTH */
364
365
366 #if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
367
368 write(msgbuf,'(a)') ' '
369 call print_message( msgbuf, standardmessageunit,
370 & SQUEEZE_RIGHT , mythid)
371 write(msgbuf,'(a)')
372 &' Settings of generic controls:'
373 call print_message( msgbuf, standardmessageunit,
374 & SQUEEZE_RIGHT , mythid)
375 write(msgbuf,'(a)')
376 &' -----------------------------'
377 call print_message( msgbuf, standardmessageunit,
378 & SQUEEZE_RIGHT , mythid)
379 write(msgbuf,'(a)') ' '
380 call print_message( msgbuf, standardmessageunit,
381 & SQUEEZE_RIGHT , mythid)
382 write(msgbuf,'(a,L5,a)')
383 &' ctrlUseGen = ',ctrlUseGen,
384 &' /* use generic controls */'
385 call print_message( msgbuf, standardmessageunit,
386 & SQUEEZE_RIGHT , mythid)
387
388
389 #ifdef ALLOW_GENARR2D_CONTROL
390 do iarr = 1, maxCtrlArr2D
391 if (xx_genarr2d_weight(iarr).NE.' ') then
392
393 write(msgbuf,'(a,i2,a)')
394 &' -> 2D control, genarr2d no. ',iarr,
395 &' is in use'
396 call print_message( msgbuf, standardmessageunit,
397 & SQUEEZE_RIGHT , mythid)
398
399 il = ILNBLNK( xx_genarr2d_file(iarr) )
400 write(msgbuf,'(a,a)')
401 &' file = ',xx_genarr2d_file(iarr)(1:il)
402 call print_message( msgbuf, standardmessageunit,
403 & SQUEEZE_RIGHT , mythid)
404 il = ILNBLNK( xx_genarr2d_weight(iarr) )
405 write(msgbuf,'(a,a)')
406 &' weight = ',xx_genarr2d_weight(iarr)(1:il)
407 call print_message( msgbuf, standardmessageunit,
408 & SQUEEZE_RIGHT , mythid)
409
410 do jarr=1,maxCtrlProc
411 if (xx_genarr2d_preproc(jarr,iarr).NE.' ') then
412 il = ilnblnk(xx_genarr2d_preproc(jarr,iarr))
413 write(msgbuf,'(a,a)') ' preprocess = ',
414 & xx_genarr2d_preproc(jarr,iarr)(1:il)
415 call print_message( msgbuf, standardmessageunit,
416 & SQUEEZE_RIGHT , mythid)
417 endif
418 enddo
419
420 endif
421 enddo
422 #endif
423
424
425 #ifdef ALLOW_GENARR3D_CONTROL
426 do iarr = 1, maxCtrlArr3D
427 if (xx_genarr3d_weight(iarr).NE.' ') then
428
429 write(msgbuf,'(a,i2,a)')
430 &' -> 3d control, genarr3d no. ',iarr,
431 &' is in use'
432 call print_message( msgbuf, standardmessageunit,
433 & SQUEEZE_RIGHT , mythid)
434
435 il = ILNBLNK( xx_genarr3d_file(iarr) )
436 write(msgbuf,'(a,a)')
437 &' file = ',xx_genarr3d_file(iarr)(1:il)
438 call print_message( msgbuf, standardmessageunit,
439 & SQUEEZE_RIGHT , mythid)
440 il = ILNBLNK( xx_genarr3d_weight(iarr) )
441 write(msgbuf,'(a,a)')
442 &' weight = ',xx_genarr3d_weight(iarr)(1:il)
443 call print_message( msgbuf, standardmessageunit,
444 & SQUEEZE_RIGHT , mythid)
445
446 do jarr=1,maxCtrlProc
447 if (xx_genarr3d_preproc(jarr,iarr).NE.' ') then
448 il = ilnblnk(xx_genarr3d_preproc(jarr,iarr))
449 write(msgbuf,'(a,a)') ' preprocess = ',
450 & xx_genarr3d_preproc(jarr,iarr)(1:il)
451 call print_message( msgbuf, standardmessageunit,
452 & SQUEEZE_RIGHT , mythid)
453 endif
454 enddo
455
456 endif
457 enddo
458 #endif
459
460 #ifdef ALLOW_GENTIM2D_CONTROL
461 do iarr = 1, maxCtrlTim2D
462 if (xx_gentim2d_weight(iarr).NE.' ') then
463
464 write(msgbuf,'(a,i2,a)')
465 &' -> time variable 2D control, gentim2d no. ',iarr,
466 &' is in use'
467 call print_message( msgbuf, standardmessageunit,
468 & SQUEEZE_RIGHT , mythid)
469
470 il = ILNBLNK( xx_gentim2d_file(iarr) )
471 write(msgbuf,'(a,a)')
472 &' file = ',xx_gentim2d_file(iarr)(1:il)
473 call print_message( msgbuf, standardmessageunit,
474 & SQUEEZE_RIGHT , mythid)
475
476 il = ILNBLNK( xx_gentim2d_weight(iarr) )
477 write(msgbuf,'(a,a)')
478 &' weight = ',xx_gentim2d_weight(iarr)(1:il)
479 call print_message( msgbuf, standardmessageunit,
480 & SQUEEZE_RIGHT , mythid)
481
482 #ifdef ALLOW_CAL
483 call cal_TimeInterval( xx_gentim2d_period(iarr),
484 & 'secs', timeint, mythid )
485 write(msgbuf,'(a,i9.8,i7.6)')
486 &' period = ',(timeint(i), i=1,2)
487 call print_message( msgbuf, standardmessageunit,
488 & SQUEEZE_RIGHT , mythid)
489 #endif
490
491 do jarr=1,maxCtrlProc
492 if (xx_gentim2d_preproc(jarr,iarr).NE.' ') then
493 il = ilnblnk(xx_gentim2d_preproc(jarr,iarr))
494 write(msgbuf,'(a,a)') ' preprocess = ',
495 & xx_gentim2d_preproc(jarr,iarr)(1:il)
496 call print_message( msgbuf, standardmessageunit,
497 & SQUEEZE_RIGHT , mythid)
498 C
499 if (xx_gentim2d_preproc_c(jarr,iarr).NE.' ') then
500 il = ilnblnk(xx_gentim2d_preproc_c(jarr,iarr))
501 write(msgbuf,'(a,a)') ' param. (text)= ',
502 & xx_gentim2d_preproc_c(jarr,iarr)(1:il)
503 call print_message( msgbuf, standardmessageunit,
504 & SQUEEZE_RIGHT , mythid)
505 endif
506 C
507 if (xx_gentim2d_preproc_i(jarr,iarr).NE.0) then
508 write(msgbuf,'(a,i6)') ' param. (int.)= ',
509 & xx_gentim2d_preproc_i(jarr,iarr)
510 call print_message( msgbuf, standardmessageunit,
511 & SQUEEZE_RIGHT , mythid)
512 endif
513 C
514 if (xx_gentim2d_preproc_r(jarr,iarr).NE.0. _d 0) then
515 write(msgbuf,'(a,e10.3)') ' param. (real)= ',
516 & xx_gentim2d_preproc_r(jarr,iarr)
517 call print_message( msgbuf, standardmessageunit,
518 & SQUEEZE_RIGHT , mythid)
519 endif
520
521 endif
522 enddo
523
524 endif
525 enddo
526 #endif
527
528 #endif
529
530 write(msgbuf,'(a)')
531 &' '
532 call print_message( msgbuf, standardmessageunit,
533 & SQUEEZE_RIGHT , mythid)
534 write(msgbuf,'(a)')
535 &'// ======================================================='
536 call print_message( msgbuf, standardmessageunit,
537 & SQUEEZE_RIGHT , mythid)
538 write(msgbuf,'(a)')
539 &'// control vector configuration >>> END <<<'
540 call print_message( msgbuf, standardmessageunit,
541 & SQUEEZE_RIGHT , mythid)
542 write(msgbuf,'(a)')
543 &'// ======================================================='
544 call print_message( msgbuf, standardmessageunit,
545 & SQUEEZE_RIGHT , mythid)
546 write(msgbuf,'(a)')
547 &' '
548 call print_message( msgbuf, standardmessageunit,
549 & SQUEEZE_RIGHT , mythid)
550
551 return
552 end
553

  ViewVC Help
Powered by ViewVC 1.1.22