mom_stoch_eos module reference
Provides the ocean stochastic equation of state.
Data Types
Describes parameters of the stochastic component of the EOS correction, described in Stanley et al. |
Functions/Subroutines
Initializes MOM_stoch_eos module, returning a logical indicating whether this module will be used. |
|
Register fields related to the stoch_EOS module for resarts. |
|
Generates a pattern in space and time for the ocean stochastic equation of state. |
|
Write out any diagnostics related to this module. |
|
Computes a parameterization of the SGS temperature variance. |
Detailed Description
This module provides the foundation of the Stanley parameterization ([80]) for correcting the computation of density. Density is not a prognostic variable in MOM6; it is computed for various purposes in various places. The correction to this calculation provided by this module has been implemented in some places where density is used, but not all.
To use the correction, first set STOCH_EOS=True. Then, choose the constant c from (25) of [80]. This is controlled using STANLEY_COEFF. Setting a negative value will result in an error. [80] found a value of 0.2 offline, coarsening from 0.1 to 1 degree resolution. [48] proposed a value of 0.5 in a 2/3 degree resolution model.
Whether the correction is deterministic or stochastic can be controlled using the variable STANLEY_A. Setting this to 0.0 uses the deterministic version, while a value of 1.0 produces the stochastic version. Reducing from 1 to 0 smoothly transitions from stochastic to deterministic.
To turn the correction on in various parts of the code, use
* USE_STANLEY_PGF=True for the pressure gradient force (cf. [48])
USE_STANLEY_ISO=Trueto correct the computation of isopycnal slopes (used in many places)USE_STANLEY_GM=Trueto use the parameterization within GM (cf. [5])USE_STANLEY_ML=Trueto use the parameterization within the mixed-layer restratification parameterization. It applies to both the OM4 and Bodner schemes. (cf. [5])
For ensemble simulations, the random number generator seed can be controlled using the parameter SEED_STOCH_EOS
Type Documentation
- type mom_stoch_eos/mom_stoch_eos_cs
Describes parameters of the stochastic component of the EOS correction, described in Stanley et al. JAMES 2020.
- Type fields:
% id_stoch_eos ::
integerDiagnostic IDs.% id_stoch_phi ::
integerDiagnostic IDs.% id_tvar_sgs ::
integerDiagnostic IDs.% l2_inv ::
real, dimension(:,:), allocatableOne over sum of the T cell side side lengths squared [L-2 ~> m-2].% rgauss ::
real, dimension(:,:), allocatablenondimensional random Gaussian [nondim]% tfac ::
realNondimensional decorrelation time factor, ~1/3.7 [nondim].% amplitude ::
realNondimensional standard deviation of Gaussian [nondim].% seed ::
integerPRNG seed.% rn_cs ::
type(prng)PRNG control structure.% pattern ::
real, dimension(:,:), allocatableRandom pattern for stochastic EOS [nondim].% phi ::
real, dimension(:,:), allocatabletemporal correlation stochastic EOS [nondim]% use_stoch_eos ::
logicalIf true, use the stochastic equation of state (Stanley et al. 2020)% stanley_coeff ::
realCoefficient correlating the temperature gradient and SGS T variance [nondim]; if <0, turn off scheme in all codes.% stanley_a ::
reala in exp(aX) in stochastic coefficient [nondim]% kappa_smooth ::
realA diffusivity for smoothing T/S in vanished layers [H Z T-1 ~> m2 s-1 or kg m-1 s-1].
Function/Subroutine Documentation
- function mom_stoch_eos/mom_stoch_eos_init(Time, G, GV, US, param_file, diag, CS, restart_CS)
Initializes MOM_stoch_eos module, returning a logical indicating whether this module will be used.
- Parameters:
time :: [in] Time for stochastic process
g :: [in] The ocean’s grid structure.
gv :: [in] Vertical grid structure
us :: [in] A dimensional unit scaling type
param_file ::
param_file[in] structure indicating parameter file to parsediag ::
diag[inout] Structure used to control diagnosticscs :: [inout] Stochastic control structure
restart_cs :: A pointer to the restart control structure.
- Call to:
mom_restart::is_new_runmom_error_handler::mom_errormom_random::random_2d_constructormom_random::random_2d_normmom_diag_mediator::register_diag_field
- subroutine mom_stoch_eos/stoch_eos_register_restarts(HI, param_file, CS, restart_CS)
Register fields related to the stoch_EOS module for resarts.
- Parameters:
hi :: [in] Horizontal index structure
param_file ::
param_file[in] structure indicating parameter file to parsecs :: [inout] Stochastic control structure
restart_cs :: A pointer to the restart control structure.
- Called from:
- subroutine mom_stoch_eos/mom_stoch_eos_run(G, u, v, delt, Time, CS)
Generates a pattern in space and time for the ocean stochastic equation of state.
- Parameters:
g :: [in] The ocean’s grid structure.
u ::
u[in] The zonal velocity [L T-1 ~> m s-1].v ::
v[in] The meridional velocity [L T-1 ~> m s-1].delt ::
delt[in] Time step size for AR1 process [T ~> s].time :: [in] Time for stochastic process
cs :: [inout] Stochastic control structure
- Call to:
mom_random::random_2d_constructormom_random::random_2d_norm
- subroutine mom_stoch_eos/post_stoch_eos_diags(CS, tv, diag)
Write out any diagnostics related to this module.
- Parameters:
cs :: [in] Stochastic control structure
tv ::
tv[in] Thermodynamics structurediag ::
diag[inout] Structure to control diagnostics
- Called from:
- subroutine mom_stoch_eos/mom_calc_vart(G, GV, US, h, tv, CS, dt)
Computes a parameterization of the SGS temperature variance.
- Parameters:
g :: [in] The ocean’s grid structure.
gv :: [in] Vertical grid structure
us :: [in] A dimensional unit scaling type
h ::
h[in] Layer thickness [H ~> m]tv ::
tv[inout] Thermodynamics structurecs :: [inout] Stochastic control structure
dt ::
dt[in] Time increment [T ~> s]
- Call to:
- Called from: