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