/[MITgcm]/MITgcm/pkg/diagnostics/DIAGNOSTICS.h
ViewVC logotype

Contents of /MITgcm/pkg/diagnostics/DIAGNOSTICS.h

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


Revision 1.14 - (show annotations) (download)
Tue Feb 5 15:13:01 2008 UTC (16 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59q, checkpoint59p, checkpoint59o, checkpoint59n
Changes since 1.13: +19 -16 lines
File MIME type: text/plain
In order to deal with large number of diagnostics (happens with large number
of tracers), store diagnostic mate number in dedicate array "hdiag":
- new version of S/R DIAGNOSTICS_ADD2LIST : DIAGNOSTICS_ADDTOLIST
  with 1 more argument (mate number).
- change old version of DIAGNOSTICS_ADD2LIST to extract mate number
  from parsing code and then call DIAGNOSTICS_ADDTOLIST
- modify setting, filling & output to use "hdiag" instead of reading
  mate number from gdiag.

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.13 2006/06/05 18:15:53 jmc Exp $
2 C $Name: $
3
4 C ======================================================================
5 C Common blocks for diagnostics package.
6 C - DIAG_DEFINE contains the definition of all available diagnostics
7 C ndiagt :: total number of available diagnostics
8 C kdiag :: number of levels associated with the diagnostic
9 C cdiag :: list of available diagnostic names
10 C tdiag :: description of field in diagnostic
11 C gdiag :: parser field with characteristics of the diagnostics
12 C hdiag :: mate number (in available diag. list) of the diagnostic
13 C udiag :: physical units of the diagnostic field
14 C - DIAG_STORE contains the large array to store diagnostic fields
15 C qdiag :: storage array for 2D/3D diagnostic fields
16 C qSdiag :: storage array for diagnostics of (per level) statistics
17 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
18 C - DIAG_SELECT contains the user selection of diagnostics to write
19 C idiag :: slot number in large diagnostic array
20 C mdiag :: slot number in large diagnostic array for the mate
21 C jdiag :: short-list (active diag.) to long-list (available diag.)
22 C pointer
23 C - DIAG_STATIS contains the user selection of statistics to write
24 C ======================================================================
25
26 C-- DIAG_DEFINE common block:
27 C ndiagt :: total number of available diagnostics
28 C kdiag :: number of levels associated with the diagnostic
29 C cdiag :: list of available diagnostic names
30 C tdiag :: description of field in diagnostic
31 C gdiag :: parser field with characteristics of the diagnostics
32 C hdiag :: mate number (in available diag. list) of the diagnostic
33 C udiag :: physical units of the diagnostic field
34
35 INTEGER ndiagt
36 INTEGER kdiag(ndiagMax)
37 INTEGER hdiag(ndiagMax)
38 CHARACTER*8 cdiag(ndiagMax)
39 CHARACTER*80 tdiag(ndiagMax)
40 CHARACTER*16 gdiag(ndiagMax)
41 CHARACTER*16 udiag(ndiagMax)
42
43 COMMON / DIAG_DEFINE /
44 & ndiagt, kdiag, hdiag,
45 & cdiag, tdiag, gdiag, udiag
46
47 C-- DIAG_STORE common block:
48 C qdiag :: storage array for 2D/3D diagnostic fields
49 C qSdiag :: storage array for (per level) statistics
50 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
51 C pdiag :: index of current averaging interval within the averaging-cycle
52
53 _RL qdiag(1-OLx:sNx+Olx,1-Oly:sNy+Oly,numDiags,nSx,nSy)
54 _RL qSdiag(0:nStats,0:nRegions,diagSt_size,nSx,nSy)
55 INTEGER ndiag(numDiags,nSx,nSy)
56 INTEGER pdiag(numlists,nSx,nSy)
57
58 COMMON / DIAG_STORE / qdiag, qSdiag, ndiag, pdiag
59
60
61 C-- DIAG_SELECT common block:
62 C freq :: frequency (in s) to write output stream # n
63 C phase :: phase (in s) to write output stream # n
64 C averageFreq :: frequency (in s) for periodic averaging interval
65 C averagePhase:: phase (in s) for periodic averaging interval
66 C averageCycle:: number of averaging intervals in 1 cycle
67 C nfields(n) :: number of active diagnostics for output stream # n
68 C nActive(n) :: number of active diagnostics (including counters)
69 C for output stream # n
70 C nlists :: effective number of output streams
71 C idiag :: slot number in large diagnostic array
72 C mdiag :: slot number in large diagnostic array for the mate
73 C jdiag :: short-list (active diag.) to long-list (available diag.) pointer
74 C flds(:,n) :: list of field names in output stream # n
75 C fnames(n) :: output file name for output stream # n
76 C fflags(n) :: character string with per-file flags
77
78 _RL freq(numlists), phase(numlists)
79 _RL levs (numLevels,numlists)
80 _RL averageFreq(numlists), averagePhase(numlists)
81 INTEGER averageCycle(numlists)
82 INTEGER nlevels(numlists)
83 INTEGER nfields(numlists)
84 INTEGER nActive(numlists)
85 INTEGER nlists
86 INTEGER idiag(numperlist,numlists)
87 INTEGER mdiag(numperlist,numlists)
88 INTEGER jdiag(numperlist,numlists)
89 CHARACTER*8 flds (numperlist,numlists)
90 CHARACTER*80 fnames(numlists)
91 CHARACTER*8 fflags(numlists)
92 LOGICAL dumpAtLast, diag_mdsio, diag_mnc
93 LOGICAL diag_pickup_read, diag_pickup_write
94 LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio
95 LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc
96
97 COMMON / DIAG_SELECT /
98 & freq, phase, levs,
99 & averageFreq, averagePhase, averageCycle,
100 & nlevels, nfields, nActive, nlists,
101 & idiag, mdiag, jdiag,
102 & dumpAtLast, diag_mdsio, diag_mnc,
103 & diag_pickup_read, diag_pickup_write,
104 & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
105 & diag_pickup_read_mnc, diag_pickup_write_mnc,
106 & flds, fnames, fflags
107
108 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
109
110 C-- DIAG_STATIS common block:
111 C iSdiag :: slot number in large diagnostic array
112 C mSdiag :: slot number in large diagnostic array for the mate
113 C jSdiag :: short-list (active diag.) to long-list (available diag.)
114 C pointer
115 C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics
116 C over region # j for output stream # n
117 C diagSt_freq(n) :: frequency (in s) to write output stream # n
118 C diagSt_phase(n) :: phase (in s) to write output stream # n
119 C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n
120 C diagSt_nbActv(n) :: number of active diagnostics (including counters)
121 C for output stream # n
122 C diagSt_nbLists :: effective number of output streams
123 C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output)
124 C diagSt_Flds(:,n) :: list of field names in output stream # n
125 C diagSt_Fname(n) :: output file name for output stream # n
126
127 _RL diagSt_freq(numlists), diagSt_phase(numlists)
128 CHARACTER*8 diagSt_Flds(numperlist,numlists)
129 CHARACTER*80 diagSt_Fname(numlists)
130 INTEGER iSdiag(numperlist,numlists)
131 INTEGER jSdiag(numperlist,numlists)
132 INTEGER mSdiag(numperlist,numlists)
133 INTEGER diagSt_region(0:nRegions,numlists)
134 INTEGER diagSt_nbFlds(numlists)
135 INTEGER diagSt_nbActv(numlists)
136 INTEGER diagSt_nbLists
137 INTEGER diagSt_ioUnit(numlists)
138 LOGICAL diagSt_ascii, diagSt_mnc
139 COMMON / DIAG_STATIS /
140 & diagSt_freq, diagSt_phase,
141 & iSdiag, jSdiag, mSdiag, diagSt_region,
142 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
143 & diagSt_ioUnit,
144 & diagSt_Ascii, diagSt_mnc,
145 & diagSt_Flds, diagSt_Fname
146
147 CEH3 ;;; Local Variables: ***
148 CEH3 ;;; mode:fortran ***
149 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22