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

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

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


Revision 1.23 - (hide 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 jmc 1.23 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.22 2017/01/11 20:49:30 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     C ======================================================================
5     C Common blocks for diagnostics package.
6 jmc 1.13 C - DIAG_DEFINE contains the definition of all available diagnostics
7 jmc 1.1 C ndiagt :: total number of available diagnostics
8 jmc 1.13 C kdiag :: number of levels associated with the diagnostic
9 jmc 1.16 C hdiag :: mate number (in available diag. list) of the diagnostic
10 jmc 1.14 C cdiag :: list of available diagnostic names
11 jmc 1.16 C gdiag :: parser field with characteristics of the diagnostics
12 jmc 1.13 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 jmc 1.14 C qdiag :: storage array for 2D/3D diagnostic fields
16 jmc 1.13 C qSdiag :: storage array for diagnostics of (per level) statistics
17 jmc 1.14 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
18 jmc 1.18 C - DIAG_SELECT contains the user selection of diagnostics to write
19 jmc 1.13 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 jmc 1.18 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 jmc 1.1 C ======================================================================
26    
27 jmc 1.20 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 jmc 1.13 C-- DIAG_DEFINE common block:
49 jmc 1.14 C ndiagt :: total number of available diagnostics
50     C kdiag :: number of levels associated with the diagnostic
51 jmc 1.16 C hdiag :: mate number (in available diag. list) of the diagnostic
52 jmc 1.14 C cdiag :: list of available diagnostic names
53 jmc 1.16 C gdiag :: parser field with characteristics of the diagnostics
54 jmc 1.14 C tdiag :: description of field in diagnostic
55     C udiag :: physical units of the diagnostic field
56 jmc 1.13
57     INTEGER ndiagt
58     INTEGER kdiag(ndiagMax)
59 jmc 1.14 INTEGER hdiag(ndiagMax)
60 jmc 1.13 CHARACTER*8 cdiag(ndiagMax)
61     CHARACTER*80 tdiag(ndiagMax)
62     CHARACTER*16 gdiag(ndiagMax)
63     CHARACTER*16 udiag(ndiagMax)
64    
65 jmc 1.16 COMMON / DIAG_DEFINE_I /
66     & ndiagt, kdiag, hdiag
67     COMMON / DIAG_DEFINE_C /
68     & cdiag, gdiag, tdiag, udiag
69 jmc 1.13
70     C-- DIAG_STORE common block:
71 jmc 1.14 C qdiag :: storage array for 2D/3D diagnostic fields
72 jmc 1.13 C qSdiag :: storage array for (per level) statistics
73 jmc 1.14 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
74 jmc 1.13 C pdiag :: index of current averaging interval within the averaging-cycle
75 jmc 1.1
76 jmc 1.19 _RL qdiag(1-OLx:sNx+OLx,1-OLy:sNy+OLy,numDiags,nSx,nSy)
77 jmc 1.8 _RL qSdiag(0:nStats,0:nRegions,diagSt_size,nSx,nSy)
78 jmc 1.14 INTEGER ndiag(numDiags,nSx,nSy)
79 jmc 1.17 INTEGER pdiag(numLists,nSx,nSy)
80 jmc 1.1
81 jmc 1.16 COMMON / DIAG_STORE_R / qdiag, qSdiag
82     COMMON / DIAG_STORE_I / ndiag, pdiag
83 jmc 1.1
84 jmc 1.13 C-- DIAG_SELECT common block:
85 jmc 1.16 C freq(n) :: frequency (in s) to write output stream # n
86     C phase(n) :: phase (in s) to write output stream # n
87 jmc 1.13 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 jmc 1.19 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 jmc 1.16 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 jmc 1.13 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 jmc 1.16 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 jmc 1.13 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 jmc 1.23 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 jmc 1.17 C useMissingValue :: put MissingValue where mask = 0 (NetCDF output only)
108 jmc 1.1
109 jmc 1.17 _RL freq(numLists), phase(numLists)
110     _RL averageFreq(numLists), averagePhase(numLists)
111 jmc 1.19 _RL misValFlt(numLists)
112 jmc 1.17 _RL levs (numLevels,numLists)
113     INTEGER averageCycle(numLists)
114 jmc 1.19 c INTEGER misValInt(numLists)
115 jmc 1.17 INTEGER nlevels(numLists)
116     INTEGER nfields(numLists)
117     INTEGER nActive(numLists)
118 jmc 1.13 INTEGER nlists
119 jmc 1.17 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 jmc 1.18 LOGICAL diag_mdsio, diag_mnc, useMissingValue
126 jmc 1.13
127 jmc 1.16 COMMON / DIAG_SELECT_R /
128     & freq, phase, averageFreq, averagePhase,
129 jmc 1.19 & misValFlt, levs
130 jmc 1.16 COMMON / DIAG_SELECT_I /
131 jmc 1.19 & averageCycle,
132 jmc 1.16 & nlevels, nfields, nActive,
133     & nlists, idiag, mdiag, jdiag
134 jmc 1.19 c & , misValInt
135 jmc 1.16 COMMON / DIAG_SELECT_C /
136     & flds, fnames, fflags
137     COMMON / DIAG_SELECT_L /
138 jmc 1.18 & 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 gforget 1.21 C diagMdsDir :: directory where diagnostics will be written when using mds
146     C diagMdsDirCreate :: system call to mkdir to create diagMdsDir
147 jmc 1.18 INTEGER diagLoc_ioUnit
148 gforget 1.21 LOGICAL dumpAtLast, diagMdsDirCreate
149 jmc 1.18 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 jmc 1.22 CHARACTER*(MAX_LEN_FNAM) diagMdsDir
153 jmc 1.18
154     COMMON / DIAG_PARAMS_I /
155     & diagLoc_ioUnit
156     COMMON / DIAG_PARAMS_L /
157 gforget 1.21 & dumpAtLast, diagMdsDirCreate,
158 edhill 1.3 & diag_pickup_read, diag_pickup_write,
159     & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
160 jmc 1.16 & diag_pickup_read_mnc, diag_pickup_write_mnc
161 gforget 1.21 COMMON / DIAG_PARAMS_C /
162     & diagMdsDir
163 jmc 1.1
164 jmc 1.8 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
165    
166 jmc 1.13 C-- DIAG_STATIS common block:
167 jmc 1.16 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 jmc 1.12 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 jmc 1.17 _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 jmc 1.8 INTEGER diagSt_nbLists
191 jmc 1.17 INTEGER diagSt_ioUnit(numLists)
192     CHARACTER*8 diagSt_Flds(numperList,numLists)
193     CHARACTER*80 diagSt_Fname(numLists)
194 jmc 1.8 LOGICAL diagSt_ascii, diagSt_mnc
195 jmc 1.16
196     COMMON / DIAG_STATIS_R /
197     & diagSt_freq, diagSt_phase
198     COMMON / DIAG_STATIS_I /
199     & iSdiag, mSdiag, jSdiag, diagSt_region,
200 jmc 1.8 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
201 jmc 1.16 & diagSt_ioUnit
202     COMMON / DIAG_STATIS_C /
203 jmc 1.10 & diagSt_Flds, diagSt_Fname
204 jmc 1.16 COMMON / DIAG_STATIS_L /
205     & diagSt_Ascii, diagSt_mnc
206 jmc 1.1
207     CEH3 ;;; Local Variables: ***
208     CEH3 ;;; mode:fortran ***
209     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22