Back to home page

MITgcm

 
 

    


File indexing completed on 2022-08-15 05:10:07 UTC

view on githubraw file Latest commit cf705a6c on 2022-08-14 22:40:32 UTC
0e09621e3e Patr*0001 CBOP
                0002 C     !ROUTINE: FFIELDS.h
                0003 C     !INTERFACE:
                0004 C     include "FFIELDS.h"
                0005 C     !DESCRIPTION:
                0006 C     \bv
                0007 C     *==========================================================*
                0008 C     | FFIELDS.h
                0009 C     | o Model forcing fields
                0010 C     *==========================================================*
                0011 C     | More flexible surface forcing configurations are
f139f1d32d Jean*0012 C     | available via, e.g., pkg/exf
0e09621e3e Patr*0013 C     *==========================================================*
                0014 C     \ev
                0015 CEOP
                0016 C
                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
                0022 C
                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
                0028 C
                0029 C     EmPmR :: Net upward freshwater flux in kg/m2/s
                0030 C              EmPmR = Evaporation - precipitation - runoff
                0031 C              > 0 for increase in salt (ocean salinity)
                0032 C              Typical range: -1e-4 < EmPmR < 1e-4
                0033 C              Southwest C-grid tracer point
                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.
                0037 C
2e7aec9951 dngo*0038 C  saltFlux :: Net upward salt flux in g/kg.kg/m^2/s = g/m^2/s
0e09621e3e Patr*0039 C              flux of Salt taken out of the ocean per time unit (second).
2e7aec9951 dngo*0040 C              Note: only used when salty sea-ice forms or melts.
0e09621e3e Patr*0041 C              > 0 for decrease in SSS.
                0042 C              Southwest C-grid tracer point
                0043 C
                0044 C     Qnet  :: Net upward surface heat flux (including shortwave) in W/m^2
                0045 C              Qnet = latent + sensible + net longwave + net shortwave
                0046 C              > 0 for decrease in theta (ocean cooling)
                0047 C              Typical range: -250 < Qnet < 600
                0048 C              Southwest C-grid tracer point
                0049 C
                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
                0055 C
                0056 C     SST   :: Sea surface temperature in degrees C for relaxation
                0057 C              Southwest C-grid tracer point
                0058 C
2e7aec9951 dngo*0059 C     SSS   :: Sea surface salinity in g/kg for relaxation
0e09621e3e Patr*0060 C              Southwest C-grid tracer point
                0061 C
2e7aec9951 dngo*0062 C     lambdaThetaClimRelax :: Inverse time scale for SST relaxation ( 1/s ).
0e09621e3e Patr*0063 C
2e7aec9951 dngo*0064 C     lambdaSaltClimRelax  :: Inverse time scale for SSS relaxation ( 1/s ).
0e09621e3e Patr*0065 
37fcf9d1cc Jean*0066 C     phiTide2d :: vertically uniform (2d-map), time-dependent geopotential
                0067 C                  anomaly (e.g., tidal forcing); Units are m^2/s^2
2e7aec9951 dngo*0068 C     pLoad :: for the ocean:      atmospheric pressure anomaly (relative to
                0069 C                                   "surf_pRef") at z=eta
0e09621e3e Patr*0070 C                Units are           Pa=N/m^2
2e7aec9951 dngo*0071 C              for the atmosphere (hack): geopotential anomaly of the orography
                0072 C                Units are           m^2/s^2
37fcf9d1cc Jean*0073 C     sIceLoad :: sea-ice loading, expressed in Mass of ice+snow / area unit
0e09621e3e Patr*0074 C                Units are           kg/m^2
                0075 C              Note: only used with Sea-Ice & RealFreshWater formulation
37fcf9d1cc 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
                0080 C                Units are           in W/m^2 (thickness integrated)
0e09621e3e Patr*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
                0083 C     EfluxY - y-component of Eliassen-Palm flux vector
                0084 C     EfluxP - p-component of Eliassen-Palm flux vector
                0085 
                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
37fcf9d1cc Jean*0096       COMMON /FFIELDS_phiTide/ phiTide2d
0e09621e3e Patr*0097       COMMON /FFIELDS_pLoad/ pLoad
                0098       COMMON /FFIELDS_sIceLoad/ sIceLoad
                0099 
                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)
                0102       _RS  Qnet     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0103       _RS  Qsw      (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0104       _RS  EmPmR    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0105       _RS  saltFlux (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                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)
                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)
