Back to home page

MITgcm

 
 

    


File indexing completed on 2023-03-29 05:09:42 UTC

view on githubraw file Latest commit cda1c18f on 2023-03-28 22:31:47 UTC
4c563c2ee9 Chri*0001 CBOP
                0002 C     !ROUTINE: DYNVARS.h
                0003 C     !INTERFACE:
                0004 C     include "DYNVARS.h"
                0005 C     !DESCRIPTION:
                0006 C     \bv
                0007 C     *==========================================================*
c730c17a9a Jean*0008 C     | DYNVARS.h
                0009 C     | o Dynamical model variables (common block DYNVARS_R)
4c563c2ee9 Chri*0010 C     *==========================================================*
c730c17a9a Jean*0011 C     | The value and two levels of time tendency are held for
                0012 C     | each prognostic variable.
4c563c2ee9 Chri*0013 C     *==========================================================*
                0014 C     \ev
                0015 CEOP
ded8d2b87a Jean*0016 
                0017 C     State Variables:
                0018 C     etaN  :: free-surface r-anomaly (r unit) at current time level
                0019 C     uVel  :: zonal velocity (m/s, i=1 held at western face)
                0020 C     vVel  :: meridional velocity (m/s, j=1 held at southern face)
                0021 C     theta :: potential temperature (oC, held at pressure/tracer point)
ba0b047096 Mart*0022 C     salt  :: salinity (g/kg, held at pressure/tracer point; note that
                0023 C              salinity is either a conductivity ratio or, if using TEOS10,
                0024 C              a mass ratio;here we assume it is a mass ratio even though
                0025 C              it is only correct for TEOS10)
ded8d2b87a Jean*0026 C     gX, gxNm1 :: Time tendencies at current and previous time levels.
                0027 C     etaH  :: surface r-anomaly, advanced in time consistently
c730c17a9a Jean*0028 C              with 2.D flow divergence (Exact-Conservation):
06b55a9dd4 Jean*0029 C                etaH^n+1 = etaH^n - delta_t*Div.(H^n U^n+1)
                0030 C  note: a) used with "exactConserv", necessary for Non-Lin free-surf and mixed
                0031 C           forward/backward free-surf time stepping (e.g., Crank-Nickelson)
66db860efa Jean*0032 C        b) same as etaN but not necessarily at the same time, e.g.:
06b55a9dd4 Jean*0033 C           implicDiv2DFlow=1 => etaH=etaN ; =0 => etaH=etaN^(n-1);
88830be691 Alis*0034 
1df270248b Jean*0035 #ifdef ALLOW_ADAMSBASHFORTH_3
aea29c8517 Alis*0036       COMMON /DYNVARS_R/
832d5360e3 Patr*0037      &                   etaN,
aea29c8517 Alis*0038      &                   uVel,vVel,wVel,theta,salt,
89aa2c0123 Jean*0039      &                   gU,   gV,
1df270248b Jean*0040      &                   guNm, gvNm, gtNm, gsNm
                0041 #else /* ALLOW_ADAMSBASHFORTH_3 */
                0042       COMMON /DYNVARS_R/
832d5360e3 Patr*0043      &                   etaN,
1df270248b Jean*0044      &                   uVel,vVel,wVel,theta,salt,
89aa2c0123 Jean*0045      &                   gU,   gV,
1df270248b Jean*0046      &                   guNm1,gvNm1,gtNm1,gsNm1
                0047 #endif /* ALLOW_ADAMSBASHFORTH_3 */
aea29c8517 Alis*0048       _RL  etaN  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
3d6b649e23 Chri*0049       _RL  uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0050       _RL  vVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
fb481a83c2 Alis*0051       _RL  wVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
3d6b649e23 Chri*0052       _RL  theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0053       _RL  salt (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
1df270248b Jean*0054       _RL  gU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0055       _RL  gV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0056 #ifdef ALLOW_ADAMSBASHFORTH_3
                0057       _RL  guNm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,2)
                0058       _RL  gvNm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,2)
                0059       _RL  gtNm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,2)
                0060       _RL  gsNm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,2)
                0061 #else /* ALLOW_ADAMSBASHFORTH_3 */
3d6b649e23 Chri*0062       _RL  guNm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0063       _RL  gvNm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0064       _RL  gtNm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0065       _RL  gsNm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
1df270248b Jean*0066 #endif /* ALLOW_ADAMSBASHFORTH_3 */
8fe5594931 Patr*0067 
89aa2c0123 Jean*0068 #ifdef USE_OLD_EXTERNAL_FORCING
                0069       COMMON /DYNVARS_OLD/
                0070      &                   gT,   gS
                0071       _RL  gT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0072       _RL  gS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0073 #endif
                0074 
832d5360e3 Patr*0075       COMMON /DYNVARS_R_2/
                0076      &                   etaH
                0077       _RL  etaH  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0078 
66db860efa Jean*0079 #if (defined (ALLOW_3D_DIFFKR) || defined (ALLOW_DIFFKR_CONTROL))
a7c5f770ff Dimi*0080 C     diffKr :: full 3D specification of Laplacian diffusion coeff.
                0081 C               for mixing of tracers vertically ( units of r^2/s )
