Back to home page

MITgcm

 
 

    


File indexing completed on 2024-02-29 06:10:23 UTC

view on githubraw file Latest commit a4576c7c on 2024-02-28 22:55:11 UTC
0c49347dc7 Alis*0001 #ifdef ALLOW_GMREDI
a4576c7cde Juli*0002 CBOP
                0003 C     !ROUTINE: GMREDI.h
                0004 C     !INTERFACE:
                0005 C     #include "GMREDI.h"
0c49347dc7 Alis*0006 
a4576c7cde Juli*0007 C     !DESCRIPTION:
                0008 C     *================================================================*
                0009 C     | GMREDI.h
                0010 C     | o Header file defining GM/Redi parameters and variables
                0011 C     *================================================================*
                0012 CEOP
2a09713997 Patr*0013 
86e2f7bc1f Jean*0014 C--   Numerical Constant
                0015       _RL op5
                0016       _RL op25
a8da45f13c Jean*0017       PARAMETER( op5  = 0.5 _d 0 )
                0018       PARAMETER( op25 = 0.25 _d 0 )
86e2f7bc1f Jean*0019 
f6de204bec Jean*0020 C--   COMMON /GM_PARAMS_L/ GM/Redi Logical-type parameters
                0021 C     GM_AdvForm       :: use Advective Form (instead of Skew-Flux form)
                0022 C     GM_AdvSeparate   :: do separately advection by Eulerian and Bolus velocity
d0035fac68 Jean*0023 C     GM_useBVP        :: use Boundary-Value-Problem method for Bolus transport
f5509be190 Mart*0024 C     GM_useSubMeso    :: use parameterization of mixed layer (Sub-Mesoscale)
                0025 C                         eddies
f6de204bec Jean*0026 C     GM_ExtraDiag     :: select extra diagnostics
                0027 C     GM_InMomAsStress :: apply GM as a stress in momentum Eq.
                0028 C     GM_MNC           ::
                0029 C     GM_MDSIO         ::
05118ac017 Jean*0030 C     GM_useBatesK3d     :: use Bates etal (2014) calculation for 3-d K
                0031 C     GM_Bates_beta_eq_0 :: Ignores the beta term when calculating grad(q)
                0032 C     GM_Bates_ThickSheet:: Use a thick PV sheet
                0033 C     GM_Bates_surfK     :: Imposes a constant K in the surface layer
                0034 C     GM_Bates_constRedi :: Imposes a constant K for the Redi diffusivity
                0035 C     GM_Bates_use_constK:: Imposes a constant K for the eddy transport
                0036 C     GM_Bates_smooth    :: Expand PV closure in terms of baroclinic modes
                0037 C                           (=.FALSE. for debugging only!)
f59d76b0dd Ed D*0038 C     GM_useLeithQG    :: add Leith QG viscosity to GMRedi tensor
a4576c7cde Juli*0039 C     GM_useGEOM       :: use the GEOME formulation to calculate kgm
                0040 C     GEOM_vert_struc  :: allow for N2 structure function
                0041 
86e2f7bc1f Jean*0042       LOGICAL GM_AdvForm
                0043       LOGICAL GM_AdvSeparate
d0035fac68 Jean*0044       LOGICAL GM_useBVP
050b4366e6 Jean*0045       LOGICAL GM_useSubMeso
86e2f7bc1f Jean*0046       LOGICAL GM_ExtraDiag
                0047       LOGICAL GM_InMomAsStress
                0048       LOGICAL GM_MNC
                0049       LOGICAL GM_MDSIO
05118ac017 Jean*0050       LOGICAL GM_useBatesK3d
                0051       LOGICAL GM_Bates_ThickSheet
                0052       LOGICAL GM_Bates_surfK
                0053       LOGICAL GM_Bates_constRedi
                0054       LOGICAL GM_Bates_use_constK
                0055       LOGICAL GM_Bates_beta_eq_0
                0056       LOGICAL GM_Bates_smooth
f59d76b0dd Ed D*0057       LOGICAL GM_useLeithQG
a4576c7cde Juli*0058       LOGICAL GM_useGEOM
                0059       LOGICAL GEOM_vert_struc
86e2f7bc1f Jean*0060       COMMON /GM_PARAMS_L/
050b4366e6 Jean*0061      &                   GM_AdvForm, GM_AdvSeparate,
                0062      &                   GM_useBVP,  GM_useSubMeso,
