Back to home page

MITgcm

 
 

    


File indexing completed on 2024-08-29 05:10:33 UTC

view on githubraw file Latest commit 5237154b on 2024-08-28 14:56:27 UTC
4c563c2ee9 Chri*0001 CBOP
                0002 C     !ROUTINE: EEPARAMS.h
                0003 C     !INTERFACE:
                0004 C     include "EEPARAMS.h"
924557e60a Chri*0005 C
4c563c2ee9 Chri*0006 C     !DESCRIPTION:
                0007 C     *==========================================================*
924557e60a Chri*0008 C     | EEPARAMS.h                                               |
4c563c2ee9 Chri*0009 C     *==========================================================*
924557e60a Chri*0010 C     | Parameters for "execution environemnt". These are used   |
487c5e643e Patr*0011 C     | by both the particular numerical model and the execution |
                0012 C     | environment support routines.                            |
4c563c2ee9 Chri*0013 C     *==========================================================*
                0014 CEOP
924557e60a Chri*0015 
e0d3b86d1f Ed H*0016 C     ========  EESIZE.h  ========================================
                0017 
d77f364184 Jean*0018 C     MAX_LEN_MBUF  :: Default message buffer max. size
                0019 C     MAX_LEN_FNAM  :: Default file name max. size
                0020 C     MAX_LEN_PREC  :: Default rec len for reading "parameter" files
e0d3b86d1f Ed H*0021 
                0022       INTEGER MAX_LEN_MBUF
                0023       PARAMETER ( MAX_LEN_MBUF = 512 )
                0024       INTEGER MAX_LEN_FNAM
                0025       PARAMETER ( MAX_LEN_FNAM = 512 )
                0026       INTEGER MAX_LEN_PREC
                0027       PARAMETER ( MAX_LEN_PREC = 200 )
                0028 
d77f364184 Jean*0029 C     MAX_NO_THREADS  :: Maximum number of threads allowed.
5237154b93 Jean*0030 C     GSVec_size      :: Maximum buffer size for Global Sum Vector array
e0d3b86d1f Ed H*0031       INTEGER MAX_NO_THREADS
972712fcba Jean*0032       PARAMETER ( MAX_NO_THREADS =  4 )
5237154b93 Jean*0033       INTEGER GSVec_size
                0034       PARAMETER ( GSVec_size = 1024 )
e0d3b86d1f Ed H*0035 
                0036 C     Particularly weird and obscure voodoo numbers
d77f364184 Jean*0037 C     lShare :: This wants to be the length in
e0d3b86d1f Ed H*0038 C               [148]-byte words of the size of
                0039 C               the address "window" that is snooped
                0040 C               on an SMP bus. By separating elements in
                0041 C               the global sum buffer we can avoid generating
                0042 C               extraneous invalidate traffic between
                0043 C               processors. The length of this window is usually
                0044 C               a cache line i.e. small O(64 bytes).
                0045 C               The buffer arrays are usually short arrays
                0046 C               and are declared REAL ARRA(lShare[148],LBUFF).
                0047 C               Setting lShare[148] to 1 is like making these arrays
                0048 C               one dimensional.
                0049       INTEGER cacheLineSize
                0050       INTEGER lShare1
                0051       INTEGER lShare4
                0052       INTEGER lShare8
                0053       PARAMETER ( cacheLineSize = 256 )
                0054       PARAMETER ( lShare1 =  cacheLineSize )
                0055       PARAMETER ( lShare4 =  cacheLineSize/4 )
                0056       PARAMETER ( lShare8 =  cacheLineSize/8 )
                0057 
                0058 C     ========  EESIZE.h  ========================================
                0059 
21efca5f95 Jean*0060 C     Symbolic values
                0061 C     precXXXX :: precision used for I/O
                0062       INTEGER precFloat32
                0063       PARAMETER ( precFloat32 = 32 )
                0064       INTEGER precFloat64
                0065       PARAMETER ( precFloat64 = 64 )
                0066 
c275dfae46 Jean*0067 C     Real-type constant for some frequently used simple number (0,1,2,1/2):
                0068       _RS     zeroRS, oneRS, twoRS, halfRS
                0069       PARAMETER ( zeroRS = 0.0 _d 0 , oneRS  = 1.0 _d 0 )
                0070       PARAMETER ( twoRS  = 2.0 _d 0 , halfRS = 0.5 _d 0 )
                0071       _RL     zeroRL, oneRL, twoRL, halfRL
                0072       PARAMETER ( zeroRL = 0.0 _d 0 , oneRL  = 1.0 _d 0 )
                0073       PARAMETER ( twoRL  = 2.0 _d 0 , halfRL = 0.5 _d 0 )
                0074 