8fe5594931 Patr*0082       COMMON /DYNVARS_DIFFKR/
                0083      &                       diffKr
                0084       _RL  diffKr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0085 #endif
3760dc594c Jean*0086 
2d5bb917cc Jean*0087 #ifdef ALLOW_SMAG_3D_DIFFUSIVITY
                0088 C     smag3D_diffK :: isotropic 3D diffusivity from Smagorisky viscosity
                0089 C                     at grid-cell center (units: m^2/s )
                0090       COMMON /DYNVARS_DIFFK_SMAG3D/ smag3D_diffK
                0091       _RL smag3D_diffK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0092 #endif
                0093 
a6350907f1 Jean*0094 C   The following blocks containing requires anomaly fields of control vars
89aa2c0123 Jean*0095 C   and related to Options:
a6350907f1 Jean*0096 C   ALLOW_KAPGM_CONTROL , ALLOW_KAPREDI_CONTROL and ALLOW_BOTTOMDRAG_CONTROL
                0097 C   have been moved to header file "CTRL_FIELDS.h"
                0098 
e40c34e398 Dimi*0099 #ifdef ALLOW_BL79_LAT_VARY
                0100 C     BL79LatArray :: is used for latitudinal dependence of
                0101 C                     BryanLewis79 vertical diffusivity
e5c81aae83 Dimi*0102       COMMON /DYNVARS_BL79LatArray/ BL79LatArray
e40c34e398 Dimi*0103       _RL BL79LatArray (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0104 #endif
                0105 
ded8d2b87a Jean*0106 C     Diagnostic Variables:
45b02a5c38 Jean*0107 C     rhoInSitu    :: In-Situ density anomaly [kg/m^3] at cell center level.
c730c17a9a Jean*0108 C     totPhiHyd    :: total hydrostatic Potential (anomaly, for now),
                0109 C                     at cell center level ; includes surface contribution.
                0110 C                     (for diagnostic + used in Z-coord with EOS_funct_P)
45b02a5c38 Jean*0111 C     phiHydLow    :: Phi-Hydrostatic at r-lower boundary
                0112 C                     (bottom in z-coordinates, top in p-coordinates)
c730c17a9a Jean*0113 C     hMixLayer    :: Mixed layer depth [m]
                0114 C                     (for diagnostic + used GMRedi "fm07")
fa49f16b06 Jean*0115 C     IVDConvCount :: Impl.Vert.Diffusion convection counter:
c730c17a9a Jean*0116 C                     = 0 (not convecting) or 1 (convecting)
                0117       COMMON /DYNVARS_DIAG/
795d169011 Jean*0118      &                rhoInSitu,
45b02a5c38 Jean*0119      &                totPhiHyd, phiHydLow,
795d169011 Jean*0120      &                hMixLayer, IVDConvCount
ded8d2b87a Jean*0121       _RL  rhoInSitu(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
45b02a5c38 Jean*0122       _RL  totPhiHyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0123       _RL  phiHydLow(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
c730c17a9a Jean*0124       _RL  hMixLayer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
fa49f16b06 Jean*0125       _RL  IVDConvCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
c730c17a9a Jean*0126 
cda1c18f72 Jean*0127 #ifdef ALLOW_LEITH_QG
f59d76b0dd Ed D*0128 C     Leith QG dynamic viscosity scheme requires buoyancy frequency.
                0129 C     Store sigmaRfield to avoid computing density multiple times and give
                0130 C     access to all levels during the k-loop
                0131 C     sigmaRfield           :: vertical gradient of buoyancy.
                0132       COMMON /DYNVARS_sigmaR/ sigmaRfield
                0133       _RL sigmaRfield  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
cda1c18f72 Jean*0134 #endif /* ALLOW_LEITH_QG */
f59d76b0dd Ed D*0135 
795d169011 Jean*0136 #ifdef ALLOW_SOLVE4_PS_AND_DRAG
                0137 C     Variables for Implicit friction (& vert. visc) in 2-D pressure solver
                0138 C     dU_psFacX    :: zonal velocity increment factor from (implicit) surf.
                0139 C                     pressure gradient in X (no Units)
                0140 C     dV_psFacY    :: merid velocity increment factor from (implicit) surf.
                0141 C                     pressure gradient in Y (no Units)
                0142 
                0143       COMMON /DYNVARS_DRAG_IN_PS/
                0144      &                dU_psFacX, dV_psFacY
                0145       _RL  dU_psFacX(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0146       _RL  dV_psFacY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0147 #endif /* ALLOW_SOLVE4_PS_AND_DRAG */
fb2c52cfd4 aver*0148 
                0149 #ifdef INCLUDE_SOUNDSPEED_CALC_CODE
                0150 C     cSound       :: Speed of sound in seawater (m/s)
                0151 C                     following Del Grosso (1974)
                0152       COMMON /DYNVARS_cSound/ cSound
                0153       _RL  cSound(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0154 #endif /* INCLUDE_SOUNDSPEED_CALC_CODE */
                0155