Back to home page

MITgcm

 
 

    


File indexing completed on 2024-07-17 05:10:40 UTC

view on githubraw file Latest commit acacc28f on 2024-07-17 03:59:01 UTC
09ceb40cd6 Jean*0001 #include "DIAG_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
acacc28f7f Jean*0004 CBOP
09ceb40cd6 Jean*0005 C     !ROUTINE: DIAGNOSTICS_INIT_EARLY
                0006 
                0007 C     !INTERFACE:
                0008       SUBROUTINE DIAGNOSTICS_INIT_EARLY( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Initialize available diagnostics list: set the following attributes:
                0012 C     name (=cdiag), parsing code (=gdiag), units (=udiag), and title (=tdiag)
584089ee44 Jean*0013 C     Note: 1) diagnostics defined here are not presently filled. To use
                0014 C           one of them, one just needs to add a call to S/R DIAGNOSTICS_FILL
                0015 C           with the diagnostic name 'SDIAG...' or 'UDIAG...'
09ceb40cd6 Jean*0016 C           2) GDIAG is defined as character*16 and can be to character*1
                0017 C           parse(16) with the following codes currently defined:
                0018 
acacc28f7f Jean*0019 C \begin{center}
                0020 C   \begin{tabular}[h]{|c|c|}\hline
                0021 C     \textbf{Positions} & \textbf{Characters} & \textbf{Meanings} \\\hline
                0022 C     parse(1)  &  S  &  scalar \\
                0023 C               &  U  &  vector component in X direction \\
                0024 C               &  V  &  vector component in Y direction \\
                0025 C               &  W  &  vector component in vertical direction \\
                0026 C     parse(2)  &  U  &  C-grid U-Point  \\
                0027 C               &  V  &  C-grid V-Point  \\
                0028 C               &  M  &  C-grid Mass Point  \\
                0029 C               &  Z  &  C-grid Corner Point  \\
                0030 C     parse(3)  &     &  Used for Level Integrated output: cumulate levels \\
                0031 C               &  r  &  same but cumulate product by model level thickness \\
                0032 C               &  R  &  same but cumulate product by hFac & level thickness \\
                0033 C     parse(4)  &  P  &  positive definite  \\
                0034 C               &  A  &  Adjoint variable diagnostics \\
                0035 C     parse(5 ) &  C  &  with counter array  \\
                0036 C               &  P  &  post-processed (not filled up) from other diags  \\
                0037 C               &  D  &  disable an array for output  \\
                0038 C     parse(6--8) & '123'  & retired, formerly: 3-digit mate number \\
                0039 C     parse(9)  &  U  &  model-level plus 1/2  \\
                0040 C               &  M  &  model-level middle  \\
                0041 C               &  L  &  model-level minus 1/2  \\
                0042 C     parse(10) &  0  &  levels = 0  \\
                0043 C               &  1  &  levels = 1  \\
                0044 C               &  R  &  levels = Nr  \\
                0045 C               &  L  &  levels = MAX(Nr,NrPhys)  \\
                0046 C               &  M  &  levels = MAX(Nr,NrPhys) - 1  \\
                0047 C               &  G  &  levels = Ground_level Number \\
                0048 C               &  I  &  levels = sea-Ice_level Number \\
                0049 C               &  X  &  free levels option (need to be set explicitly) \\
                0050 C   \end{tabular}
                0051 C \end{center}
09ceb40cd6 Jean*0052 
                0053 C     !USES:
e3e2b00dee Jean*0054       IMPLICIT NONE
09ceb40cd6 Jean*0055 #include "SIZE.h"
                0056 #include "EEPARAMS.h"
                0057 #include "PARAMS.h"
                0058 #include "DIAGNOSTICS_SIZE.h"
                0059 #include "DIAGNOSTICS.h"
                0060 
                0061 C     !INPUT PARAMETERS:
e3e2b00dee Jean*0062       INTEGER myThid
09ceb40cd6 Jean*0063 CEOP
                0064 
e3e2b00dee Jean*0065 C     !LOCAL VARIABLES:
                0066       INTEGER n
09ceb40cd6 Jean*0067 
e3e2b00dee Jean*0068 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0069 
e01144d3ad Jean*0070       _BARRIER
e3e2b00dee Jean*0071       _BEGIN_MASTER( myThid )
                0072 
                0073       DO n=1,ndiagMax
09ceb40cd6 Jean*0074         kdiag(n) = 0
931cda44c0 Jean*0075         hdiag(n) = 0
09ceb40cd6 Jean*0076         cdiag(n) = '        '
                0077         gdiag(n) = '                '
                0078         udiag(n) = '                '
                0079         tdiag(n) = ' '