21efca5f95 Jean*0075 C     UNSET_xxx :: Used to indicate variables that have not been given a value
                0076       Real*8  UNSET_FLOAT8
                0077       PARAMETER ( UNSET_FLOAT8 = 1.234567D5 )
                0078       Real*4  UNSET_FLOAT4
                0079       PARAMETER ( UNSET_FLOAT4 = 1.234567E5 )
                0080       _RL     UNSET_RL
                0081       PARAMETER ( UNSET_RL     = 1.234567D5 )
                0082       _RS     UNSET_RS
                0083       PARAMETER ( UNSET_RS     = 1.234567D5 )
                0084       INTEGER UNSET_I
                0085       PARAMETER ( UNSET_I      = 123456789  )
                0086 
                0087 C     debLevX  :: used to decide when to print debug messages
                0088       INTEGER debLevZero
d84341a384 Jean*0089       INTEGER debLevA, debLevB,  debLevC, debLevD, debLevE
21efca5f95 Jean*0090       PARAMETER ( debLevZero=0 )
                0091       PARAMETER ( debLevA=1 )
                0092       PARAMETER ( debLevB=2 )
d84341a384 Jean*0093       PARAMETER ( debLevC=3 )
                0094       PARAMETER ( debLevD=4 )
                0095       PARAMETER ( debLevE=5 )
924557e60a Chri*0096 
d77f364184 Jean*0097 C     SQUEEZE_RIGHT      :: Flag indicating right blank space removal
924557e60a Chri*0098 C                           from text field.
d77f364184 Jean*0099 C     SQUEEZE_LEFT       :: Flag indicating left blank space removal
924557e60a Chri*0100 C                           from text field.
d77f364184 Jean*0101 C     SQUEEZE_BOTH       :: Flag indicating left and right blank
924557e60a Chri*0102 C                           space removal from text field.
d77f364184 Jean*0103 C     PRINT_MAP_XY       :: Flag indicating to plot map as XY slices
                0104 C     PRINT_MAP_XZ       :: Flag indicating to plot map as XZ slices
                0105 C     PRINT_MAP_YZ       :: Flag indicating to plot map as YZ slices
                0106 C     commentCharacter   :: Variable used in column 1 of parameter
f8adb8fd4b Ed H*0107 C                           files to indicate comments.
d77f364184 Jean*0108 C     INDEX_I            :: Variable used to select an index label
7a7a4899b4 Chri*0109 C     INDEX_J               for formatted input parameters.
                0110 C     INDEX_K
                0111 C     INDEX_NONE
924557e60a Chri*0112       CHARACTER*(*) SQUEEZE_RIGHT
                0113       PARAMETER ( SQUEEZE_RIGHT = 'R' )
                0114       CHARACTER*(*) SQUEEZE_LEFT
                0115       PARAMETER ( SQUEEZE_LEFT = 'L' )
                0116       CHARACTER*(*) SQUEEZE_BOTH
                0117       PARAMETER ( SQUEEZE_BOTH = 'B' )
                0118       CHARACTER*(*) PRINT_MAP_XY
                0119       PARAMETER ( PRINT_MAP_XY = 'XY' )
                0120       CHARACTER*(*) PRINT_MAP_XZ
                0121       PARAMETER ( PRINT_MAP_XZ = 'XZ' )
                0122       CHARACTER*(*) PRINT_MAP_YZ
                0123       PARAMETER ( PRINT_MAP_YZ = 'YZ' )
                0124       CHARACTER*(*) commentCharacter
                0125       PARAMETER ( commentCharacter = '#' )
7a7a4899b4 Chri*0126       INTEGER INDEX_I
                0127       INTEGER INDEX_J
21efca5f95 Jean*0128       INTEGER INDEX_K
7a7a4899b4 Chri*0129       INTEGER INDEX_NONE
                0130       PARAMETER ( INDEX_I    = 1,
                0131      &            INDEX_J    = 2,
                0132      &            INDEX_K    = 3,
                0133      &            INDEX_NONE = 4 )