86e2f7bc1f Jean*0063      &                   GM_ExtraDiag, GM_MNC, GM_MDSIO,
0d1e4b948d Mich*0064      &                   GM_InMomAsStress,
05118ac017 Jean*0065      &                   GM_useBatesK3d, GM_Bates_smooth,
                0066      &                   GM_Bates_use_constK, GM_Bates_beta_eq_0,
                0067      &                   GM_Bates_ThickSheet, GM_Bates_surfK,
                0068      &                   GM_Bates_constRedi,
a4576c7cde Juli*0069      &                   GM_useLeithQG,
                0070      &                   GM_useGEOM, GEOM_vert_struc
86e2f7bc1f Jean*0071 
d0035fac68 Jean*0072 C--   GM/Redi Integer-type parameters
                0073 C     GM_BVP_modeNumber :: vertical mode number used for speed "c" in BVP transport
05118ac017 Jean*0074 C     GM_Bates_NModes :: number of vertical modes used for calculating Xi in GM_BatesK3d
d0035fac68 Jean*0075       INTEGER GM_BVP_modeNumber
05118ac017 Jean*0076       INTEGER GM_Bates_NModes
                0077       PARAMETER (GM_Bates_NModes=6)
d0035fac68 Jean*0078       COMMON /GM_PARAMS_I/
5a6ef5c2b4 Mich*0079      &                   GM_BVP_modeNumber
d0035fac68 Jean*0080 
f6de204bec Jean*0081 C--   COMMON /GM_PARAMS_C/ GM/Redi Character-type parameters
                0082 C     GM_taper_scheme :: select which tapering/clipping scheme to use
                0083 C     GM_iso2dFile :: input file for 2.D horiz scaling of Isopycnal diffusivity
                0084 C     GM_iso1dFile :: input file for 1.D vert. scaling of Isopycnal diffusivity
                0085 C     GM_bol2dFile :: input file for 2.D horiz scaling of Thickness diffusivity
                0086 C     GM_bol1dFile :: input file for 1.D vert. scaling of Thickness diffusivity
94a8024bbe Jean*0087 C     GM_K3dRediFile :: input file for background 3.D Isopycal(Redi) diffusivity
                0088 C     GM_K3dGMFile   :: input file for background 3.D Thickness (GM) diffusivity
8882fbc8b1 Ou W*0089 
86e2f7bc1f Jean*0090       CHARACTER*(40) GM_taper_scheme
f6de204bec Jean*0091       CHARACTER*(MAX_LEN_FNAM) GM_iso2dFile
                0092       CHARACTER*(MAX_LEN_FNAM) GM_iso1dFile
                0093       CHARACTER*(MAX_LEN_FNAM) GM_bol2dFile
                0094       CHARACTER*(MAX_LEN_FNAM) GM_bol1dFile
94a8024bbe Jean*0095       CHARACTER*(MAX_LEN_FNAM) GM_K3dRediFile
                0096       CHARACTER*(MAX_LEN_FNAM) GM_K3dGMFile
86e2f7bc1f Jean*0097       COMMON /GM_PARAMS_C/
f6de204bec Jean*0098      &                   GM_taper_scheme,
                0099      &                   GM_iso2dFile, GM_iso1dFile,
8882fbc8b1 Ou W*0100      &                   GM_bol2dFile, GM_bol1dFile,
94a8024bbe Jean*0101      &                   GM_K3dRediFile, GM_K3dGMFile
86e2f7bc1f Jean*0102 
f6de204bec Jean*0103 C--   COMMON /GM_PARAMS_R/ GM/Redi real-type parameters
86e2f7bc1f Jean*0104 C     GM_isopycK       :: Isopycnal diffusivity [m^2/s] (Redi-tensor)
                0105 C     GM_background_K  :: Thickness diffusivity [m^2/s] (GM bolus transport)
                0106 C     GM_maxSlope      :: maximum slope (tapering/clipping) [-]
                0107 C     GM_Kmin_horiz    :: minimum horizontal diffusivity [m^2/s]
                0108 C     GM_Small_Number  :: epsilon used in computing the slope
bd3f833a36 Jean*0109 C     GM_slopeSqCutoff :: slope^2 cut-off value
05118ac017 Jean*0110 C     GM_Scrit, GM_Sd  :: parameter for 'dm95' & 'ldd97' tapering fct
f5509be190 Mart*0111 C     GM_isoFac_calcK  :: add fraction of  dynamically computed variable K,
                0112 C                         e.g. Visbeck, also to Redi tensor (default = 1.)