e3e2b00dee Jean*0080       ENDDO
09ceb40cd6 Jean*0081 
dd249f8e4f Jean*0082 C--   Diagnostics definition/setting starts here (can now add diags to list)
ab43bc12c4 Jean*0083 c     IF ( diag_pkgStatus.NE.1 ) STOP
                0084       diag_pkgStatus = ready2setDiags
dd249f8e4f Jean*0085 
09ceb40cd6 Jean*0086 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0087 C     For each output variable,
584089ee44 Jean*0088 C     specify Name (cdiag, 8c), Descriptions (tdiag, *c), Units (udiag, 16c)
09ceb40cd6 Jean*0089 C         and parsing code (location on C grid, 2D/3D, ...) (gdiag, 16c)
                0090 C----------------------------------------------------------------------
5644fea420 Jean*0091       cdiag( 1) = 'SDIAG1  '
                0092       tdiag( 1) = 'User-Defined   Surface   Diagnostic  #1 '
                0093       udiag( 1) = 'user-defined    '
                0094       gdiag( 1) = 'SM      L1      '
5cbcb662ee Andr*0095 
5644fea420 Jean*0096       cdiag( 2) = 'SDIAG2  '
                0097       tdiag( 2) = 'User-Defined   Surface   Diagnostic  #2 '
                0098       udiag( 2) = 'user-defined    '
                0099       gdiag( 2) = 'SM      L1      '
5cbcb662ee Andr*0100 
                0101       cdiag( 3) = 'SDIAG3  '
5644fea420 Jean*0102       tdiag( 3) = 'User-Defined   Surface   Diagnostic  #3 '
5cbcb662ee Andr*0103       udiag( 3) = 'user-defined    '
                0104       gdiag( 3) = 'SM      L1      '
                0105 
                0106       cdiag( 4) = 'SDIAG4  '
5644fea420 Jean*0107       tdiag( 4) = 'User-Defined   Surface   Diagnostic  #4 '
5cbcb662ee Andr*0108       udiag( 4) = 'user-defined    '
                0109       gdiag( 4) = 'SM      L1      '
                0110 
                0111       cdiag( 5) = 'SDIAG5  '
5644fea420 Jean*0112       tdiag( 5) = 'User-Defined   Surface   Diagnostic  #5 '
5cbcb662ee Andr*0113       udiag( 5) = 'user-defined    '
                0114       gdiag( 5) = 'SM      L1      '
                0115 
                0116       cdiag( 6) = 'SDIAG6  '
5644fea420 Jean*0117       tdiag( 6) = 'User-Defined   Surface   Diagnostic  #6 '
5cbcb662ee Andr*0118       udiag( 6) = 'user-defined    '
                0119       gdiag( 6) = 'SM      L1      '
                0120 
                0121       cdiag( 7) = 'SDIAG7  '
5644fea420 Jean*0122       tdiag( 7) = 'User-Defined U.pt Surface Diagnostic #7 '
5cbcb662ee Andr*0123       udiag( 7) = 'user-defined    '
5644fea420 Jean*0124       gdiag( 7) = 'SU      L1      '
5cbcb662ee Andr*0125 
                0126       cdiag( 8) = 'SDIAG8  '
5644fea420 Jean*0127       tdiag( 8) = 'User-Defined V.pt Surface Diagnostic #8 '
5cbcb662ee Andr*0128       udiag( 8) = 'user-defined    '
5644fea420 Jean*0129       gdiag( 8) = 'SV      L1      '
5cbcb662ee Andr*0130 
                0131       cdiag( 9) = 'SDIAG9  '
5644fea420 Jean*0132       tdiag( 9) = 'User-Defined U.vector Surface Diag.  #9 '
5cbcb662ee Andr*0133       udiag( 9) = 'user-defined    '
5644fea420 Jean*0134       gdiag( 9) = 'UU      L1      '
                0135       hdiag( 9) =  10
5cbcb662ee Andr*0136 
                0137       cdiag(10) = 'SDIAG10 '
5644fea420 Jean*0138       tdiag(10) = 'User-Defined V.vector Surface Diag. #10 '
5cbcb662ee Andr*0139       udiag(10) = 'user-defined    '
5644fea420 Jean*0140       gdiag(10) = 'VV      L1      '
                0141       hdiag(10) =  9
5cbcb662ee Andr*0142 
e659b716de Jean*0143       cdiag(11) = 'UDIAG1  '
5644fea420 Jean*0144       tdiag(11) = 'User-Defined Model-Level Diagnostic  #1 '
e659b716de Jean*0145       udiag(11) = 'user-defined    '
                0146       gdiag(11) = 'SM      MR      '
