1 |
C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.17 2011/06/27 22:23:09 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_DEFINE common block: |
28 |
C ndiagt :: total number of available diagnostics |
29 |
C kdiag :: number of levels associated with the diagnostic |
30 |
C hdiag :: mate number (in available diag. list) of the diagnostic |
31 |
C cdiag :: list of available diagnostic names |
32 |
C gdiag :: parser field with characteristics of the diagnostics |
33 |
C tdiag :: description of field in diagnostic |
34 |
C udiag :: physical units of the diagnostic field |
35 |
C settingDiags :: internal flag: enable adding/changing available diagnostics list |
36 |
|
37 |
INTEGER ndiagt |
38 |
INTEGER kdiag(ndiagMax) |
39 |
INTEGER hdiag(ndiagMax) |
40 |
CHARACTER*8 cdiag(ndiagMax) |
41 |
CHARACTER*80 tdiag(ndiagMax) |
42 |
CHARACTER*16 gdiag(ndiagMax) |
43 |
CHARACTER*16 udiag(ndiagMax) |
44 |
LOGICAL settingDiags |
45 |
|
46 |
COMMON / DIAG_DEFINE_I / |
47 |
& ndiagt, kdiag, hdiag |
48 |
COMMON / DIAG_DEFINE_C / |
49 |
& cdiag, gdiag, tdiag, udiag |
50 |
COMMON / DIAG_DEFINE_L / |
51 |
& settingDiags |
52 |
|
53 |
C-- DIAG_STORE common block: |
54 |
C qdiag :: storage array for 2D/3D diagnostic fields |
55 |
C qSdiag :: storage array for (per level) statistics |
56 |
C ndiag :: holds number of times a diagnostic is filled (for time-mean diag) |
57 |
C pdiag :: index of current averaging interval within the averaging-cycle |
58 |
|
59 |
_RL qdiag(1-OLx:sNx+Olx,1-Oly:sNy+Oly,numDiags,nSx,nSy) |
60 |
_RL qSdiag(0:nStats,0:nRegions,diagSt_size,nSx,nSy) |
61 |
INTEGER ndiag(numDiags,nSx,nSy) |
62 |
INTEGER pdiag(numLists,nSx,nSy) |
63 |
|
64 |
COMMON / DIAG_STORE_R / qdiag, qSdiag |
65 |
COMMON / DIAG_STORE_I / ndiag, pdiag |
66 |
|
67 |
C-- DIAG_SELECT common block: |
68 |
C freq(n) :: frequency (in s) to write output stream # n |
69 |
C phase(n) :: phase (in s) to write output stream # n |
70 |
C averageFreq :: frequency (in s) for periodic averaging interval |
71 |
C averagePhase:: phase (in s) for periodic averaging interval |
72 |
C averageCycle:: number of averaging intervals in 1 cycle |
73 |
C misvalFlt(n):: missing value for floats to use in output stream #n |
74 |
C misvalInt(n):: missing value for integers to use in output stream #n |
75 |
C levs(:,n) :: list of selected levels to write for output stream # n |
76 |
C nlevels(n) :: number of levels to write for output stream # n |
77 |
C nfields(n) :: number of active diagnostics for output stream # n |
78 |
C nActive(n) :: number of active diagnostics (including counters) |
79 |
C for output stream # n |
80 |
C nlists :: effective number of output streams |
81 |
C idiag(:,n) :: list of diag slot number in long-list of available diag. |
82 |
C mdiag(:,n) :: list of mate slot number in long-list of available diag. |
83 |
C jdiag(:,n) :: short-list (active diag.) to long-list (available diag.) pointer |
84 |
C flds(:,n) :: list of field names in output stream # n |
85 |
C fnames(n) :: output file name for output stream # n |
86 |
C fflags(n) :: character string with per-file flags |
87 |
C useMissingValue :: put MissingValue where mask = 0 (NetCDF output only) |
88 |
|
89 |
_RL freq(numLists), phase(numLists) |
90 |
_RL averageFreq(numLists), averagePhase(numLists) |
91 |
_RL misvalFlt(numLists) |
92 |
_RL levs (numLevels,numLists) |
93 |
INTEGER averageCycle(numLists) |
94 |
INTEGER misvalInt(numLists) |
95 |
INTEGER nlevels(numLists) |
96 |
INTEGER nfields(numLists) |
97 |
INTEGER nActive(numLists) |
98 |
INTEGER nlists |
99 |
INTEGER idiag(numperList,numLists) |
100 |
INTEGER mdiag(numperList,numLists) |
101 |
INTEGER jdiag(numperList,numLists) |
102 |
CHARACTER*8 flds (numperList,numLists) |
103 |
CHARACTER*80 fnames(numLists) |
104 |
CHARACTER*8 fflags(numLists) |
105 |
LOGICAL diag_mdsio, diag_mnc, useMissingValue |
106 |
|
107 |
COMMON / DIAG_SELECT_R / |
108 |
& freq, phase, averageFreq, averagePhase, |
109 |
& misvalFlt, levs |
110 |
COMMON / DIAG_SELECT_I / |
111 |
& averageCycle, misvalInt, |
112 |
& nlevels, nfields, nActive, |
113 |
& nlists, idiag, mdiag, jdiag |
114 |
COMMON / DIAG_SELECT_C / |
115 |
& flds, fnames, fflags |
116 |
COMMON / DIAG_SELECT_L / |
117 |
& diag_mdsio, diag_mnc, useMissingValue |
118 |
|
119 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
120 |
|
121 |
C - DIAG_PARAMS common block: |
122 |
C diagLoc_ioUnit :: internal parameter: I/O unit for local diagnostics output |
123 |
C dumpAtLast :: always write time-ave (freq>0) diagnostics at the end of the run |
124 |
INTEGER diagLoc_ioUnit |
125 |
LOGICAL dumpAtLast |
126 |
LOGICAL diag_pickup_read, diag_pickup_write |
127 |
LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio |
128 |
LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc |
129 |
|
130 |
COMMON / DIAG_PARAMS_I / |
131 |
& diagLoc_ioUnit |
132 |
COMMON / DIAG_PARAMS_L / |
133 |
& dumpAtLast, |
134 |
& diag_pickup_read, diag_pickup_write, |
135 |
& diag_pickup_read_mdsio, diag_pickup_write_mdsio, |
136 |
& diag_pickup_read_mnc, diag_pickup_write_mnc |
137 |
|
138 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
139 |
|
140 |
C-- DIAG_STATIS common block: |
141 |
C diagSt_freq(n) :: frequency (in s) to write output stream # n |
142 |
C diagSt_phase(n) :: phase (in s) to write output stream # n |
143 |
C iSdiag(:,n) :: list of diag slot number in long-list of available diag. |
144 |
C mSdiag(:,n) :: list of mate slot number in long-list of available diag. |
145 |
C jSdiag(:,n) :: short-list (active diag.) to long-list (available |
146 |
C diag.) pointer |
147 |
C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics |
148 |
C over region # j for output stream # n |
149 |
C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n |
150 |
C diagSt_nbActv(n) :: number of active diagnostics (including counters) |
151 |
C for output stream # n |
152 |
C diagSt_nbLists :: effective number of output streams |
153 |
C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output) |
154 |
C diagSt_Flds(:,n) :: list of field names in output stream # n |
155 |
C diagSt_Fname(n) :: output file name for output stream # n |
156 |
|
157 |
_RL diagSt_freq(numLists), diagSt_phase(numLists) |
158 |
INTEGER iSdiag(numperList,numLists) |
159 |
INTEGER mSdiag(numperList,numLists) |
160 |
INTEGER jSdiag(numperList,numLists) |
161 |
INTEGER diagSt_region(0:nRegions,numLists) |
162 |
INTEGER diagSt_nbFlds(numLists) |
163 |
INTEGER diagSt_nbActv(numLists) |
164 |
INTEGER diagSt_nbLists |
165 |
INTEGER diagSt_ioUnit(numLists) |
166 |
CHARACTER*8 diagSt_Flds(numperList,numLists) |
167 |
CHARACTER*80 diagSt_Fname(numLists) |
168 |
LOGICAL diagSt_ascii, diagSt_mnc |
169 |
|
170 |
COMMON / DIAG_STATIS_R / |
171 |
& diagSt_freq, diagSt_phase |
172 |
COMMON / DIAG_STATIS_I / |
173 |
& iSdiag, mSdiag, jSdiag, diagSt_region, |
174 |
& diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists, |
175 |
& diagSt_ioUnit |
176 |
COMMON / DIAG_STATIS_C / |
177 |
& diagSt_Flds, diagSt_Fname |
178 |
COMMON / DIAG_STATIS_L / |
179 |
& diagSt_Ascii, diagSt_mnc |
180 |
|
181 |
CEH3 ;;; Local Variables: *** |
182 |
CEH3 ;;; mode:fortran *** |
183 |
CEH3 ;;; End: *** |