050b4366e6 Jean*0113 C-    Transition layer thickness definition:
86e2f7bc1f Jean*0114 C     GM_facTrL2dz   :: minimum Trans. Layer Thick. as a factor of local dz
                0115 C     GM_facTrL2ML   :: maximum Trans. Layer Thick. as a factor of Mix-Layer Depth
                0116 C     GM_maxTransLay :: maximum Trans. Layer Thick. [m]
050b4366e6 Jean*0117 C-    Boundary-Value-Problem method parameters:
d0035fac68 Jean*0118 C     GM_BVP_cMin    :: minimum value for wave speed parameter "c" in BVP [m/s]
050b4366e6 Jean*0119 C-    mixed layer (Sub-Mesoscale) eddies parameterization:
                0120 C     subMeso_Ceff   :: efficiency coefficient of Mixed-Layer Eddies [-]
                0121 C     subMeso_invTau :: inverse of mixing time-scale in sub-meso parameteriz. [s^-1]
                0122 C     subMeso_LfMin  :: minimum value for length-scale "Lf" [m]
                0123 C     subMeso_Lmax   :: maximum horizontal grid-scale length [m]
05118ac017 Jean*0124 C-    Variable K parameters for Visbeck etal (1997) scheme:
a4576c7cde Juli*0125 C-    Variable K parameters for Marshall etal (2012) GEOM scheme:
                0126 C     GEOM_alpha       :: non-dim eddy efficiency param (=<1 in QG)
                0127 C     GEOM_lmbda       :: lin eddy energy dissipation rate
                0128 C     GEOM_ini_EKE     :: initial value for depth-int eddy kinetic energy
                0129 C     GEOM_diffKh_EKE  :: depth-int param eddy energy diffusion coeff
                0130 C     GEOM_minval_K    :: lower bound on diffusivity
                0131 C     GEOM_maxval_K    :: upper bound on diffusivity
                0132 C     GEOM_vert_struc_min   :: lower bound on N2/Nref vertical structure func
                0133 C     GEOM_vert_struc_max   :: upper bound on N2/Nref vertical structure func
05118ac017 Jean*0134 C-    Variable K parameters for PV diffusion based, Bates etal (2014) scheme:
                0135 C     GM_Bates_gamma   :: mixing efficiency for 3D eddy diffusivity [-]
                0136 C     GM_Bates_b1      :: an empirically determined constant of O(1)
                0137 C     GM_Bates_EadyMinDepth :: upper depth for Eady calculation
                0138 C     GM_Bates_EadyMaxDepth :: lower depth for Eady calculation
                0139 C     GM_Bates_Lambda  ::
                0140 C     GM_Bates_smallK  ::
                0141 C     GM_Bates_maxK    :: Upper bound on the diffusivity
                0142 C     GM_Bates_constK  :: Constant diffusivity to use when GM_useBatesK3d=T and
                0143 C                         GM_Bates_use_constK=T and/or GM_Bates_constRedi=T
                0144 C     GM_Bates_maxC    ::
                0145 C     GM_Bates_Rmax    :: Length scale upper bound used for calculating urms
                0146 C     GM_Bates_Rmin    :: Length scale lower bound for calc. the eddy radius
                0147 C     GM_Bates_minCori :: minimum value for f (prevents Pb near the equator)
                0148 C     GM_Bates_minN2   :: minimum value for the square of the buoyancy frequency
                0149 C     GM_Bates_surfMinDepth :: minimum value for the depth of the surface layer
                0150 C     GM_Bates_vecFreq :: Frequency at which to update the baroclinic modes
                0151 C     GM_Bates_minRenorm :: minimum value for the renormalisation factor
                0152 C     GM_Bates_maxRenorm :: maximum value for the renormalisation factor
f42e64b3e7 Jean*0153       _RL GM_isopycK
0c49347dc7 Alis*0154       _RL GM_background_K
                0155       _RL GM_maxSlope
f42e64b3e7 Jean*0156       _RL GM_Kmin_horiz
bd3f833a36 Jean*0157       _RL GM_Small_Number
                0158       _RL GM_slopeSqCutoff
