/[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.20 - (hide annotations) (download)
Wed Aug 14 00:54:05 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64o, checkpoint64n, checkpoint65, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.19: +22 -5 lines
File MIME type: text/plain
add a parameter (diag_pkgSatus) to track the status of the pkg activation;
this replace/extend the use of logical param "settingDiags" (to check
when adding diag to the list) to also check any DIAGNOSTICS_[]FILL* call.

1 jmc 1.20 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.19 2013/02/06 21:25:49 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.17 C useMissingValue :: put MissingValue where mask = 0 (NetCDF output only)
105 jmc 1.1
106 jmc 1.17 _RL freq(numLists), phase(numLists)
107     _RL averageFreq(numLists), averagePhase(numLists)
108 jmc 1.19 _RL misValFlt(numLists)
109 jmc 1.17 _RL levs (numLevels,numLists)
110     INTEGER averageCycle(numLists)
111 jmc 1.19 c INTEGER misValInt(numLists)
112 jmc 1.17 INTEGER nlevels(numLists)
113     INTEGER nfields(numLists)
114     INTEGER nActive(numLists)
115 jmc 1.13 INTEGER nlists
116 jmc 1.17 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 jmc 1.18 LOGICAL diag_mdsio, diag_mnc, useMissingValue
123 jmc 1.13
124 jmc 1.16 COMMON / DIAG_SELECT_R /
125     & freq, phase, averageFreq, averagePhase,
126 jmc 1.19 & misValFlt, levs
127 jmc 1.16 COMMON / DIAG_SELECT_I /
128 jmc 1.19 & averageCycle,
129 jmc 1.16 & nlevels, nfields, nActive,
130     & nlists, idiag, mdiag, jdiag
131 jmc 1.19 c & , misValInt
132 jmc 1.16 COMMON / DIAG_SELECT_C /
133     & flds, fnames, fflags
134     COMMON / DIAG_SELECT_L /
135 jmc 1.18 & 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     INTEGER diagLoc_ioUnit
143     LOGICAL dumpAtLast
144     LOGICAL diag_pickup_read, diag_pickup_write
145     LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio
146     LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc
147    
148     COMMON / DIAG_PARAMS_I /
149     & diagLoc_ioUnit
150     COMMON / DIAG_PARAMS_L /
151     & dumpAtLast,
152 edhill 1.3 & diag_pickup_read, diag_pickup_write,
153     & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
154 jmc 1.16 & diag_pickup_read_mnc, diag_pickup_write_mnc
155 jmc 1.1
156 jmc 1.8 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
157    
158 jmc 1.13 C-- DIAG_STATIS common block:
159 jmc 1.16 C diagSt_freq(n) :: frequency (in s) to write output stream # n
160     C diagSt_phase(n) :: phase (in s) to write output stream # n
161     C iSdiag(:,n) :: list of diag slot number in long-list of available diag.
162     C mSdiag(:,n) :: list of mate slot number in long-list of available diag.
163     C jSdiag(:,n) :: short-list (active diag.) to long-list (available
164     C diag.) pointer
165 jmc 1.12 C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics
166     C over region # j for output stream # n
167     C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n
168     C diagSt_nbActv(n) :: number of active diagnostics (including counters)
169     C for output stream # n
170     C diagSt_nbLists :: effective number of output streams
171     C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output)
172     C diagSt_Flds(:,n) :: list of field names in output stream # n
173     C diagSt_Fname(n) :: output file name for output stream # n
174    
175 jmc 1.17 _RL diagSt_freq(numLists), diagSt_phase(numLists)
176     INTEGER iSdiag(numperList,numLists)
177     INTEGER mSdiag(numperList,numLists)
178     INTEGER jSdiag(numperList,numLists)
179     INTEGER diagSt_region(0:nRegions,numLists)
180     INTEGER diagSt_nbFlds(numLists)
181     INTEGER diagSt_nbActv(numLists)
182 jmc 1.8 INTEGER diagSt_nbLists
183 jmc 1.17 INTEGER diagSt_ioUnit(numLists)
184     CHARACTER*8 diagSt_Flds(numperList,numLists)
185     CHARACTER*80 diagSt_Fname(numLists)
186 jmc 1.8 LOGICAL diagSt_ascii, diagSt_mnc
187 jmc 1.16
188     COMMON / DIAG_STATIS_R /
189     & diagSt_freq, diagSt_phase
190     COMMON / DIAG_STATIS_I /
191     & iSdiag, mSdiag, jSdiag, diagSt_region,
192 jmc 1.8 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
193 jmc 1.16 & diagSt_ioUnit
194     COMMON / DIAG_STATIS_C /
195 jmc 1.10 & diagSt_Flds, diagSt_Fname
196 jmc 1.16 COMMON / DIAG_STATIS_L /
197     & diagSt_Ascii, diagSt_mnc
198 jmc 1.1
199     CEH3 ;;; Local Variables: ***
200     CEH3 ;;; mode:fortran ***
201     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22