5cbcb662ee Andr*0147 
e659b716de Jean*0148       cdiag(12) = 'UDIAG2  '
5644fea420 Jean*0149       tdiag(12) = 'User-Defined Model-Level Diagnostic  #2 '
e659b716de Jean*0150       udiag(12) = 'user-defined    '
                0151       gdiag(12) = 'SM      MR      '
5cbcb662ee Andr*0152 
                0153       cdiag(13) = 'UDIAG3  '
5644fea420 Jean*0154       tdiag(13) = 'User-Defined Model-Level Diagnostic  #3 '
5cbcb662ee Andr*0155       udiag(13) = 'user-defined    '
5644fea420 Jean*0156       gdiag(13) = 'SMR     MR      '
5cbcb662ee Andr*0157 
                0158       cdiag(14) = 'UDIAG4  '
5644fea420 Jean*0159       tdiag(14) = 'User-Defined Model-Level Diagnostic  #4 '
5cbcb662ee Andr*0160       udiag(14) = 'user-defined    '
5644fea420 Jean*0161       gdiag(14) = 'SMR     MR      '
5cbcb662ee Andr*0162 
                0163       cdiag(15) = 'UDIAG5  '
5644fea420 Jean*0164       tdiag(15) = 'User-Defined U.pt Model-Level Diag.  #5 '
5cbcb662ee Andr*0165       udiag(15) = 'user-defined    '
5644fea420 Jean*0166       gdiag(15) = 'SU      MR      '
5cbcb662ee Andr*0167 
                0168       cdiag(16) = 'UDIAG6  '
5644fea420 Jean*0169       tdiag(16) = 'User-Defined V.pt Model-Level Diag.  #6 '
5cbcb662ee Andr*0170       udiag(16) = 'user-defined    '
5644fea420 Jean*0171       gdiag(16) = 'SV      MR      '
5cbcb662ee Andr*0172 
                0173       cdiag(17) = 'UDIAG7  '
5644fea420 Jean*0174       tdiag(17) = 'User-Defined U.vector Model-Lev Diag.#7 '
5cbcb662ee Andr*0175       udiag(17) = 'user-defined    '
5644fea420 Jean*0176       gdiag(17) = 'UUR     MR      '
                0177       hdiag(17) =  18
5cbcb662ee Andr*0178 
                0179       cdiag(18) = 'UDIAG8  '
5644fea420 Jean*0180       tdiag(18) = 'User-Defined V.vector Model-Lev Diag.#8 '
5cbcb662ee Andr*0181       udiag(18) = 'user-defined    '
5644fea420 Jean*0182       gdiag(18) = 'VVR     MR      '
                0183       hdiag(18) =  17
5cbcb662ee Andr*0184 
                0185       cdiag(19) = 'UDIAG9  '
5644fea420 Jean*0186       tdiag(19) = 'User-Defined Phys-Level  Diagnostic  #9 '
5cbcb662ee Andr*0187       udiag(19) = 'user-defined    '
                0188       gdiag(19) = 'SM      ML      '
                0189 
                0190       cdiag(20) = 'UDIAG10 '
5644fea420 Jean*0191       tdiag(20) = 'User-Defined Phys-Level  Diagnostic #10 '
5cbcb662ee Andr*0192       udiag(20) = 'user-defined    '
                0193       gdiag(20) = 'SM      ML      '
                0194 
                0195       cdiag(21) = 'SDIAGC  '
e659b716de Jean*0196       tdiag(21) = 'User-Defined Counted Surface Diagnostic '
5cbcb662ee Andr*0197       udiag(21) = 'user-defined    '
931cda44c0 Jean*0198       gdiag(21) = 'SM  C   L1      '
                0199       hdiag(21) =  22
5cbcb662ee Andr*0200 
                0201       cdiag(22) = 'SDIAGCC '
e659b716de Jean*0202       tdiag(22) = 'User-Defined Surface Diagnostic Counter '
5cbcb662ee Andr*0203       udiag(22) = 'count           '
931cda44c0 Jean*0204       gdiag(22) = 'SM      L1      '
d1a53cc834 Andr*0205 
e3e2b00dee Jean*0206 C-    set the total number of available diagnostics
5cbcb662ee Andr*0207       ndiagt = 22
09ceb40cd6 Jean*0208 
e3e2b00dee Jean*0209 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0210 
                0211       _END_MASTER( myThid )
                0212       _BARRIER
09ceb40cd6 Jean*0213 
                0214       RETURN
                0215       END