Back to home page

MITgcm

 
 

    


File indexing completed on 2023-08-04 05:10:41 UTC

view on githubraw file Latest commit 45315406 on 2023-08-03 16:50:12 UTC
fefe253d88 Dimi*0001 CBOP
                0002 C !ROUTINE: SEAICE.h
                0003 
                0004 C !DESCRIPTION: \bv
3c80412959 Jean*0005 C     *==========================================================*
                0006 C     | SEAICE.h
                0007 C     | o Basic header for sea ice model.
                0008 C     |   Contains most sea ice field declarations.
                0009 C     *==========================================================*
809c36b928 Patr*0010 C
3c80412959 Jean*0011 C     UICE  :: zonal ice velocity in m/s at South-West B-grid
                0012 C              (or C-grid #ifdef SEAICE_CGRID) U point
                0013 C              >0 from West to East
                0014 C     VICE  :: meridional ice velocity in m/s at South-West B-grid
                0015 C              (or C-grid #ifdef SEAICE_CGRID) V point
                0016 C              >0 from South to North
                0017 C              note: the South-West B-grid U and V points are on
460cb5f999 Dimi*0018 C                the lower, left-hand corner of each grid cell
3c80412959 Jean*0019 C     AREA  :: fractional ice-covered area in m^2/m^2
                0020 C              at center of grid, i.e., tracer point
                0021 C              0 is no cover, 1 is 100% cover
                0022 C     HEFF  :: effective ice thickness in m
                0023 C              at center of grid, i.e., tracer point
                0024 C              note: for non-zero AREA, actual ice thickness is HEFF / AREA
                0025 C     HSNOW :: effective snow thickness in m
                0026 C              at center of grid, i.e., tracer point
                0027 C              note: for non-zero AREA, actual snow thickness is HSNOW / AREA
fefe253d88 Dimi*0028 C \ev
                0029 CEOP
b61db21361 Mart*0030 
                0031 C--   Grid variables for seaice
8377b8ee87 Mart*0032 C     static masks (depend only on geometry)
                0033 C     HEFFM     :: land-sea mask at C-points (copy of maskC(k=kSrf))
                0034 C     SIMaskU/V :: land-sea mask at U/V-points (copies of maskW/S(k=kSrf))
ec0d7df165 Mart*0035       COMMON/ARRAY/HEFFM, SIMaskU, SIMaskV
772590b63c Mart*0036       _RL HEFFM      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
ec0d7df165 Mart*0037       _RL SIMaskU    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0038       _RL SIMaskV    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0039 
                0040 #if ( defined SEAICE_CGRID || defined SEAICE_BGRID_DYNAMICS )
                0041       COMMON/ARRAYMETRIC/  k1AtC, k2AtC
                0042       _RS k1AtC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0043       _RS k2AtC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0044 #endif
                0045 
b61db21361 Mart*0046 #ifdef SEAICE_CGRID
                0047       COMMON/ARRAYC/ seaiceMaskU, seaiceMaskV
ec0d7df165 Mart*0048 C     dynamic masks (depend on area)
772590b63c Mart*0049       _RL seaiceMaskU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0050       _RL seaiceMaskV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
b61db21361 Mart*0051 C     k1/2AtZ :: coefficients at C and Z points
                0052 C     k1/2AtC    for metric terms in U/V ice equations.
45315406aa Mart*0053       COMMON/ARRAYCMETRIC/  k1AtZ, k2AtZ
772590b63c Mart*0054       _RS k1AtZ      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0055       _RS k2AtZ      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0056 #endif /* SEAICE_CGRID */
                0057 
                0058 #ifdef SEAICE_BGRID_DYNAMICS
8377b8ee87 Mart*0059 C     UVM         :: B-grid velocity-point mask
b61db21361 Mart*0060       COMMON/ARRAYB/ UVM
48474b8e08 Jean*0061       _RS UVM        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
e1d2983c5b Mart*0062 C     k1/2AtC/U/V :: coefficients at C, U, and V points
                0063 C                    for metric terms in U/V ice equations.
45315406aa Mart*0064       COMMON/ARRAYBMETRIC/ k1AtU, k1AtV, k2AtU, k2AtV
48474b8e08 Jean*0065       _RS k1AtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0066       _RS k1AtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0067       _RS k2AtU      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0068       _RS k2AtV      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0069 #endif /* SEAICE_BGRID_DYNAMICS */
b61db21361 Mart*0070 
                0071 C--   Dynamical variables
45315406aa Mart*0072       COMMON/SEAICE_DYNVARS_1/
                0073      &     AREA, HEFF, HSNOW, UICE, VICE
                0074       _RL AREA       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0075       _RL HEFF       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0076       _RL HSNOW      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0077       _RL UICE       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0078       _RL VICE       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0079 C     DWATN         :: (linear) ice-ocean drag coefficient
                0080 C                      ( units of [rho|u|] = kg/m^2/s )
                0081 C     u/vIceNm1     :: sea ice drift velocities of previous timestep (m/s)
                0082       COMMON/SEAICE_DYNVARS_2/
                0083      &     DWATN,
                0084      &     uIceNm1, vIceNm1
                0085       _RL DWATN      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0086       _RL uIceNm1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0087       _RL vIceNm1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0088 
86b84a92fc Patr*0089 #ifdef SEAICE_ITD
45315406aa Mart*0090       COMMON/SEAICE_DYNVARS_ITD/
                0091      &     AREAITD, HEFFITD, HSNOWITD,
                0092      &     opnWtrFrac, fw2ObyRidge
8377b8ee87 Mart*0093 C     Fields for dynamic ice thickness distribution (ITD)
                0094 C     AREAITD     :: area classes
                0095 C     HEFFITD     :: ice thickenss classes (in meters)
                0096 C     HSNOWITD    :: snow thickness classes (in meters)
                0097 C     openWtrFrac :: fraction of open water (= 1-AREA) for ridging param.
                0098 C     fw2ObyRidge :: fresh water flux (kg/m^2/s) due to snow pushed into
                0099 C                    ocean during ridging
86b84a92fc Patr*0100       _RL AREAITD    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nITD,nSx,nSy)
                0101       _RL HEFFITD    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nITD,nSx,nSy)
                0102       _RL HSNOWITD   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nITD,nSx,nSy)
