Back to home page

MITgcm

 
 

    


File indexing completed on 2022-03-25 05:09:29 UTC

view on githubraw file Latest commit 7e00d7e8 on 2022-03-24 16:33:13 UTC
4c563c2ee9 Chri*0001 CBOP
3b540d7094 Jean*0002 C     !ROUTINE: FFIELDS.h
4c563c2ee9 Chri*0003 C     !INTERFACE:
                0004 C     include "FFIELDS.h"
                0005 C     !DESCRIPTION:
                0006 C     \bv
                0007 C     *==========================================================*
3b540d7094 Jean*0008 C     | FFIELDS.h
                0009 C     | o Model forcing fields
4c563c2ee9 Chri*0010 C     *==========================================================*
6060ec2938 Dimi*0011 C     | More flexible surface forcing configurations are
14c6f9452b Jean*0012 C     | available via, e.g., pkg/exf
4c563c2ee9 Chri*0013 C     *==========================================================*
                0014 C     \ev
                0015 CEOP
924557e60a Chri*0016 C
6060ec2938 Dimi*0017 C     fu    :: Zonal surface wind stress in N/m^2
                0018 C              > 0 for increase in uVel, which is west to
                0019 C                  east for cartesian and spherical polar grids
                0020 C              Typical range: -0.5 < fu < 0.5
                0021 C              Southwest C-grid U point
4c84b0c69e Patr*0022 C
6060ec2938 Dimi*0023 C     fv    :: Meridional surface wind stress in N/m^2
                0024 C              > 0 for increase in vVel, which is south to
                0025 C                  north for cartesian and spherical polar grids
                0026 C              Typical range: -0.5 < fv < 0.5
                0027 C              Southwest C-grid V point
4c84b0c69e Patr*0028 C
6c510a0118 Jean*0029 C     EmPmR :: Net upward freshwater flux in kg/m2/s
6060ec2938 Dimi*0030 C              EmPmR = Evaporation - precipitation - runoff
                0031 C              > 0 for increase in salt (ocean salinity)
6c510a0118 Jean*0032 C              Typical range: -1e-4 < EmPmR < 1e-4
6060ec2938 Dimi*0033 C              Southwest C-grid tracer point
8f02cfbf56 Dimi*0034 C           NOTE: for backward compatibility EmPmRfile is specified in
                0035 C                 m/s when using external_fields_load.F.  It is converted
                0036 C                 to kg/m2/s by multiplying by rhoConstFresh.
4c84b0c69e Patr*0037 C
ba0b047096 Mart*0038 C  saltFlux :: Net upward salt flux in g/kg.kg/m^2/s = g/m^2/s
cbf60149f1 Jean*0039 C              flux of Salt taken out of the ocean per time unit (second).
ba0b047096 Mart*0040 C              Note: only used when salty sea-ice forms or melts.
3e01d879d6 Jean*0041 C              > 0 for decrease in SSS.
                0042 C              Southwest C-grid tracer point
                0043 C
2d2cc93d4f Jean*0044 C     Qnet  :: Net upward surface heat flux (including shortwave) in W/m^2
                0045 C              Qnet = latent + sensible + net longwave + net shortwave
6060ec2938 Dimi*0046 C              > 0 for decrease in theta (ocean cooling)
                0047 C              Typical range: -250 < Qnet < 600
                0048 C              Southwest C-grid tracer point
4c84b0c69e Patr*0049 C
6060ec2938 Dimi*0050 C     Qsw   :: Net upward shortwave radiation in W/m^2
                0051 C              Qsw = - ( downward - ice and snow absorption - reflected )
                0052 C              > 0 for decrease in theta (ocean cooling)
                0053 C              Typical range: -350 < Qsw < 0
                0054 C              Southwest C-grid tracer point
4c84b0c69e Patr*0055 C
6060ec2938 Dimi*0056 C     SST   :: Sea surface temperature in degrees C for relaxation
                0057 C              Southwest C-grid tracer point
                0058 C
ba0b047096 Mart*0059 C     SSS   :: Sea surface salinity in g/kg for relaxation
6060ec2938 Dimi*0060 C              Southwest C-grid tracer point
                0061 C
7e00d7e8f9 Jean*0062 C     lambdaThetaClimRelax :: Inverse time scale for SST relaxation ( 1/s ).
0ca98629d3 Patr*0063 C
7e00d7e8f9 Jean*0064 C     lambdaSaltClimRelax  :: Inverse time scale for SSS relaxation ( 1/s ).
0ca98629d3 Patr*0065 
8e1649be57 Jean*0066 C     phiTide2d :: vertically uniform (2d-map), time-dependent geopotential
                0067 C                  anomaly (e.g., tidal forcing); Units are m^2/s^2