05118ac017 Jean*0159       _RL GM_Scrit, GM_Sd
f5509be190 Mart*0160       _RL GM_isoFac_calcK
86e2f7bc1f Jean*0161       _RL GM_facTrL2dz
                0162       _RL GM_facTrL2ML
                0163       _RL GM_maxTransLay
d0035fac68 Jean*0164       _RL GM_BVP_cMin
050b4366e6 Jean*0165       _RL subMeso_Ceff
                0166       _RL subMeso_invTau
                0167       _RL subMeso_LfMin
                0168       _RS subMeso_Lmax
05118ac017 Jean*0169       _RL GM_Visbeck_alpha
                0170       _RL GM_Visbeck_length
                0171       _RL GM_Visbeck_depth
                0172       _RL GM_Visbeck_minDepth
                0173       _RL GM_Visbeck_maxSlope
                0174       _RL GM_Visbeck_minVal_K
                0175       _RL GM_Visbeck_maxVal_K
a4576c7cde Juli*0176       _RL GEOM_alpha
                0177       _RL GEOM_lmbda
                0178       _RL GEOM_ini_EKE
                0179       _RL GEOM_diffKh_EKE
                0180       _RL GEOM_minval_K
                0181       _RL GEOM_maxval_K
                0182       _RL GEOM_vert_struc_min
                0183       _RL GEOM_vert_struc_max
05118ac017 Jean*0184       _RL GM_Bates_gamma
                0185       _RL GM_Bates_b1
                0186       _RL GM_Bates_EadyMinDepth
                0187       _RL GM_Bates_EadyMaxDepth
                0188       _RL GM_Bates_Lambda
                0189       _RL GM_Bates_smallK
                0190       _RL GM_Bates_maxK
                0191       _RL GM_Bates_constK
                0192       _RL GM_Bates_maxC
                0193       _RL GM_Bates_Rmax
                0194       _RL GM_Bates_Rmin
                0195       _RL GM_Bates_minCori
                0196       _RL GM_Bates_minN2
                0197       _RL GM_Bates_surfMinDepth
                0198       _RL GM_Bates_vecFreq
                0199       _RL GM_Bates_minRenorm
                0200       _RL GM_Bates_maxRenorm
050b4366e6 Jean*0201       COMMON /GM_PARAMS_RL/
05118ac017 Jean*0202      &                 GM_isopycK, GM_background_K,
                0203      &                 GM_maxSlope,
                0204      &                 GM_Kmin_horiz,
                0205      &                 GM_Small_Number, GM_slopeSqCutoff,
f5509be190 Mart*0206      &                 GM_Scrit, GM_Sd, GM_isoFac_calcK,
05118ac017 Jean*0207      &                 GM_facTrL2dz, GM_facTrL2ML, GM_maxTransLay,
                0208      &                 GM_BVP_cMin,
                0209      &                 subMeso_Ceff, subMeso_invTau, subMeso_LfMin,
                0210      &                 GM_Visbeck_alpha, GM_Visbeck_length,
                0211      &                 GM_Visbeck_depth,
                0212      &                 GM_Visbeck_minDepth, GM_Visbeck_maxSlope,
                0213      &                 GM_Visbeck_minVal_K, GM_Visbeck_maxVal_K,
a4576c7cde Juli*0214      &                 GEOM_alpha, GEOM_lmbda,
                0215      &                 GEOM_ini_EKE, GEOM_diffKh_EKE,
                0216      &                 GEOM_minval_K, GEOM_maxval_K,
                0217      &                 GEOM_vert_struc_min, GEOM_vert_struc_max,
05118ac017 Jean*0218      &                 GM_Bates_gamma, GM_Bates_b1,
                0219      &                 GM_Bates_EadyMinDepth, GM_Bates_EadyMaxDepth,
                0220      &                 GM_Bates_Lambda, GM_Bates_smallK, GM_Bates_maxK,
                0221      &                 GM_Bates_constK, GM_Bates_maxC,
                0222      &                 GM_Bates_Rmax, GM_Bates_Rmin,
                0223      &                 GM_Bates_minCori, GM_Bates_minN2,
                0224      &                 GM_Bates_surfMinDepth, GM_Bates_vecFreq,
                0225      &                 GM_Bates_minRenorm, GM_Bates_maxRenorm
                0226 
050b4366e6 Jean*0227       COMMON /GM_PARAMS_RS/
                0228      &                   subMeso_Lmax