b1ac83383d Mart*0103       _RL opnWtrFrac (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
d445b0e4a7 Mart*0104       _RL fw2ObyRidge(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
f913c5a485 Mart*0105 #endif /* SEAICE_ITD */
4b1ace36e3 Mart*0106 
45315406aa Mart*0107 #ifdef SEAICE_CGRID
                0108 C     stressDivergenceX/Y :: div of (vert. integr.) stress tensor (N/m^2)
                0109       COMMON /SEAICE_STRESSDIV/
                0110      &     stressDivergenceX, stressDivergenceY
                0111       _RL stressDivergenceX(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0112       _RL stressDivergenceY(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0113 # ifdef SEAICE_ALLOW_EVP
                0114 C--   Additional fields needed by the EVP solver:
                0115 C     (vertically integrated) stress tensor, with diagonal terms sigma11/22
                0116 C     seaice_sigma1  :: sigma11+sigma22, defined at C-points   (N/m)
                0117 C     seaice_sigma2  :: sigma11-sigma22, defined at C-points   (N/m)
                0118 C     seaice_sigma12 :: off-diagonal term, defined at Z-points (N/m)
                0119       COMMON /SEAICE_EVP_FIELDS/
                0120      &     seaice_sigma1, seaice_sigma2, seaice_sigma12
                0121       _RL seaice_sigma1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0122       _RL seaice_sigma2    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0123       _RL seaice_sigma12   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0124 # endif /* SEAICE_ALLOW_EVP */
                0125 #endif
                0126 
                0127 #if ( defined SEAICE_CGRID || defined SEAICE_BGRID_DYNAMICS )
8377b8ee87 Mart*0128 C     ETA,  etaZ    :: shear viscosity as C-points, at Z-points (N s/m = kg/s)
                0129 C     ZETA, zetaA   :: bulk viscosity at C-points, at Z-points
                0130 C     PRESS         :: maximum vertically integrated ice strength/pressure (N/m)
                0131 C     e11, e22, e12 :: components strain rate tensor (1/s)
                0132 C     deltaC        :: deformation rate tensor invariant, for VP sea ice
                0133 C                      = sqrt( (e11+e22)**2 + (1/e)*(e11-e22)**2 + 4*e12**2) )
                0134 C     FORCEX/Y      :: momentum forcing
                0135 C                      ( units of [rho * h * u / deltaT] = kg/m/s^2 )
45315406aa Mart*0136 C     tensileStrFac :: factor k to compute the maximal tensile stress k*PRESS0
065b1424ce Patr*0137       COMMON/SEAICE_DYNVARS_3/
45315406aa Mart*0138      &     ETA, etaZ, ZETA, zetaZ, PRESS, tensileStrFac,
                0139      &     e11, e22, e12, deltaC,
                0140      &     FORCEX,FORCEY
                0141 
772590b63c Mart*0142       _RL ETA        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
5ee9d8ba4b Mart*0143       _RL etaZ       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
772590b63c Mart*0144       _RL ZETA       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1459e8fe5a Mart*0145       _RL zetaZ      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7bdcfa8e6c Mart*0146 C     ice strength/pressure term
772590b63c Mart*0147       _RL PRESS      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0148       _RL tensileStrFac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7bdcfa8e6c Mart*0149 C     strain rate tensor
772590b63c Mart*0150       _RL e11        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0151       _RL e22        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0152       _RL e12        (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
36fa289698 Mart*0153       _RL deltaC     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
7bdcfa8e6c Mart*0154 C
772590b63c Mart*0155       _RL FORCEX     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0156       _RL FORCEY     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
2f88b60189 Mart*0157 
8377b8ee87 Mart*0158 C     PRESS0        :: maximal compressive stress/strength (N/m)
                0159 C     FORCEX/Y0     :: external momentum forcing fields (part of FORCEX/Y)
8e32c48b8f Mart*0160 C     SEAICE_zMax/zMin :: maximum/minimum bulk viscosities
8377b8ee87 Mart*0161       COMMON/SEAICE_DYNVARS_4/
45315406aa Mart*0162      &     PRESS0, FORCEX0, FORCEY0, SEAICE_zMax, SEAICE_zMin
                0163       _RL PRESS0     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0164       _RL FORCEX0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0165       _RL FORCEY0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0166       _RL SEAICE_zMax(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0167       _RL SEAICE_zMin(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0168 #endif
8377b8ee87 Mart*0169 
                0170 #ifdef SEAICE_CGRID
                0171 C     seaiceMassC/U/V :: mass (ice+snow) at C/U/V-points ( kg/m^2 )
2f88b60189 Mart*0172       COMMON/SEAICE_DYNVARS_CGRID/
2f5e8addfd Mart*0173      &     seaiceMassC, seaiceMassU, seaiceMassV
                0174       _RL seaiceMassC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0175       _RL seaiceMassU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0176       _RL seaiceMassV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
8377b8ee87 Mart*0177 # ifdef SEAICE_ALLOW_FREEDRIFT
                0178 C     u/vice_fd :: free drift velocities (m/s)
                0179       COMMON /SEAICE_FD_FIELDS/
                0180      &     uice_fd, vice_fd
                0181       _RL uice_fd   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0182       _RL vice_fd   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0183 # endif
809c36b928 Patr*0184 
8377b8ee87 Mart*0185 # ifdef SEAICE_ALLOW_BOTTOMDRAG
                0186 C     CbobC :: (linear) bottom drag coefficient for basals stress param.
abb637800a Mart*0187       COMMON/SEAICE_BOTTOMDRAG/ CbotC
                0188       _RL CbotC      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
8377b8ee87 Mart*0189 # endif /* SEAICE_ALLOW_BOTTOMDRAG */
                0190 
45315406aa Mart*0191 # if ( defined SEAICE_ALLOW_JFNK ||  defined SEAICE_ALLOW_KRYLOV )
8377b8ee87 Mart*0192 C     diagnostics for the JFNK and Krylov solver
                0193       INTEGER totalNewtonIters
                0194       INTEGER totalNewtonFails
                0195       INTEGER totalKrylovIters
                0196       INTEGER totalKrylovFails
                0197       INTEGER totalJFNKtimeSteps
                0198       COMMON /SEAICE_SOLVER_I/
                0199      &     totalNewtonIters, totalNewtonFails,
                0200      &     totalKrylovIters, totalKrylovFails,
                0201      &     totalJFNKtimeSteps
45315406aa Mart*0202 C     Scalar product used in FGMRES needs a metric
8377b8ee87 Mart*0203       INTEGER nVec
                0204       PARAMETER ( nVec=2*sNx*sNy )
                0205       _RL scalarProductMetric( nVec, 1, nSx, nSy )
                0206       COMMON /SEAICE_KRYLOV_RL/ scalarProductMetric
                0207 # endif /* SEAICE_ALLOW_JFNK or SEAICE_ALLOW_KRYLOV */
                0208 
45315406aa Mart*0209 #endif /* SEAICE_CGRID */
                0210 
                0211 #ifdef SEAICE_BGRID_DYNAMICS
8377b8ee87 Mart*0212 C     AMASS :: sea ice mass
                0213 C     DAIRN :: (linear) atmosphere-ice drag coefficient
45315406aa Mart*0214 C     u/vIceC has been renamed to u/vIceC to avoid conficts with C-grid code
                0215 C     uIceB :: average of UICE between last two time steps
                0216 C     vIceB :: average of VICE between last two time steps
                0217       COMMON/SEAICE_DYNVARS_BGRID/ AMASS, DAIRN, uIceB, vIceB
8377b8ee87 Mart*0218       _RL AMASS      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0219       _RL DAIRN      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0220       _RL uIceB      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0221       _RL vIceB      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
8377b8ee87 Mart*0222 
                0223       COMMON/WIND_STRESS_OCE/WINDX,WINDY
                0224 C     WINDX  - zonal      wind stress over water at C points
                0225 C     WINDY  - meridional wind stress over water at C points
                0226       _RL WINDX      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0227       _RL WINDY      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0228 
                0229 C     GWATX/Y :: geostrophic ocean velocities
                0230       COMMON/GWATXY/GWATX,GWATY
                0231       _RL GWATX      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0232       _RL GWATY      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0233 
                0234 C--   KGEO    Level used as a proxy for geostrophic velocity.
                0235       COMMON/SEAICE_KGEO/KGEO
                0236       INTEGER KGEO   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45315406aa Mart*0237 #endif /* SEAICE_BGRID_DYNAMICS */
53092bcb42 Mart*0238 
1cf549c217 Mart*0239       COMMON/SEAICE_REG_NEG/d_HEFFbyNEG,d_HSNWbyNEG
                0240 C     The change of mean ice thickness due to out-of-bounds values following
                0241 C     sea ice dynamics and advection
                0242       _RL d_HEFFbyNEG (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0243       _RL d_HSNWbyNEG (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
ccbdcd2957 Jean*0244 C
1cf549c217 Mart*0245 #ifdef EXF_SEAICE_FRACTION
                0246       COMMON/SEAICE_RELAX/d_AREAbyRLX,d_HEFFbyRLX
                0247 C     ICE/SNOW stocks tendency associated with relaxation towards observation
                0248       _RL d_AREAbyRLX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0249 C     The change of mean ice thickness due to relaxation
                0250       _RL d_HEFFbyRLX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0251 #endif /* EXF_SEAICE_FRACTION */
8377b8ee87 Mart*0252 
a98c4b8072 Ian *0253 #ifdef SEAICE_VARIABLE_SALINITY
8377b8ee87 Mart*0254 C     HSALT          :: effective sea ice salinity in g/m^2
                0255 C                       at center of grid, i.e., tracer point
                0256 C     saltFluxAdjust :: adjust salt flux, if HSALT < 0 (e.g. due to advection)
1cf549c217 Mart*0257       COMMON/SEAICE_SALINITY_R/HSALT, saltFluxAdjust
                0258       _RL HSALT         (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0259       _RL saltFluxAdjust(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0260 #endif /* SEAICE_VARIABLE_SALINITY */
fdfa8e151f Dimi*0261 
8377b8ee87 Mart*0262 C     saltWtrIce :: contains m of salty ice melted (<0) or created (>0)
                0263 C     frWtrIce   :: contains m of freshwater ice melted (<0) or created (>0)
                0264 C                   that is, ice due to precipitation or snow
14ff2fe9e4 Dimi*0265       COMMON/ICEFLUX/ saltWtrIce, frWtrIce
772590b63c Mart*0266       _RL saltWtrIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0267       _RL frWtrIce   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1cfef3b6ad Patr*0268 
5e0369b6fa Mart*0269 C     TICES :: Seaice/snow surface temperature for each category
89a0cb7c99 Mart*0270       COMMON/MULTICATEGORY/TICES
f913c5a485 Mart*0271       _RL TICES      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nITD,nSx,nSy)
6c847351e2 Patr*0272 
8e32c48b8f Mart*0273 C     SEAICE_SWFrac :: Fraction of surface Short-Wave radiation reaching
                0274 C                      the bottom of ocean surface level. Currently,
                0275 C                      this is just a function of surface cell
                0276 C                      thickness, and hence a constant parameter
                0277 C                      computed in seaice_init_fixed.F in a given
                0278 C                      simulation, but in the future this variable may
                0279 C                      depend on variable turbidity or chlorphyll
                0280 C                      concentration and can change with space and time.
                0281       _RL SEAICE_SWFrac
95029569c8 Patr*0282       COMMON /SEAICE_SW_R/
8e32c48b8f Mart*0283      &       SEAICE_SWFrac
95029569c8 Patr*0284 
9a87ea5e43 Ed H*0285 CEH3 ;;; Local Variables: ***
                0286 CEH3 ;;; mode:fortran ***
                0287 CEH3 ;;; End: ***