/[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.14 - (hide annotations) (download)
Tue Feb 5 15:13:01 2008 UTC (16 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59q, checkpoint59p, checkpoint59o, checkpoint59n
Changes since 1.13: +19 -16 lines
File MIME type: text/plain
In order to deal with large number of diagnostics (happens with large number
of tracers), store diagnostic mate number in dedicate array "hdiag":
- new version of S/R DIAGNOSTICS_ADD2LIST : DIAGNOSTICS_ADDTOLIST
  with 1 more argument (mate number).
- change old version of DIAGNOSTICS_ADD2LIST to extract mate number
  from parsing code and then call DIAGNOSTICS_ADDTOLIST
- modify setting, filling & output to use "hdiag" instead of reading
  mate number from gdiag.

1 jmc 1.14 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/DIAGNOSTICS.h,v 1.13 2006/06/05 18:15:53 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.14 C cdiag :: list of available diagnostic names
10 jmc 1.13 C tdiag :: description of field in diagnostic
11 jmc 1.14 C gdiag :: parser field with characteristics of the diagnostics
12     C hdiag :: mate number (in available diag. list) of the diagnostic
13 jmc 1.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.13 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_STATIS contains the user selection of statistics to write
24 jmc 1.1 C ======================================================================
25    
26 jmc 1.13 C-- DIAG_DEFINE common block:
27 jmc 1.14 C ndiagt :: total number of available diagnostics
28     C kdiag :: number of levels associated with the diagnostic
29     C cdiag :: list of available diagnostic names
30     C tdiag :: description of field in diagnostic
31     C gdiag :: parser field with characteristics of the diagnostics
32     C hdiag :: mate number (in available diag. list) of the diagnostic
33     C udiag :: physical units of the diagnostic field
34 jmc 1.13
35     INTEGER ndiagt
36     INTEGER kdiag(ndiagMax)
37 jmc 1.14 INTEGER hdiag(ndiagMax)
38 jmc 1.13 CHARACTER*8 cdiag(ndiagMax)
39     CHARACTER*80 tdiag(ndiagMax)
40     CHARACTER*16 gdiag(ndiagMax)
41     CHARACTER*16 udiag(ndiagMax)
42    
43     COMMON / DIAG_DEFINE /
44 jmc 1.14 & ndiagt, kdiag, hdiag,
45 jmc 1.13 & cdiag, tdiag, gdiag, udiag
46    
47     C-- DIAG_STORE common block:
48 jmc 1.14 C qdiag :: storage array for 2D/3D diagnostic fields
49 jmc 1.13 C qSdiag :: storage array for (per level) statistics
50 jmc 1.14 C ndiag :: holds number of times a diagnostic is filled (for time-mean diag)
51 jmc 1.13 C pdiag :: index of current averaging interval within the averaging-cycle
52 jmc 1.1
53 jmc 1.14 _RL qdiag(1-OLx:sNx+Olx,1-Oly:sNy+Oly,numDiags,nSx,nSy)
54 jmc 1.8 _RL qSdiag(0:nStats,0:nRegions,diagSt_size,nSx,nSy)
55 jmc 1.14 INTEGER ndiag(numDiags,nSx,nSy)
56 jmc 1.13 INTEGER pdiag(numlists,nSx,nSy)
57 jmc 1.1
58 jmc 1.13 COMMON / DIAG_STORE / qdiag, qSdiag, ndiag, pdiag
59 jmc 1.1
60 jmc 1.8
61 jmc 1.13 C-- DIAG_SELECT common block:
62     C freq :: frequency (in s) to write output stream # n
63     C phase :: phase (in s) to write output stream # n
64     C averageFreq :: frequency (in s) for periodic averaging interval
65     C averagePhase:: phase (in s) for periodic averaging interval
66     C averageCycle:: number of averaging intervals in 1 cycle
67     C nfields(n) :: number of active diagnostics for output stream # n
68     C nActive(n) :: number of active diagnostics (including counters)
69     C for output stream # n
70     C nlists :: effective number of output streams
71     C idiag :: slot number in large diagnostic array
72     C mdiag :: slot number in large diagnostic array for the mate
73     C jdiag :: short-list (active diag.) to long-list (available diag.) pointer
74     C flds(:,n) :: list of field names in output stream # n
75     C fnames(n) :: output file name for output stream # n
76     C fflags(n) :: character string with per-file flags
77 jmc 1.1
78 jmc 1.7 _RL freq(numlists), phase(numlists)
79 jmc 1.10 _RL levs (numLevels,numlists)
80 jmc 1.13 _RL averageFreq(numlists), averagePhase(numlists)
81     INTEGER averageCycle(numlists)
82     INTEGER nlevels(numlists)
83     INTEGER nfields(numlists)
84     INTEGER nActive(numlists)
85     INTEGER nlists
86     INTEGER idiag(numperlist,numlists)
87     INTEGER mdiag(numperlist,numlists)
88     INTEGER jdiag(numperlist,numlists)
89     CHARACTER*8 flds (numperlist,numlists)
90     CHARACTER*80 fnames(numlists)
91     CHARACTER*8 fflags(numlists)
92     LOGICAL dumpAtLast, diag_mdsio, diag_mnc
93     LOGICAL diag_pickup_read, diag_pickup_write
94     LOGICAL diag_pickup_read_mdsio, diag_pickup_write_mdsio
95     LOGICAL diag_pickup_read_mnc, diag_pickup_write_mnc
96    
97     COMMON / DIAG_SELECT /
98     & freq, phase, levs,
99     & averageFreq, averagePhase, averageCycle,
100     & nlevels, nfields, nActive, nlists,
101 jmc 1.10 & idiag, mdiag, jdiag,
102 jmc 1.13 & dumpAtLast, diag_mdsio, diag_mnc,
103 edhill 1.3 & diag_pickup_read, diag_pickup_write,
104     & diag_pickup_read_mdsio, diag_pickup_write_mdsio,
105 jmc 1.10 & diag_pickup_read_mnc, diag_pickup_write_mnc,
106     & flds, fnames, fflags
107 jmc 1.1
108 jmc 1.8 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
109    
110 jmc 1.13 C-- DIAG_STATIS common block:
111 jmc 1.12 C iSdiag :: slot number in large diagnostic array
112     C mSdiag :: slot number in large diagnostic array for the mate
113     C jSdiag :: short-list (active diag.) to long-list (available diag.)
114     C pointer
115     C diagSt_region(j,n) :: flag to perform (=1) or not (=0) regional-statistics
116     C over region # j for output stream # n
117     C diagSt_freq(n) :: frequency (in s) to write output stream # n
118     C diagSt_phase(n) :: phase (in s) to write output stream # n
119     C diagSt_nbFlds(n) :: number of active diagnostics for output stream # n
120     C diagSt_nbActv(n) :: number of active diagnostics (including counters)
121     C for output stream # n
122     C diagSt_nbLists :: effective number of output streams
123     C diagSt_ioUnit(n) :: fortran IO unit for output stream # n (ascii output)
124     C diagSt_Flds(:,n) :: list of field names in output stream # n
125     C diagSt_Fname(n) :: output file name for output stream # n
126    
127 jmc 1.8 _RL diagSt_freq(numlists), diagSt_phase(numlists)
128     CHARACTER*8 diagSt_Flds(numperlist,numlists)
129     CHARACTER*80 diagSt_Fname(numlists)
130 jmc 1.10 INTEGER iSdiag(numperlist,numlists)
131 jmc 1.8 INTEGER jSdiag(numperlist,numlists)
132 jmc 1.10 INTEGER mSdiag(numperlist,numlists)
133 jmc 1.8 INTEGER diagSt_region(0:nRegions,numlists)
134     INTEGER diagSt_nbFlds(numlists)
135     INTEGER diagSt_nbActv(numlists)
136     INTEGER diagSt_nbLists
137     INTEGER diagSt_ioUnit(numlists)
138     LOGICAL diagSt_ascii, diagSt_mnc
139 jmc 1.10 COMMON / DIAG_STATIS /
140     & diagSt_freq, diagSt_phase,
141     & iSdiag, jSdiag, mSdiag, diagSt_region,
142 jmc 1.8 & diagSt_nbFlds, diagSt_nbActv, diagSt_nbLists,
143     & diagSt_ioUnit,
144 jmc 1.10 & diagSt_Ascii, diagSt_mnc,
145     & diagSt_Flds, diagSt_Fname
146 jmc 1.1
147     CEH3 ;;; Local Variables: ***
148     CEH3 ;;; mode:fortran ***
149     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22