0c49347dc7 Alis*0229 
f6de204bec Jean*0230 C--   COMMON /GM_DERIVED_PAR/ other GM/Redi parameters
                0231 C     (derived from previous block and not directly user configured)
0c49347dc7 Alis*0232       _RL GM_rMaxSlope
f42e64b3e7 Jean*0233       _RL GM_skewflx
d0035fac68 Jean*0234       _RL GM_BVP_rModeNumber
                0235       _RL GM_BVP_cHat2Min
86e2f7bc1f Jean*0236       COMMON /GM_DERIVED_PAR/
                0237      &                   GM_rMaxSlope,
f5509be190 Mart*0238      &                   GM_skewflx,
d0035fac68 Jean*0239      &                   GM_BVP_rModeNumber, GM_BVP_cHat2Min
                0240 
f6de204bec Jean*0241 C--   COMMON /GM_COEFFICIENTS/ GM/Redi scaling coefficients
                0242 C     defined at grid-cell center (tracer location)
                0243 C     GM_isoFac2d  :: 2.D horiz scaling factor [-] of Isopycnal diffusivity
                0244 C     GM_bolFac2d  :: 2.D horiz scaling factor [-] of Thickness diffusivity
                0245 C     GM_isoFac1d  :: 1.D vert. scaling factor [-] of Isopycnal diffusivity
                0246 C     GM_bolFac1d  :: 1.D vert. scaling factor [-] of Thickness diffusivity
                0247       _RS GM_isoFac2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0248       _RS GM_bolFac2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0249       _RS GM_isoFac1d(Nr)
                0250       _RS GM_bolFac1d(Nr)
                0251       COMMON /GM_COEFFICIENTS/
                0252      &  GM_isoFac2d, GM_bolFac2d, GM_isoFac1d, GM_bolFac1d
                0253 
94a8024bbe Jean*0254 #ifdef GM_READ_K3D_REDI
                0255 C--   COMMON /GM_INP_K3D_REDI/ 3.D background isopycnal (Redi) diffusiv. [m^2/s]
                0256       COMMON /GM_INP_K3D_REDI/ GM_inpK3dRedi
                0257       _RL GM_inpK3dRedi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0258 #endif
                0259 #ifdef GM_READ_K3D_GM
                0260 C--   COMMON /GM_INP_K3D_GM/   3.D background thickness (GM) diffusivity [m^2/s]
                0261       COMMON /GM_INP_K3D_GM/   GM_inpK3dGM
                0262       _RL GM_inpK3dGM  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0263 #endif
                0264 
86e2f7bc1f Jean*0265 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0266 C---  GM/Redi tensor elements
0c49347dc7 Alis*0267 
                0268 C     Bottom row of tensor corresponds to W points
f6de204bec Jean*0269 C     Kwx :: K_31 element of GM/Redi tensor, X direction at W point
                0270 C     Kwy :: K_32 element of GM/Redi tensor, Y direction at W point
                0271 C     Kwz :: K_33 element of GM/Redi tensor, Z direction at W point
