/[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.23 - (show annotations) (download)
Sun Jul 23 00:42:28 2017 UTC (6 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, HEAD
Changes since 1.22: +4 -1 lines
File MIME type: text/plain
update description

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.22 2017/01/11 20:49:30 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 hdiag :: mate number (in available diag. list) of the diagnostic
10 C cdiag :: list of available diagnostic names
11 C gdiag :: parser field with characteristics of the diagnostics
12 C tdiag :: description of field in 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_PARAMS contains general parameters (used for both 2D/3D & Stats diags)
24 C - DIAG_STATIS contains the user selection of statistics-diags to write
25 C ======================================================================
26
27 C-- DIAG_STATUS common block:
28 C diag_pkgStatus :: internal parameter to track status of this pkg settings
29 C = -1 :: pkg is not used ; = 1 :: user params are loaded
30 C = 2 :: early initialisation is done (enable to add diags to list)
31 C = 3 :: diagnostics setting is done (no more diags to add to list)
32 C = 10 :: storage is initialised (init_varia)
33 C = 20 :: ready for active section (filling diagnostics & output)
34 C = 99 :: active section is over (end of the run)
35 C ready2setDiags :: pkgStatus level required to add any diagnostics to list
36 C ready2fillDiags :: pkgStatus level required to fill any diagnostics
37 C blkName :: blank diagnostics name
38
39 INTEGER ready2setDiags, ready2fillDiags
40 PARAMETER ( ready2setDiags = 2 , ready2fillDiags = 20 )
41 CHARACTER*8 blkName
42 PARAMETER ( blkName = ' ' )
43
44 INTEGER diag_pkgStatus
45 COMMON / DIAG_STATUS_I /
46 & diag_pkgStatus
47
48 C-- DIAG_DEFINE common block:
49 C ndiagt :: total number of available diagnostics
50 C kdiag :: number of levels associated with the diagnostic
51 C hdiag :: mate number (in available diag. list) of the diagnostic
52 C cdiag :: list of available diagnostic names
53 C gdiag :: parser field with characteristics of the diagnostics
54 C tdiag :: description of field in diagnostic
55 C udiag :: physical units of the diagnostic field
56
57 INTEGER ndiagt
58 INTEGER kdiag(ndiagMax)
59 INTEGER hdiag(ndiagMax)
60 CHARACTER*8 cdiag(ndiagMax)
61 CHARACTER*80 tdiag(ndiagMax)
62 CHARACTER*16 gdiag(ndiagMax)
63 CHARACTER*16 udiag(ndiagMax)
64
65 COMMON / DIAG_DEFINE_I /
66 & ndiagt, kdiag, hdiag
67 COMMON / DIAG_DEFINE_C /
68 & cdiag, gdiag, tdiag, udiag
69
70 C-- DIAG_STORE common block:
71 C qdiag :: storage array for 2D/3D diagnostic fields
72 C qSdiag :: storage array for (per level) statistics
73 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
74 C pdiag :: index of current averaging interval within the averaging-cycle
75
76 _RL qdiag(1-OLx:sNx+OLx,1-OLy:sNy+OLy,numDiags,nSx,nSy)
77 _RL qSdiag(0:nStats,0:nRegions,diagSt_size,nSx,nSy)
78 INTEGER ndiag(numDiags,nSx,nSy)
79 INTEGER pdiag(numLists,nSx,nSy)
80
81 COMMON / DIAG_STORE_R / qdiag, qSdiag
82 COMMON / DIAG_STORE_I / ndiag, pdiag
83
84 C-- DIAG_SELECT common block:
85 C freq(n) :: frequency (in s) to write output stream # n
86 C phase(n) :: phase (in s) to write output stream # n
87 C averageFreq :: frequency (in s) for periodic averaging interval
88 C averagePhase:: phase (in s) for periodic averaging interval
89 C averageCycle:: number of averaging intervals in 1 cycle
90 C misValFlt(n):: missing value for floats to use in output stream #n
91 Cc misValInt(n):: missing value for integers to use in output stream #n
92 C levs(:,n) :: list of selected levels to write for output stream # n
93 C nlevels(n) :: number of levels to write for output stream # n
94 C nfields(n) :: number of active diagnostics for output stream # n
95 C nActive(n) :: number of active diagnostics (including counters)
96 C for output stream # n
97 C nlists :: effective number of output streams
98 C idiag(:,n) :: list of diag slot number in long-list of available diag.
99 C mdiag(:,n) :: list of mate slot number in long-list of available diag.
100 C jdiag(:,n) :: short-list (active diag.) to long-list (available diag.) pointer
101 C flds(:,n) :: list of field names in output stream # n
102 C fnames(n) :: output file name for output stream # n
103 C fflags(n) :: character string with per-file flags
104 C :: 1rst: file precision ('R','D' or ' ' to use default outp prec)
105 C :: 2nd: 'I'; integrate vertically ; 'P': interpolate vertically
106 C :: 3rd: 'h'; cumulate thickness weighted field (if permitted)
107 C useMissingValue :: put MissingValue where mask = 0 (NetCDF output only)
108
109 _RL freq(numLists), phase(numLists)
110 _RL averageFreq(numLists), averagePhase(numLists)
111 _RL misValFlt(numLists)
112 _RL levs (numLevels,numLists)
113 INTEGER averageCycle(numLists)
114 c INTEGER misValInt(numLists)
115 INTEGER nlevels(numLists)
116 INTEGER nfields(numLists)
117 INTEGER nActive(numLists)
118 INTEGER nlists
119 INTEGER idiag(numperList,numLists)
120 INTEGER mdiag(numperList,numLists)
121 INTEGER jdiag(numperList,numLists)
122 CHARACTER*8 flds (numperList,numLists)
123 CHARACTER*80 fnames(numLists)
124 CHARACTER*8 fflags(numLists)
125 LOGICAL diag_mdsio, diag_mnc, useMissingValue
126
127 COMMON / DIAG_SELECT_R /
128 & freq, phase, averageFreq, averagePhase,
129 & misValFlt, levs
130 COMMON / DIAG_SELECT_I /
131 & averageCycle,
132 & nlevels, nfields, nActive,
133 & nlists, idiag, mdiag, jdiag
134 c & , misValInt
135 COMMON / DIAG_SELECT_C /
136 & flds, fnames, fflags
137 COMMON / DIAG_SELECT_L /
138 & diag_mdsio, diag_mnc, useMissingValue
139
140 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
141
142 C - DIAG_PARAMS common block:
143 C diagLoc_ioUnit :: internal parameter: I/O unit for local diagnostics output
144 C dumpAtLast :: always write time-ave (freq>0) diagnostics at the end of the run
145 C diagMdsDir :: directory where diagnostics will be written when using mds
146 C diagMdsDirCreate :: system call to mkdir to create diagMdsDir
147 INTEGER diagLoc_ioUnit
148 LOGICAL dumpAtLast, diagMdsDirCreate
149 LOGICAL diag_pickup_read, diag_pickup_write
150 LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio
151 LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc
152 CHARACTER*(MAX_LEN_FNAM) diagMdsDir
153
154 COMMON / DIAG_PARAMS_I /
155 & diagLoc_ioUnit
156 COMMON / DIAG_PARAMS_L /
157 & dumpAtLast, diagMdsDirCreate,
158 & diag_pickup_read, diag_pickup_write,
159 & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
160 & diag_pickup_read_mnc, diag_pickup_write_mnc
161 COMMON / DIAG_PARAMS_C /
162 & diagMdsDir
163
164 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
165
166 C-- DIAG_STATIS common block:
167 C diagSt_freq(n) :: frequency (in s) to write output stream # n
168 C diagSt_phase(n) :: phase (in s) to write output stream # n
169 C iSdiag(:,n) :: list of diag slot number in long-list of available diag.
170 C mSdiag(:,n) :: list of mate slot number in long-list of available diag.
171 C jSdiag(:,n) :: short-list (active diag.) to long-list (available
172 C diag.) pointer
173 C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics
174 C over region # j for output stream # n
175 C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n
176 C diagSt_nbActv(n) :: number of active diagnostics (including counters)
177 C for output stream # n
178 C diagSt_nbLists :: effective number of output streams
179 C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output)
180 C diagSt_Flds(:,n) :: list of field names in output stream # n
181 C diagSt_Fname(n) :: output file name for output stream # n
182
183 _RL diagSt_freq(numLists), diagSt_phase(numLists)
184 INTEGER iSdiag(numperList,numLists)
185 INTEGER mSdiag(numperList,numLists)
186 INTEGER jSdiag(numperList,numLists)
187 INTEGER diagSt_region(0:nRegions,numLists)
188 INTEGER diagSt_nbFlds(numLists)
189 INTEGER diagSt_nbActv(numLists)
190 INTEGER diagSt_nbLists
191 INTEGER diagSt_ioUnit(numLists)
192 CHARACTER*8 diagSt_Flds(numperList,numLists)
193 CHARACTER*80 diagSt_Fname(numLists)
194 LOGICAL diagSt_ascii, diagSt_mnc
195
196 COMMON / DIAG_STATIS_R /
197 & diagSt_freq, diagSt_phase
198 COMMON / DIAG_STATIS_I /
199 & iSdiag, mSdiag, jSdiag, diagSt_region,
200 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
201 & diagSt_ioUnit
202 COMMON / DIAG_STATIS_C /
203 & diagSt_Flds, diagSt_Fname
204 COMMON / DIAG_STATIS_L /
205 & diagSt_Ascii, diagSt_mnc
206
207 CEH3 ;;; Local Variables: ***
208 CEH3 ;;; mode:fortran ***
209 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22