6285e7ac4f Jean*0068 C     pLoad :: for the ocean:      atmospheric pressure anomaly (relative to
                0069 C                                   "surf_pRef") at z=eta
395b093796 Mart*0070 C                Units are           Pa=N/m^2
6285e7ac4f Jean*0071 C              for the atmosphere (hack): geopotential anomaly of the orography
                0072 C                Units are           m^2/s^2
9cd260ffd3 Jean*0073 C     sIceLoad :: sea-ice loading, expressed in Mass of ice+snow / area unit
b52bf74a5e Jean*0074 C                Units are           kg/m^2
                0075 C              Note: only used with Sea-Ice & RealFreshWater formulation
9cd260ffd3 Jean*0076 C     addMass  :: source (<0: sink) of fluid in the domain interior
                0077 C                 (generalisation of oceanic real fresh-water flux)
                0078 C                Units are           kg/s  (mass per unit of time)
                0079 C     frictionHeating :: heating caused by friction and momentum dissipation
434645f3d4 Jean*0080 C                Units are           in W/m^2 (thickness integrated)
43af9695da Gael*0081 C     eddyPsiX -Zonal Eddy Streamfunction in m^2/s used in taueddy_external_forcing.F
                0082 C     eddyPsiY -Meridional Streamfunction in m^2/s used in taueddy_external_forcing.F
ac957095b5 Patr*0083 C     EfluxY - y-component of Eliassen-Palm flux vector
                0084 C     EfluxP - p-component of Eliassen-Palm flux vector
4c84b0c69e Patr*0085 
96243313d2 Patr*0086       COMMON /FFIELDS_fu/ fu
                0087       COMMON /FFIELDS_fv/ fv
                0088       COMMON /FFIELDS_Qnet/ Qnet
                0089       COMMON /FFIELDS_Qsw/ Qsw
                0090       COMMON /FFIELDS_EmPmR/ EmPmR
                0091       COMMON /FFIELDS_saltFlux/ saltFlux
                0092       COMMON /FFIELDS_SST/ SST
                0093       COMMON /FFIELDS_SSS/ SSS
                0094       COMMON /FFIELDS_lambdaThetaClimRelax/ lambdaThetaClimRelax
                0095       COMMON /FFIELDS_lambdaSaltClimRelax/ lambdaSaltClimRelax