ed71574026 Patr*0272       _RL Kwx(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0273       _RL Kwy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0274       _RL Kwz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
796b5e35f7 Jean*0275       COMMON /GM_Wtensor/ Kwx, Kwy, Kwz
0c49347dc7 Alis*0276 
86e2f7bc1f Jean*0277 C     Horizontal part of the tensor
f6de204bec Jean*0278 C     Kux :: K_11 element of GM/Redi tensor, X direction at U point
                0279 C     Kvy :: K_22 element of GM/Redi tensor, Y direction at V point
ed71574026 Patr*0280       _RL Kux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0281       _RL Kvy(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
796b5e35f7 Jean*0282       COMMON /GM_HorTensor/ Kux, Kvy
0c49347dc7 Alis*0283 
f42e64b3e7 Jean*0284 #ifdef GM_EXTRA_DIAGONAL
                0285 C     First/second rows of tensor corresponds to U/V points
f6de204bec Jean*0286 C     Kuz :: K_13 element of GM/Redi tensor, Z direction at U point
                0287 C     Kvz :: K_23 element of GM/Redi tensor, Z direction at V point
f42e64b3e7 Jean*0288       _RL Kuz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0289       _RL Kvz(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
796b5e35f7 Jean*0290       COMMON /GM_UVtensor/ Kuz, Kvz
f42e64b3e7 Jean*0291 #else
796b5e35f7 Jean*0292       _RL Kuz, Kvz
                0293       PARAMETER( Kuz=1., Kvz=1. )
f42e64b3e7 Jean*0294 #endif
                0295 
                0296 #ifdef GM_BOLUS_ADVEC
86e2f7bc1f Jean*0297 C     GM advection formulation: bolus velocities are derived from 2
                0298 C        streamfunctions PsiX and PsiY :
f42e64b3e7 Jean*0299       _RL GM_PsiX(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0300       _RL GM_PsiY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
796b5e35f7 Jean*0301       COMMON /GM_BOLUS/ GM_PsiX, GM_PsiY
f42e64b3e7 Jean*0302 #endif
                0303 
0c49347dc7 Alis*0304 #ifdef GM_VISBECK_VARIABLE_K
94a8024bbe Jean*0305 C     GM mixing/stirring coefficient (spatially variable in horizontal)
                0306 C     for Visbeck et al. parameterization
ed71574026 Patr*0307       _RL VisbeckK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
0c49347dc7 Alis*0308       COMMON /GM_Visbeck/ VisbeckK
                0309 #endif
                0310 
05118ac017 Jean*0311 #ifdef GM_BATES_K3D
94a8024bbe Jean*0312 C     GM_BatesK3d :: The 3-d eddy mixing coefficient from Bates etal [m**2/s]
05118ac017 Jean*0313 C     modesC      :: First baroclinic mode at the centre of a tracer cell [-]
                0314 C     modesW      :: First N baroclinic mode at the western face of a cell [-]
                0315 C     modesS      :: First N baroclinic mode at the southern face of a cell [-]
                0316 C     Rdef        :: Deformation radius [m]
                0317 C     gradf       :: gradient of Coriolis paramater at a cell centre, 1/(m*s)
0d1e4b948d Mich*0318 
05118ac017 Jean*0319       _RL GM_BatesK3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0320       _RL modesC   (1,1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0321       _RL modesW(GM_Bates_NModes,
                0322      &                1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0323       _RL modesS(GM_Bates_NModes,
                0324      &                1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0325       _RL Rdef       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0326       _RL gradf      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0327       COMMON /GM_BATES_K/
                0328      &                 GM_BatesK3d,
                0329      &                 modesC, modesW, modesS,
                0330      &                 Rdef, gradf
0d1e4b948d Mich*0331 #endif
f59d76b0dd Ed D*0332 
a4576c7cde Juli*0333 #ifdef GM_GEOM_VARIABLE_K
                0334 C     GEOM_K3d      :: mixing/stirring coefficient (spatially variable in
                0335 C                      horizontal for Marshall et al. (2012) parameterization);
                0336 C                      defined at cell interfaces (W-points)
                0337 C     GEOM_EKE      :: parameterised total eddy energy in GEOMETRIC;
                0338 C                      used to update GEOM_K3d; 2D field
                0339 C     GEOM_gEKE_Nm1 :: 2D eddy energy tendency for AB time-stepping
                0340 C     GEOM_startAB  :: controls time-stepping routine of parameterised
                0341 C                      eddy energy in gmredi_calc_geom.F (=0/1)
                0342 C     GEOM_taper    :: reduce GEOM_K3d based on some conditions (currently
                0343 C                      depth); 2D field
                0344 
                0345       _RL GEOM_K3d     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0346       _RL GEOM_EKE     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0347       _RL GEOM_gEKE_Nm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0348       _RL GEOM_taper   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0349       INTEGER GEOM_startAB
                0350 
                0351       COMMON /GM_GEOM/ GEOM_K3d,
                0352      &                 GEOM_EKE,
                0353      &                 GEOM_gEKE_Nm1,
                0354      &                 GEOM_taper
                0355       COMMON /GM_GEOM_I/ GEOM_startAB
                0356 #endif /* GM_GEOM_VARIABLE_K */
                0357 
f59d76b0dd Ed D*0358 #ifdef ALLOW_GM_LEITH_QG
                0359 C     GM_LeithQG_K :: Horizontal LeithQG viscosity, to add to GM coefficient
                0360       _RL GM_LeithQG_K(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0361       COMMON /GM_LEITH_QG/ GM_LeithQG_K
                0362 #endif /* ALLOW_GM_LEITH_QG */
                0363 
0c49347dc7 Alis*0364 #endif /* ALLOW_GMREDI */