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

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

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


Revision 1.11 - (hide annotations) (download)
Sun Nov 2 21:23:01 2014 UTC (9 years, 7 months ago) by gforget
Branch: MAIN
Changes since 1.10: +4 -8 lines
- pkg/ctrl/ctrl_readparms.F : print message if .NOT.useCTRL
- pkg/ctrl/ctrl_summary.F : update print statements and comments

1 gforget 1.11 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_summary.F,v 1.10 2014/10/09 21:46:18 gforget Exp $
2 jmc 1.4 C $Name: $
3 heimbach 1.2
4 jmc 1.6 #include "CTRL_OPTIONS.h"
5 heimbach 1.2
6 heimbach 1.3 subroutine ctrl_Summary( mythid )
7 heimbach 1.2
8     c ==================================================================
9     c SUBROUTINE ctrl_Summary
10     c ==================================================================
11     c
12 gforget 1.11 c o Summarize the control vector settings.
13 heimbach 1.2 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 heimbach 1.3 #ifdef ALLOW_CAL
26 heimbach 1.2 # include "cal.h"
27     #endif
28 gforget 1.8 #ifdef ALLOW_AUTODIFF
29     # include "AUTODIFF_PARAMS.h"
30     #endif
31 gforget 1.9 #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 heimbach 1.2
39     c == routine arguments ==
40    
41 jmc 1.4 integer mythid
42 heimbach 1.2
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 gforget 1.9 #if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
56     INTEGER iarr
57     #endif
58    
59 heimbach 1.2 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 gforget 1.11 &'// control vector configuration >>> START <<<'
76 heimbach 1.2 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 gforget 1.9 #ifndef PHASE_OUT_OUT_CODES
130    
131 heimbach 1.2 #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 gforget 1.8
324 gforget 1.9 #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 atn 1.7 #ifdef ALLOW_SMOOTH_CORREL3D
343 gforget 1.9 write(msgbuf,'(a,L5,a)')
344     &' ctrlSmoothCorrel3D = ',ctrlSmoothCorrel3D,
345     &' /* use 3D controls correlation */'
346 atn 1.7 call print_message( msgbuf, standardmessageunit,
347     & SQUEEZE_RIGHT , mythid)
348     #endif /* ALLOW_SMOOTH_CORREL3D */
349 gforget 1.8
350 atn 1.7 #ifdef ALLOW_SMOOTH_CORREL2D
351 gforget 1.9 write(msgbuf,'(a,L5,a)')
352     &' ctrlSmoothCorrel2D = ',ctrlSmoothCorrel3D,
353     &' /* use 2D controls correlation */'
354 atn 1.7 call print_message( msgbuf, standardmessageunit,
355     & SQUEEZE_RIGHT , mythid)
356     #endif /* ALLOW_SMOOTH_CORREL2D */
357 heimbach 1.2
358 gforget 1.8 #ifdef ALLOW_AUTODIFF
359     c allow for switching off correl2d in adjoint
360 gforget 1.9 write(msgbuf,'(a,L5,a)')
361     &' useSmoothCorrel2DinAdMode = ',useSmoothCorrel2DinAdMode,
362     &' /* use in adjoint mode */'
363     call print_message( msgbuf, standardmessageunit,
364     & SQUEEZE_RIGHT , mythid)
365 gforget 1.8 #endif
366    
367 gforget 1.9 #endif /* ALLOW_SMOOTH */
368    
369    
370 gforget 1.8 #if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
371 gforget 1.9
372     write(msgbuf,'(a)') ' '
373     call print_message( msgbuf, standardmessageunit,
374     & SQUEEZE_RIGHT , mythid)
375     write(msgbuf,'(a)')
376     &' Settings of generic controls:'
377 gforget 1.8 call print_message( msgbuf, standardmessageunit,
378     & SQUEEZE_RIGHT , mythid)
379 gforget 1.9 write(msgbuf,'(a)')
380     &' -----------------------------'
381     call print_message( msgbuf, standardmessageunit,
382     & SQUEEZE_RIGHT , mythid)
383     write(msgbuf,'(a)') ' '
384     call print_message( msgbuf, standardmessageunit,
385     & SQUEEZE_RIGHT , mythid)
386     write(msgbuf,'(a,L5,a)')
387 gforget 1.10 &' ctrlUseGen = ',ctrlUseGen,
388 gforget 1.9 &' /* use generic controls */'
389     call print_message( msgbuf, standardmessageunit,
390     & SQUEEZE_RIGHT , mythid)
391    
392    
393     #ifdef ALLOW_GENARR2D_CONTROL
394     do iarr = 1, maxCtrlArr2D
395     if (xx_genarr2d_weight(iarr).NE.' ') then
396    
397     write(msgbuf,'(a,i2,a)')
398     &' -> 2D control, genarr2d no. ',iarr,
399     &' is in use'
400     call print_message( msgbuf, standardmessageunit,
401     & SQUEEZE_RIGHT , mythid)
402    
403     il = ILNBLNK( xx_genarr2d_file(iarr) )
404     write(msgbuf,'(a,a)')
405     &' file = ',xx_genarr2d_file(iarr)(1:il)
406     call print_message( msgbuf, standardmessageunit,
407     & SQUEEZE_RIGHT , mythid)
408     il = ILNBLNK( xx_genarr2d_weight(iarr) )
409     write(msgbuf,'(a,a)')
410     &' weight = ',xx_genarr2d_weight(iarr)(1:il)
411     call print_message( msgbuf, standardmessageunit,
412     & SQUEEZE_RIGHT , mythid)
413     write(msgbuf,'(a,i5)')
414     &' smoother = ',xx_genarr2d_numsmooth(iarr)
415     call print_message( msgbuf, standardmessageunit,
416     & SQUEEZE_RIGHT , mythid)
417    
418     endif
419     enddo
420     #endif
421    
422    
423     #ifdef ALLOW_GENARR3D_CONTROL
424     do iarr = 1, maxCtrlArr3D
425     if (xx_genarr3d_weight(iarr).NE.' ') then
426    
427     write(msgbuf,'(a,i2,a)')
428     &' -> 3d control, genarr3d no. ',iarr,
429     &' is in use'
430     call print_message( msgbuf, standardmessageunit,
431     & SQUEEZE_RIGHT , mythid)
432    
433     il = ILNBLNK( xx_genarr3d_file(iarr) )
434     write(msgbuf,'(a,a)')
435     &' file = ',xx_genarr3d_file(iarr)(1:il)
436     call print_message( msgbuf, standardmessageunit,
437     & SQUEEZE_RIGHT , mythid)
438     il = ILNBLNK( xx_genarr3d_weight(iarr) )
439     write(msgbuf,'(a,a)')
440     &' weight = ',xx_genarr3d_weight(iarr)(1:il)
441     call print_message( msgbuf, standardmessageunit,
442     & SQUEEZE_RIGHT , mythid)
443     write(msgbuf,'(a,i5)')
444     &' smoother = ',xx_genarr3d_numsmooth(iarr)
445     call print_message( msgbuf, standardmessageunit,
446     & SQUEEZE_RIGHT , mythid)
447    
448     endif
449     enddo
450     #endif
451    
452     #ifdef ALLOW_GENTIM2D_CONTROL
453     do iarr = 1, maxCtrlTim2D
454     if (xx_gentim2d_weight(iarr).NE.' ') then
455    
456     write(msgbuf,'(a,i2,a)')
457     &' -> time variable 2D control, gentim2d no. ',iarr,
458     &' is in use'
459     call print_message( msgbuf, standardmessageunit,
460     & SQUEEZE_RIGHT , mythid)
461    
462     il = ILNBLNK( xx_gentim2d_file(iarr) )
463     write(msgbuf,'(a,a)')
464     &' file = ',xx_gentim2d_file(iarr)(1:il)
465     call print_message( msgbuf, standardmessageunit,
466     & SQUEEZE_RIGHT , mythid)
467    
468     il = ILNBLNK( xx_gentim2d_weight(iarr) )
469     write(msgbuf,'(a,a)')
470     &' weight = ',xx_gentim2d_weight(iarr)(1:il)
471     call print_message( msgbuf, standardmessageunit,
472     & SQUEEZE_RIGHT , mythid)
473    
474     #ifdef ALLOW_CAL
475     call cal_TimeInterval( xx_gentim2d_period(iarr),
476     & 'secs', timeint, mythid )
477     write(msgbuf,'(a,i9.8,i7.6)')
478     &' period = ',(timeint(i), i=1,2)
479     call print_message( msgbuf, standardmessageunit,
480     & SQUEEZE_RIGHT , mythid)
481     #endif
482    
483     write(msgbuf,'(a,i5)')
484     &' smoother = ',xx_gentim2d_numsmooth(iarr)
485     call print_message( msgbuf, standardmessageunit,
486     & SQUEEZE_RIGHT , mythid)
487    
488     write(msgbuf,'(a,L5)')
489     &' cumsum = ',xx_gentim2d_cumsum(iarr)
490     call print_message( msgbuf, standardmessageunit,
491     & SQUEEZE_RIGHT , mythid)
492    
493     write(msgbuf,'(a,L5)')
494     &' glosum = ',xx_gentim2d_glosum(iarr)
495     call print_message( msgbuf, standardmessageunit,
496     & SQUEEZE_RIGHT , mythid)
497    
498     endif
499     enddo
500     #endif
501    
502    
503     #endif
504 gforget 1.8
505 heimbach 1.2 write(msgbuf,'(a)')
506     &' '
507     call print_message( msgbuf, standardmessageunit,
508     & SQUEEZE_RIGHT , mythid)
509     write(msgbuf,'(a)')
510     &'// ======================================================='
511     call print_message( msgbuf, standardmessageunit,
512     & SQUEEZE_RIGHT , mythid)
513     write(msgbuf,'(a)')
514 gforget 1.11 &'// control vector configuration >>> END <<<'
515 heimbach 1.2 call print_message( msgbuf, standardmessageunit,
516     & SQUEEZE_RIGHT , mythid)
517     write(msgbuf,'(a)')
518     &'// ======================================================='
519     call print_message( msgbuf, standardmessageunit,
520     & SQUEEZE_RIGHT , mythid)
521     write(msgbuf,'(a)')
522     &' '
523     call print_message( msgbuf, standardmessageunit,
524     & SQUEEZE_RIGHT , mythid)
525    
526     return
527     end
528    

  ViewVC Help
Powered by ViewVC 1.1.22