8e1649be57 Jean*0096       COMMON /FFIELDS_phiTide/ phiTide2d
3b540d7094 Jean*0097       COMMON /FFIELDS_pLoad/ pLoad
96243313d2 Patr*0098       COMMON /FFIELDS_sIceLoad/ sIceLoad
395b093796 Mart*0099 
42bd47f06f Chri*0100       _RS  fu       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0101       _RS  fv       (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
4edf45584c Alis*0102       _RS  Qnet     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
2dcaa8b9a5 Patr*0103       _RS  Qsw      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
9d424e3559 Alis*0104       _RS  EmPmR    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
3e01d879d6 Jean*0105       _RS  saltFlux (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
ab42872a05 Alis*0106       _RS  SST      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0107       _RS  SSS      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
96243313d2 Patr*0108       _RS  lambdaThetaClimRelax(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0109       _RS  lambdaSaltClimRelax(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
8e1649be57 Jean*0110       _RS  phiTide2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
3b540d7094 Jean*0111       _RS  pLoad    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
b52bf74a5e Jean*0112       _RS  sIceLoad (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
4c84b0c69e Patr*0113 
9cd260ffd3 Jean*0114 #ifdef ALLOW_ADDFLUID
                0115       COMMON /FFIELDS_ADD_FLUID/ addMass
                0116       _RL addMass(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
ac957095b5 Patr*0117 #endif
434645f3d4 Jean*0118 #ifdef ALLOW_FRICTION_HEATING
                0119       COMMON /FFIELDS_frictionHeat/ frictionHeating
                0120       _RS frictionHeating(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0121 #endif
90929f8806 Patr*0122 #ifdef ALLOW_GEOTHERMAL_FLUX
                0123 C  geothermalFlux :: Upward geothermal flux through bottom cell [W/m^2]
                0124 C                    > 0 for increase in theta (ocean warming)
                0125 C                    Typical range: 0 < geothermalFlux < 1.5 W/m^2
                0126 C                    (global mean on the order 0.09 - 0.1 W/m^2)
                0127       COMMON /FFIELDS_geothermal/ geothermalFlux
                0128       _RS geothermalFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0129 #endif
7e00d7e8f9 Jean*0130 #ifdef ALLOW_BALANCE_FLUXES
                0131 C  weight2BalanceFlx :: weight used for applying weighted correction
                0132 C                       to global-mean surf. flux imbalance ; no-units
                0133       COMMON /FFIELDS_W2BALANCE/ weight2BalanceFlx
                0134       _RS weight2BalanceFlx(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0135 #endif
3b540d7094 Jean*0136 
9cd260ffd3 Jean*0137 C- jmc: commented out until corresponding (ghost-like) code apparition
275ad78b78 Jean*0138 C     dQdT  :: Thermal relaxation coefficient in W/m^2/degrees
                0139 C              Southwest C-grid tracer point
                0140 c     COMMON /FFIELDS_dQdT/ dQdT
                0141 c     _RS  dQdT   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
9cd260ffd3 Jean*0142 c#ifdef ALLOW_EP_FLUX
434645f3d4 Jean*0143 c     COMMON /FFIELDS_eflux/ EfluxY,EfluxP
9cd260ffd3 Jean*0144 c     _RL  EfluxY (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0145 c     _RL  EfluxP (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0146 c#endif
                0147 
43af9695da Gael*0148 #ifdef ALLOW_EDDYPSI
434645f3d4 Jean*0149 C     uEulerMean  :: The Eulerian mean Zonal  velocity (residual less bolus velocity)
                0150 C     vEulerMean  :: The Eulerian mean Merid. velocity (residual less bolus velocity)
                0151 C     tauxEddy    :: The eddy stress used in the momentum equation of a residual model
                0152 C     tauyEddy    :: The eddy stress used in the momentum equation of a residual model
                0153 
                0154       COMMON /FFIELDS_eddyPsi_RS/ eddyPsiX, eddyPsiY
43af9695da Gael*0155       _RS  eddyPsiX (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0156       _RS  eddyPsiY (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
434645f3d4 Jean*0157 
                0158       COMMON /FFIELDS_eddyPsi_RL/
                0159      &                tauxEddy, tauyEddy, uEulerMean, vEulerMean
                0160       _RL tauxEddy  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0161       _RL tauyEddy  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0162       _RL uEulerMean(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0163       _RL vEulerMean(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
                0164 #endif /* ALLOW_EDDYPSI */
ac957095b5 Patr*0165 
3b540d7094 Jean*0166 #ifndef EXCLUDE_FFIELDS_LOAD
632bf64d87 Jean*0167 C     loadedRec     :: time-record currently loaded (in temp arrays *[1])
1e273d1bf5 Jean*0168 C     taux[0,1]     :: Temp. for zonal wind stress
                0169 C     tauy[0,1]     :: Temp. for merid. wind stress
                0170 C     Qnet[0,1]     :: Temp. for heat flux
                0171 C     EmPmR[0,1]    :: Temp. for fresh water flux
                0172 C     saltFlux[0,1] :: Temp. for isurface salt flux
                0173 C     SST[0,1]      :: Temp. for theta climatalogy
                0174 C     SSS[0,1]      :: Temp. for theta climatalogy
                0175 C     Qsw[0,1]      :: Temp. for short wave component of heat flux
3b540d7094 Jean*0176 C     pLoad[0,1]    :: Temp. for atmospheric pressure at z=eta
1e273d1bf5 Jean*0177 C     [0,1]         :: End points for interpolation
7b35cd391f Jean*0178 
                0179       COMMON /FFIELDS_I/ loadedRec
                0180       INTEGER loadedRec(nSx,nSy)
650cc6304d Patr*0181 
                0182       COMMON /TDFIELDS/
                0183      &                 taux0, tauy0, Qnet0, EmPmR0, SST0, SSS0,
1e273d1bf5 Jean*0184      &                 taux1, tauy1, Qnet1, EmPmR1, SST1, SSS1,
                0185      &                 saltFlux0, saltFlux1
650cc6304d Patr*0186 #ifdef SHORTWAVE_HEATING
                0187      &               , Qsw0, Qsw1
3b540d7094 Jean*0188 #endif
8d218e2b5b suya*0189 #ifdef ALLOW_GEOTHERMAL_FLUX
80db5290f0 Jean*0190      &               , geothFlux0, geothFlux1
8d218e2b5b suya*0191 #endif
650cc6304d Patr*0192 #ifdef ATMOSPHERIC_LOADING
3b540d7094 Jean*0193      &               , pLoad0, pLoad1
650cc6304d Patr*0194 #endif
                0195 
                0196       _RS  taux0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0197       _RS  tauy0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0198       _RS  Qnet0    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0199       _RS  EmPmR0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1e273d1bf5 Jean*0200       _RS  saltFlux0(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
650cc6304d Patr*0201       _RS  SST0     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0202       _RS  SSS0     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0203       _RS  taux1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0204       _RS  tauy1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0205       _RS  Qnet1    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0206       _RS  EmPmR1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
1e273d1bf5 Jean*0207       _RS  saltFlux1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
650cc6304d Patr*0208       _RS  SST1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0209       _RS  SSS1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0210 #ifdef SHORTWAVE_HEATING
                0211       _RS  Qsw0     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
80db5290f0 Jean*0212       _RS  Qsw1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
650cc6304d Patr*0213 #endif
8d218e2b5b suya*0214 #ifdef ALLOW_GEOTHERMAL_FLUX
80db5290f0 Jean*0215       _RS  geothFlux0(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0216       _RS  geothFlux1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0217 #endif
                0218 #ifdef ATMOSPHERIC_LOADING
                0219       _RS  pLoad0   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0220       _RS  pLoad1   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
8d218e2b5b suya*0221 #endif
3b540d7094 Jean*0222 #endif /* EXCLUDE_FFIELDS_LOAD */
650cc6304d Patr*0223 
7e1abc4cce Jean*0224 C     surfaceForcingU     units are  r_unit.m/s^2 (=m^2/s^2 if r=z)
                0225 C                -> usage in gU:     gU = gU + surfaceForcingU/drF [m/s^2]
                0226 C     surfaceForcingV     units are  r_unit.m/s^2 (=m^2/s^-2 if r=z)
                0227 C                -> usage in gU:     gV = gV + surfaceForcingV/drF [m/s^2]
4c84b0c69e Patr*0228 C
ba0b047096 Mart*0229 C     surfaceForcingS     units are  r_unit.g/kg/s (=g/kg.m/s if r=z)
7e1abc4cce Jean*0230 C            - EmPmR * S_surf plus salinity relaxation*drF(1)
ba0b047096 Mart*0231 C                -> usage in gS:     gS = gS + surfaceForcingS/drF [g/kg/s]
4c84b0c69e Patr*0232 C
7e1abc4cce Jean*0233 C     surfaceForcingT     units are  r_unit.Kelvin/s (=Kelvin.m/s if r=z)
                0234 C            - Qnet (+Qsw) plus temp. relaxation*drF(1)
4c84b0c69e Patr*0235 C                -> calculate        -lambda*(T(model)-T(clim))
7e1abc4cce Jean*0236 C            Qnet assumed to be net heat flux including ShortWave rad.
                0237 C                -> usage in gT:     gT = gT + surfaceforcingT/drF [K/s]
538310b333 Jean*0238 C     adjustColdSST_diag :: diagnostic field for how much too cold (below
                0239 C              Tfreezing) SST has been adjusted (with allowFreezing=T).
                0240 C              > 0 for increase of SST (up to Tfreezing).
                0241 C              Units are r_unit.K/s (=Kelvin.m/s if r=z).
                0242 C        Note: 1) allowFreezing option is a crude hack to fix too cold SST that
                0243 C              results from missing seaice component. It should never be used
                0244 C              with any seaice component, neither current seaice pkg (pkg/seaice
                0245 C              or pkg/thsice) nor a seaice component from atmos model when
                0246 C              coupled to it.
                0247 C              2) this diagnostic is currently used by KPP package (kpp_calc.F
                0248 C              and kpp_transport_t.F) although it is not very clear it should.
7e1abc4cce Jean*0249 
                0250       COMMON /SURFACE_FORCING/
                0251      &                         surfaceForcingU,
                0252      &                         surfaceForcingV,
                0253      &                         surfaceForcingT,
3b540d7094 Jean*0254      &                         surfaceForcingS,
538310b333 Jean*0255      &                         adjustColdSST_diag
7e1abc4cce Jean*0256       _RL  surfaceForcingU   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0257       _RL  surfaceForcingV   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0258       _RL  surfaceForcingT   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0259       _RL  surfaceForcingS   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
538310b333 Jean*0260       _RL  adjustColdSST_diag(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
434645f3d4 Jean*0261 
14c6f9452b Jean*0262 C     botDragU :: bottom stress (for diagnostics), Zonal component
                0263 C                Units are N/m^2 ;   > 0 increase uVel @ bottom
                0264 C     botDragV :: bottom stress (for diagnostics), Merid. component
                0265 C                Units are N/m^2 ;   > 0 increase vVel @ bottom
                0266       COMMON /FFIELDS_bottomStress/ botDragU, botDragV
                0267       _RS  botDragU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0268       _RS  botDragV (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0269 
434645f3d4 Jean*0270 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|