MOM_stoch_eos module reference

Provides the ocean stochastic equation of state

Data Types

MOM_stoch_eos_CS

Describes parameters of the stochastic component of the EOS correction, described in Stanley et al. JAMES 2020.

Functions/Subroutines

MOM_stoch_eos_init

Initializes MOM_stoch_eos module, returning a logical indicating whether this module will be used.

stoch_EOS_register_restarts

Register fields related to the stoch_EOS module for resarts

MOM_stoch_eos_run

Generates a pattern in space and time for the ocean stochastic equation of state

post_stoch_EOS_diags

Write out any diagnostics related to this module.

MOM_calc_varT

Computes a parameterization of the SGS temperature variance

Detailed Description

This module provides the foundation of the Stanley parameterization ([81]) 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 [81]. This is controlled using STANLEY_COEFF. Setting a negative value will result in an error. [81] 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=True to correct the computation of isopycnal slopes (used in many places)

  • USE_STANLEY_GM=True to use the parameterization within GM (cf. [5])

  • USE_STANLEY_ML=True to 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, public :: MOM_stoch_eos_CS

Describes parameters of the stochastic component of the EOS correction, described in Stanley et al. JAMES 2020.

Parameters
  • l2_inv

    One over sum of the T cell side side lengths squared [L-2 ~> m-2]

  • rgauss

    nondimensional random Gaussian [nondim]

  • tfac

    Nondimensional decorrelation time factor, ~1/3.7 [nondim]

  • amplitude

    Nondimensional standard deviation of Gaussian [nondim]

  • seed

    PRNG seed

  • rn_CS

    PRNG control structure

  • pattern

    Random pattern for stochastic EOS [nondim]

  • phi

    temporal correlation stochastic EOS [nondim]

  • use_stoch_eos

    If true, use the stochastic equation of state (Stanley et al. 2020)

  • stanley_coeff

    Coefficient correlating the temperature gradient and SGS T variance [nondim]; if <0, turn off scheme in all codes

  • stanley_a

    a in exp(aX) in stochastic coefficient [nondim]

  • id_stoch_eos

    Diagnostic IDs

  • id_stoch_phi

    Diagnostic IDs

  • id_tvar_sgs

    Diagnostic IDs

Functions/Subroutine Documentation

logical function 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 [in]

    structure indicating parameter file to parse

  • diag [inout]

    Structure used to control diagnostics

  • CS [inout]

    Stochastic control structure

  • restart_CS

    A pointer to the restart control structure.

Callees call graph
Callees of mom_stoch_eos::mom_stoch_eos_init calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_random MOM_random cluster_mom_restart MOM_restart cluster_mom_stoch_eos MOM_stoch_eos mom_diag_mediator::register_diag_field register_diag_field mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_random::random_2d_constructor random_2d_constructor mom_random::random_2d_norm random_2d_norm mom_restart::interface::query_initialized query_initialized (interface) mom_restart::is_new_run is_new_run mom_stoch_eos::mom_stoch_eos_init MOM_stoch_eos_init mom_stoch_eos::mom_stoch_eos_init->mom_diag_mediator::register_diag_field mom_stoch_eos::mom_stoch_eos_init->mom_error_handler::mom_error mom_stoch_eos::mom_stoch_eos_init->mom_file_parser::interface::get_param mom_stoch_eos::mom_stoch_eos_init->mom_file_parser::interface::log_version mom_stoch_eos::mom_stoch_eos_init->mom_random::random_2d_constructor mom_stoch_eos::mom_stoch_eos_init->mom_random::random_2d_norm mom_stoch_eos::mom_stoch_eos_init->mom_restart::interface::query_initialized mom_stoch_eos::mom_stoch_eos_init->mom_restart::is_new_run
Text view
Callers call graph
Callers of mom_stoch_eos::mom_stoch_eos_init calls cluster_mom MOM cluster_mom_stoch_eos MOM_stoch_eos mom::initialize_mom initialize_MOM mom_stoch_eos::mom_stoch_eos_init MOM_stoch_eos_init mom::initialize_mom->mom_stoch_eos::mom_stoch_eos_init
Text view
subroutine 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 [in]

    structure indicating parameter file to parse

  • CS [inout]

    Stochastic control structure

  • restart_CS

    A pointer to the restart control structure.