924557e60a Chri*0134 
d77f364184 Jean*0135 C     EXCH_IGNORE_CORNERS :: Flag to select ignoring or
                0136 C     EXCH_UPDATE_CORNERS    updating of corners during an edge exchange.
a85d6ab24e Chri*0137       INTEGER EXCH_IGNORE_CORNERS
                0138       INTEGER EXCH_UPDATE_CORNERS
                0139       PARAMETER ( EXCH_IGNORE_CORNERS = 0,
                0140      &            EXCH_UPDATE_CORNERS = 1 )
                0141 
                0142 C     FORWARD_SIMULATION
                0143 C     REVERSE_SIMULATION
22f0d78f5f Patr*0144 C     TANGENT_SIMULATION
a85d6ab24e Chri*0145       INTEGER FORWARD_SIMULATION
                0146       INTEGER REVERSE_SIMULATION
22f0d78f5f Patr*0147       INTEGER TANGENT_SIMULATION
a85d6ab24e Chri*0148       PARAMETER ( FORWARD_SIMULATION = 0,
22f0d78f5f Patr*0149      &            REVERSE_SIMULATION = 1,
                0150      &            TANGENT_SIMULATION = 2 )
a85d6ab24e Chri*0151 
924557e60a Chri*0152 C--   COMMON /EEPARAMS_L/ Execution environment public logical variables.
9330991713 Jean*0153 C     eeBootError    :: Flags indicating error during multi-processing
                0154 C     eeEndError     :: initialisation and termination.
                0155 C     fatalError     :: Flag used to indicate that the model is ended with an error
d84341a384 Jean*0156 C     debugMode      :: controls printing of debug msg (sequence of S/R calls).
9330991713 Jean*0157 C     useSingleCpuIO :: When useSingleCpuIO is set, MDS_WRITE_FIELD outputs from
                0158 C                       master MPI process only. -- NOTE: read from main parameter
                0159 C                       file "data" and not set until call to INI_PARMS.
631fe75038 Dimi*0160 C     useSingleCpuInput :: When useSingleCpuInput is set, EXF_INTERP_READ
                0161 C                       reads forcing files from master MPI process only.
                0162 C                       -- NOTE: read from main parameter file "data"
                0163 C                          and defaults to useSingleCpuInput = useSingleCpuIO
9330991713 Jean*0164 C     printMapIncludesZeros  :: Flag that controls whether character constant
                0165 C                               map code ignores exact zero values.
                0166 C     useCubedSphereExchange :: use Cubed-Sphere topology domain.
                0167 C     useCoupler     :: use Coupler for a multi-components set-up.
0deb8b4619 Jean*0168 C     useNEST_PARENT :: use Parent Nesting interface (pkg/nest_parent)
                0169 C     useNEST_CHILD  :: use Child  Nesting interface (pkg/nest_child)
6591b3fcc3 Jean*0170 C     useNest2W_parent :: use Parent 2-W Nesting interface (pkg/nest2w_parent)
                0171 C     useNest2W_child  :: use Child  2-W Nesting interface (pkg/nest2w_child)
9aa451bbe6 Mart*0172 C     useOASIS       :: use OASIS-coupler for a multi-components set-up.
c36c6d9b4f Jean*0173       COMMON /EEPARAMS_L/
d84341a384 Jean*0174 c    &  eeBootError, fatalError, eeEndError,
                0175      &  eeBootError, eeEndError, fatalError, debugMode,
631fe75038 Dimi*0176      &  useSingleCpuIO, useSingleCpuInput, printMapIncludesZeros,
9330991713 Jean*0177      &  useCubedSphereExchange, useCoupler,
6591b3fcc3 Jean*0178      &  useNEST_PARENT, useNEST_CHILD,
                0179      &  useNest2W_parent, useNest2W_child, useOASIS,
0deb8b4619 Jean*0180      &  useSETRLSTK, useSIGREG
924557e60a Chri*0181       LOGICAL eeBootError
                0182       LOGICAL eeEndError
                0183       LOGICAL fatalError
d84341a384 Jean*0184       LOGICAL debugMode
9330991713 Jean*0185       LOGICAL useSingleCpuIO
631fe75038 Dimi*0186       LOGICAL useSingleCpuInput
c36c6d9b4f Jean*0187       LOGICAL printMapIncludesZeros
aea29c8517 Alis*0188       LOGICAL useCubedSphereExchange
aa41442d4c Jean*0189       LOGICAL useCoupler
0deb8b4619 Jean*0190       LOGICAL useNEST_PARENT
                0191       LOGICAL useNEST_CHILD
