/[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.21 - (show annotations) (download)
Wed Jan 11 00:22:48 2017 UTC (7 years, 3 months ago) by gforget
Branch: MAIN
Changes since 1.20: +8 -3 lines
File MIME type: text/plain
- add run-time variable diagMdsDir to specify a directory where diagnostics will be written when using mds
- note: cannot be used with either pkg/mnc or mdsioLocalDir that alredy use subirectories

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.20 2013/08/14 00:54:05 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 useMissingValue :: put MissingValue where mask = 0 (NetCDF output only)
105
106 _RL freq(numLists), phase(numLists)
107 _RL averageFreq(numLists), averagePhase(numLists)
108 _RL misValFlt(numLists)
109 _RL levs (numLevels,numLists)
110 INTEGER averageCycle(numLists)
111 c INTEGER misValInt(numLists)
112 INTEGER nlevels(numLists)
113 INTEGER nfields(numLists)
114 INTEGER nActive(numLists)
115 INTEGER nlists
116 INTEGER idiag(numperList,numLists)
117 INTEGER mdiag(numperList,numLists)
118 INTEGER jdiag(numperList,numLists)
119 CHARACTER*8 flds (numperList,numLists)
120 CHARACTER*80 fnames(numLists)
121 CHARACTER*8 fflags(numLists)
122 LOGICAL diag_mdsio, diag_mnc, useMissingValue
123
124 COMMON / DIAG_SELECT_R /
125 & freq, phase, averageFreq, averagePhase,
126 & misValFlt, levs
127 COMMON / DIAG_SELECT_I /
128 & averageCycle,
129 & nlevels, nfields, nActive,
130 & nlists, idiag, mdiag, jdiag
131 c & , misValInt
132 COMMON / DIAG_SELECT_C /
133 & flds, fnames, fflags
134 COMMON / DIAG_SELECT_L /
135 & diag_mdsio, diag_mnc, useMissingValue
136
137 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
138
139 C - DIAG_PARAMS common block:
140 C diagLoc_ioUnit :: internal parameter: I/O unit for local diagnostics output
141 C dumpAtLast :: always write time-ave (freq>0) diagnostics at the end of the run
142 C diagMdsDir :: directory where diagnostics will be written when using mds
143 C diagMdsDirCreate :: system call to mkdir to create diagMdsDir
144 INTEGER diagLoc_ioUnit
145 LOGICAL dumpAtLast, diagMdsDirCreate
146 LOGICAL diag_pickup_read, diag_pickup_write
147 LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio
148 LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc
149 character*(MAX_LEN_FNAM) diagMdsDir
150
151 COMMON / DIAG_PARAMS_I /
152 & diagLoc_ioUnit
153 COMMON / DIAG_PARAMS_L /
154 & dumpAtLast, diagMdsDirCreate,
155 & diag_pickup_read, diag_pickup_write,
156 & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
157 & diag_pickup_read_mnc, diag_pickup_write_mnc
158 COMMON / DIAG_PARAMS_C /
159 & diagMdsDir
160
161 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
162
163 C-- DIAG_STATIS common block:
164 C diagSt_freq(n) :: frequency (in s) to write output stream # n
165 C diagSt_phase(n) :: phase (in s) to write output stream # n
166 C iSdiag(:,n) :: list of diag slot number in long-list of available diag.
167 C mSdiag(:,n) :: list of mate slot number in long-list of available diag.
168 C jSdiag(:,n) :: short-list (active diag.) to long-list (available
169 C diag.) pointer
170 C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics
171 C over region # j for output stream # n
172 C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n
173 C diagSt_nbActv(n) :: number of active diagnostics (including counters)
174 C for output stream # n
175 C diagSt_nbLists :: effective number of output streams
176 C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output)
177 C diagSt_Flds(:,n) :: list of field names in output stream # n
178 C diagSt_Fname(n) :: output file name for output stream # n
179
180 _RL diagSt_freq(numLists), diagSt_phase(numLists)
181 INTEGER iSdiag(numperList,numLists)
182 INTEGER mSdiag(numperList,numLists)
183 INTEGER jSdiag(numperList,numLists)
184 INTEGER diagSt_region(0:nRegions,numLists)
185 INTEGER diagSt_nbFlds(numLists)
186 INTEGER diagSt_nbActv(numLists)
187 INTEGER diagSt_nbLists
188 INTEGER diagSt_ioUnit(numLists)
189 CHARACTER*8 diagSt_Flds(numperList,numLists)
190 CHARACTER*80 diagSt_Fname(numLists)
191 LOGICAL diagSt_ascii, diagSt_mnc
192
193 COMMON / DIAG_STATIS_R /
194 & diagSt_freq, diagSt_phase
195 COMMON / DIAG_STATIS_I /
196 & iSdiag, mSdiag, jSdiag, diagSt_region,
197 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
198 & diagSt_ioUnit
199 COMMON / DIAG_STATIS_C /
200 & diagSt_Flds, diagSt_Fname
201 COMMON / DIAG_STATIS_L /
202 & diagSt_Ascii, diagSt_mnc
203
204 CEH3 ;;; Local Variables: ***
205 CEH3 ;;; mode:fortran ***
206 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22