Callees call graph
Callees of mom_stoch_eos::stoch_eos_register_restarts calls cluster_mom_file_parser MOM_file_parser cluster_mom_restart MOM_restart cluster_mom_stoch_eos MOM_stoch_eos mom_file_parser::interface::get_param get_param (interface) mom_restart::interface::register_restart_field register_restart_field (interface) mom_stoch_eos::stoch_eos_register_restarts stoch_EOS_register_restarts mom_stoch_eos::stoch_eos_register_restarts->mom_file_parser::interface::get_param mom_stoch_eos::stoch_eos_register_restarts->mom_restart::interface::register_restart_field
Text view
Callers call graph
Callers of mom_stoch_eos::stoch_eos_register_restarts calls cluster_mom MOM cluster_mom_stoch_eos MOM_stoch_eos mom::initialize_mom initialize_MOM mom_stoch_eos::stoch_eos_register_restarts stoch_EOS_register_restarts mom::initialize_mom->mom_stoch_eos::stoch_eos_register_restarts
Text view
subroutine 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 [in]

    The zonal velocity [L T-1 ~> m s-1].

  • v [in]

    The meridional velocity [L T-1 ~> m s-1].

  • delt [in]

    Time step size for AR1 process [T ~> s].

  • Time [in]

    Time for stochastic process

  • CS [inout]

    Stochastic control structure

Callees call graph
Callees of mom_stoch_eos::mom_stoch_eos_run calls cluster_mom_random MOM_random cluster_mom_stoch_eos MOM_stoch_eos mom_random::random_2d_constructor random_2d_constructor mom_random::random_2d_norm random_2d_norm mom_stoch_eos::mom_stoch_eos_run MOM_stoch_eos_run mom_stoch_eos::mom_stoch_eos_run->mom_random::random_2d_constructor mom_stoch_eos::mom_stoch_eos_run->mom_random::random_2d_norm
Text view
Callers call graph
Callers of mom_stoch_eos::mom_stoch_eos_run calls cluster_mom MOM cluster_mom_stoch_eos MOM_stoch_eos mom::step_mom_dynamics step_MOM_dynamics [private/internal] mom_stoch_eos::mom_stoch_eos_run MOM_stoch_eos_run mom::step_mom_dynamics->mom_stoch_eos::mom_stoch_eos_run
Text view
subroutine post_stoch_EOS_diags(CS, tv, diag)

Write out any diagnostics related to this module.

Parameters
  • CS [in]

    Stochastic control structure

  • tv [in]

    Thermodynamics structure

  • diag [inout]

    Structure to control diagnostics

Callees call graph
Callees of mom_stoch_eos::post_stoch_eos_diags calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_stoch_eos MOM_stoch_eos mom_diag_mediator::interface::post_data post_data (interface) mom_stoch_eos::post_stoch_eos_diags post_stoch_EOS_diags mom_stoch_eos::post_stoch_eos_diags->mom_diag_mediator::interface::post_data
Text view
Callers call graph
Callers of mom_stoch_eos::post_stoch_eos_diags calls cluster_mom MOM cluster_mom_stoch_eos MOM_stoch_eos mom::step_mom_dynamics step_MOM_dynamics [private/internal] mom_stoch_eos::post_stoch_eos_diags post_stoch_EOS_diags mom::step_mom_dynamics->mom_stoch_eos::post_stoch_eos_diags
Text view
subroutine 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 [in]

    Layer thickness [H ~> m]

  • tv [inout]

    Thermodynamics structure

  • CS [inout]

    Stochastic control structure

  • dt [in]

    Time increment [T ~> s]

  • T

    The temperature (or density) [C ~> degC], with the values in in massless layers filled vertically by diffusion.

  • S

    The filled salinity [S ~> ppt], with the values in in massless layers filled vertically by diffusion.

  • hl

    Copy of local stencil of H [H ~> m]

  • dTdi2

    Differences in T variance [C2 ~> degC2]

  • dTdj2

    Differences in T variance [C2 ~> degC2]

Callees call graph
Callees of mom_stoch_eos::mom_calc_vart calls cluster_mom_isopycnal_slopes MOM_isopycnal_slopes cluster_mom_stoch_eos MOM_stoch_eos mom_isopycnal_slopes::vert_fill_ts vert_fill_TS mom_stoch_eos::mom_calc_vart MOM_calc_varT mom_stoch_eos::mom_calc_vart->mom_isopycnal_slopes::vert_fill_ts
Text view
Callers call graph
Callers of mom_stoch_eos::mom_calc_vart calls cluster_mom MOM cluster_mom_stoch_eos MOM_stoch_eos mom::step_mom_dynamics step_MOM_dynamics [private/internal] mom_stoch_eos::mom_calc_vart MOM_calc_varT mom::step_mom_dynamics->mom_stoch_eos::mom_calc_vart
Text view
API generated with Flint · Rendered from reStructuredText