6591b3fcc3 Jean*0192       LOGICAL useNest2W_parent
                0193       LOGICAL useNest2W_child
9aa451bbe6 Mart*0194       LOGICAL useOASIS
df91541502 Ed H*0195       LOGICAL useSETRLSTK
b81731e160 Ed H*0196       LOGICAL useSIGREG
924557e60a Chri*0197 
                0198 C--   COMMON /EPARAMS_I/ Execution environment public integer variables.
d77f364184 Jean*0199 C     errorMessageUnit    :: Fortran IO unit for error messages
                0200 C     standardMessageUnit :: Fortran IO unit for informational messages
c36c6d9b4f Jean*0201 C     maxLengthPrt1D :: maximum length for printing (to Std-Msg-Unit) 1-D array
d77f364184 Jean*0202 C     scrUnit1      :: Scratch file 1 unit number
                0203 C     scrUnit2      :: Scratch file 2 unit number
                0204 C     eeDataUnit    :: Unit # for reading "execution environment" parameter file
                0205 C     modelDataUnit :: Unit number for reading "model" parameter file.
                0206 C     numberOfProcs :: Number of processes computing in parallel
                0207 C     pidIO         :: Id of process to use for I/O.
                0208 C     myBxLo, myBxHi :: Extents of domain in blocks in X and Y
                0209 C     myByLo, myByHi :: that each threads is responsble for.
                0210 C     myProcId      :: My own "process" id.
                0211 C     myPx          :: My X coord on the proc. grid.
                0212 C     myPy          :: My Y coord on the proc. grid.
                0213 C     myXGlobalLo   :: My bottom-left (south-west) x-index global domain.
                0214 C                      The x-coordinate of this point in for example m or
                0215 C                      degrees is *not* specified here. A model needs to
                0216 C                      provide a mechanism for deducing that information
                0217 C                      if it is needed.
                0218 C     myYGlobalLo   :: My bottom-left (south-west) y-index in global domain.
                0219 C                      The y-coordinate of this point in for example m or
                0220 C                      degrees is *not* specified here. A model needs to
                0221 C                      provide a mechanism for deducing that information
                0222 C                      if it is needed.
                0223 C     nThreads      :: No. of threads
                0224 C     nTx, nTy      :: No. of threads in X and in Y
                0225 C                      This assumes a simple cartesian gridding of the threads
                0226 C                      which is not required elsewhere but that makes it easier
                0227 C     ioErrorCount  :: IO Error Counter. Set to zero initially and increased
                0228 C                      by one every time an IO error occurs.
c36c6d9b4f Jean*0229       COMMON /EEPARAMS_I/
                0230      &  errorMessageUnit, standardMessageUnit, maxLengthPrt1D,
                0231      &  scrUnit1, scrUnit2, eeDataUnit, modelDataUnit,
                0232      &  numberOfProcs, pidIO, myProcId,
                0233      &  myPx, myPy, myXGlobalLo, myYGlobalLo, nThreads,
                0234      &  myBxLo, myBxHi, myByLo, myByHi,
                0235      &  nTx, nTy, ioErrorCount
924557e60a Chri*0236       INTEGER errorMessageUnit
c36c6d9b4f Jean*0237       INTEGER standardMessageUnit
                0238       INTEGER maxLengthPrt1D
                0239       INTEGER scrUnit1
                0240       INTEGER scrUnit2
                0241       INTEGER eeDataUnit
924557e60a Chri*0242       INTEGER modelDataUnit
c36c6d9b4f Jean*0243       INTEGER ioErrorCount(MAX_NO_THREADS)
924557e60a Chri*0244       INTEGER myBxLo(MAX_NO_THREADS)
                0245       INTEGER myBxHi(MAX_NO_THREADS)
                0246       INTEGER myByLo(MAX_NO_THREADS)
                0247       INTEGER myByHi(MAX_NO_THREADS)
                0248       INTEGER myProcId
                0249       INTEGER myPx
                0250       INTEGER myPy
                0251       INTEGER myXGlobalLo
                0252       INTEGER myYGlobalLo
                0253       INTEGER nThreads
                0254       INTEGER nTx
                0255       INTEGER nTy
                0256       INTEGER numberOfProcs
                0257       INTEGER pidIO
85c5caf7c2 Ed H*0258 
5237154b93 Jean*0259 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|