37fcf9d1cc Jean*0110       _RS  phiTide2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
0e09621e3e Patr*0111       _RS  pLoad    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0112       _RS  sIceLoad (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0113 
37fcf9d1cc 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)
                0117 #endif
                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
                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
2e7aec9951 dngo*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
37fcf9d1cc Jean*0136 
                0137 C- jmc: commented out until corresponding (ghost-like) code apparition
                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)
                0142 c#ifdef ALLOW_EP_FLUX
                0143 c     COMMON /FFIELDS_eflux/ EfluxY,EfluxP
                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
0e09621e3e Patr*0147 
                0148 #ifdef ALLOW_EDDYPSI
37fcf9d1cc 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
0e09621e3e Patr*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)
37fcf9d1cc 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 */
0e09621e3e Patr*0165 
                0166 #ifndef EXCLUDE_FFIELDS_LOAD
                0167 C     loadedRec     :: time-record currently loaded (in temp arrays *[1])
                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
                0176 C     pLoad[0,1]    :: Temp. for atmospheric pressure at z=eta
                0177 C     [0,1]         :: End points for interpolation
                0178 
                0179       COMMON /FFIELDS_I/ loadedRec
                0180       INTEGER loadedRec(nSx,nSy)
                0181 
                0182       COMMON /TDFIELDS/
                0183      &                 taux0, tauy0, Qnet0, EmPmR0, SST0, SSS0,
                0184      &                 taux1, tauy1, Qnet1, EmPmR1, SST1, SSS1,
                0185      &                 saltFlux0, saltFlux1
                0186 #ifdef SHORTWAVE_HEATING
                0187      &               , Qsw0, Qsw1
                0188 #endif
9c9abe7120 Jean*0189 #ifdef ALLOW_GEOTHERMAL_FLUX
                0190      &               , geothFlux0, geothFlux1
                0191 #endif
0e09621e3e Patr*0192 #ifdef ATMOSPHERIC_LOADING
                0193      &               , pLoad0, pLoad1
                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)
                0200       _RS  saltFlux0(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                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)
                0207       _RS  saltFlux1(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                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)
9c9abe7120 Jean*0210 #ifdef SHORTWAVE_HEATING
                0211       _RS  Qsw0     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0212       _RS  Qsw1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0213 #endif
                0214 #ifdef ALLOW_GEOTHERMAL_FLUX
                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
0e09621e3e Patr*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)
                0221 #endif
                0222 #endif /* EXCLUDE_FFIELDS_LOAD */
                0223 
                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]
                0228 C
2e7aec9951 dngo*0229 C     surfaceForcingS     units are  r_unit.g/kg/s (=g/kg.m/s if r=z)
0e09621e3e Patr*0230 C            - EmPmR * S_surf plus salinity relaxation*drF(1)
2e7aec9951 dngo*0231 C                -> usage in gS:     gS = gS + surfaceForcingS/drF [g/kg/s]
0e09621e3e Patr*0232 C
                0233 C     surfaceForcingT     units are  r_unit.Kelvin/s (=Kelvin.m/s if r=z)
                0234 C            - Qnet (+Qsw) plus temp. relaxation*drF(1)
                0235 C                -> calculate        -lambda*(T(model)-T(clim))
                0236 C            Qnet assumed to be net heat flux including ShortWave rad.
                0237 C                -> usage in gT:     gT = gT + surfaceforcingT/drF [K/s]
9c9abe7120 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.
0e09621e3e Patr*0249 
                0250       COMMON /SURFACE_FORCING/
                0251      &                         surfaceForcingU,
                0252      &                         surfaceForcingV,
                0253      &                         surfaceForcingT,
                0254      &                         surfaceForcingS,
9c9abe7120 Jean*0255      &                         adjustColdSST_diag
0e09621e3e Patr*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)
9c9abe7120 Jean*0260       _RL  adjustColdSST_diag(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
37fcf9d1cc Jean*0261 
f139f1d32d 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 
37fcf9d1cc Jean*0270 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
cf705a6c8e Mart*0271 
                0272 C-    Extra mean heat flux field specific to this experiment
                0273       COMMON /Mean_qnet/ Qnetm
                0274       _RS  Qnetm   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0275 
                0276 c  #include "../code_ad/cost_local.h"
                0277 C-    Content of this experiment specific header file above is added here:
                0278 C     Define some local weights specific to this experiment
                0279 C     whfluxm     :: weight for heat flux
                0280 C     wtheta      :: dummy weight for temperature
                0281       COMMON /COST_LOCAL_WEIGHTS/ whfluxm, wtheta
                0282       _RL whfluxm(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0283       _RL wtheta ( Nr,nSx,nSy )