MOM_tracer_hor_diff module reference

Main routine for lateral (along surface or neutral) diffusion of tracers

Data Types

tracer_hor_diff_CS

The control structure for along-layer and epineutral tracer diffusion

p2d

A type that can be used to create arrays of pointers to 2D arrays

p2di

A type that can be used to create arrays of pointers to 2D integer arrays

Functions/Subroutines

tracer_hordiff

Compute along-coordinate diffusion of all tracers using the diffusivity in CS%KhTr, or using space-dependent diffusivity. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.

tracer_epipycnal_ML_diff

This subroutine does epipycnal diffusion of all tracers between the mixed and buffer layers and the interior, using the diffusivity in CS%KhTr. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.

tracer_hor_diff_init

Initialize lateral tracer diffusion module

tracer_hor_diff_end

Detailed Description

Introduction to the module

This module contains subroutines that handle horizontal diffusion (i.e., isoneutral or along layer) of tracers.

Each of the tracers are subject to Fickian along-coordinate diffusion if Khtr is defined and positive. The tracer diffusion can use a suitable number of iterations to guarantee stability with an arbitrarily large time step.

Type Documentation

type, public :: tracer_hor_diff_CS

The control structure for along-layer and epineutral tracer diffusion

Parameters
  • KhTr

    The along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].

  • KhTr_Slope_Cff

    The non-dimensional coefficient in KhTr formula [nondim]

  • KhTr_min

    Minimum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].

  • KhTr_max

    Maximum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].

  • KhTr_passivity_coeff

    Passivity coefficient that scales Rd/dx (default = 0) where passivity is the ratio between along-isopycnal tracer mixing and thickness mixing [nondim]

  • KhTr_passivity_min

    Passivity minimum (default = 1/2) [nondim]

  • ML_KhTR_scale

    With Diffuse_ML_interior, the ratio of the truly horizontal diffusivity in the mixed layer to the epipycnal diffusivity [nondim].

  • max_diff_CFL

    If positive, locally limit the along-isopycnal tracer diffusivity to keep the diffusive CFL locally at or below this value [nondim].

  • KhTr_use_vert_struct

    If true, uses the equivalent barotropic structure as the vertical structure of tracer diffusivity.

  • full_depth_khtr_min

    If true, KHTR_MIN is enforced throughout the whole water column. Otherwise, KHTR_MIN is only enforced at the surface. This parameter is only available when KHTR_USE_EBT_STRUCT=True and KHTR_MIN>0.

  • Diffuse_ML_interior

    If true, diffuse along isopycnals between the mixed layer and the interior.

  • check_diffusive_CFL

    If true, automatically iterate the diffusion to ensure that the diffusive equivalent of the CFL limit is not violated.

  • use_neutral_diffusion

    If true, use the neutral_diffusion module from within tracer_hor_diff.

  • use_hor_bnd_diffusion

    If true, use the hor_bnd_diffusion module from within tracer_hor_diff.

  • recalc_neutral_surf

    If true, recalculate the neutral surfaces if CFL has been exceeded

  • limit_bug

    If true and the answer date is 20240330 or below, use a rotational symmetry breaking bug when limiting the tracer properties in tracer_epipycnal_ML_diff.

  • answer_date

    The vintage of the order of arithmetic to use for the tracer diffusion. Values of 20240330 or below recover the answers from the original form of this code, while higher values use mathematically equivalent expressions that recover rotational symmetry when DIFFUSE_ML_TO_INTERIOR is true.

  • neutral_diffusion_CSp

    Control structure for neutral diffusion.

  • hor_bnd_diffusion_CSp

    Control structure for horizontal boundary diffusion.

  • diag

    A structure that is used to regulate the timing of diagnostic output.

  • debug

    If true, write verbose checksums for debugging purposes.

  • show_call_tree

    Display the call tree while running. Set by VERBOSITY level.

  • id_KhTr_u

    Diagnostic IDs

  • id_KhTr_v

    Diagnostic IDs

  • id_KhTr_h

    Diagnostic IDs

  • id_CFL

    Diagnostic IDs

  • id_khdt_x

    Diagnostic IDs

  • id_khdt_y

    Diagnostic IDs

  • pass_t

    For group halo pass, used in both tracer_hordiff and tracer_epipycnal_ML_diff

type p2d

A type that can be used to create arrays of pointers to 2D arrays

Parameters
  • p

    A pointer to a 2D array of reals [various]

type p2di

A type that can be used to create arrays of pointers to 2D integer arrays

Parameters
  • p

    A pointer to a 2D array of integers

Functions/Subroutine Documentation

subroutine tracer_hordiff(h, dt, MEKE, VarMix, visc, G, GV, US, CS, Reg, tv, do_online_flag, read_khdt_x, read_khdt_y)

Compute along-coordinate diffusion of all tracers using the diffusivity in CS%KhTr, or using space-dependent diffusivity. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.

Parameters
  • G [inout]

    Grid type

  • GV [in]

    ocean vertical grid structure

  • h [in]

    Layer thickness [H ~> m or kg m-2]

  • dt [in]

    time step [T ~> s]

  • MEKE [in]

    MEKE fields

  • VarMix [in]

    Variable mixing type

  • visc [in]

    Structure with vertical viscosities, boundary layer properties and related fields

  • US [in]

    A dimensional unit scaling type

  • CS

    module control structure

  • Reg

    registered tracers

  • tv [in]

    A structure containing pointers to any available thermodynamic fields, including potential temp and salinity or mixed layer density. Absent fields have NULL ptrs, and these may (probably will) point to some of the same arrays as Tr does. tv is required for epipycnal mixing between mixed layer and the interior.

  • do_online_flag [in]

    If present and true, do online tracer transport with stored velocities.

  • read_khdt_x [in]

    If present, these are the zonal diffusivities times a timestep from a previous run [L2 ~> m2]

  • read_khdt_y [in]

    If present, these are the meridional diffusivities times a timestep from a previous run [L2 ~> m2]

Callees call graph
Callees of mom_tracer_hor_diff::tracer_hordiff calls cluster_mom_checksums MOM_checksums cluster_mom_coms_infra MOM_coms_infra cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_tracer_hor_diff MOM_tracer_hor_diff cluster_mom_tracer_registry MOM_tracer_registry mom_checksums::interface::uvchksum uvchksum (interface) mom_coms_infra::interface::max_across_pes max_across_PEs (interface) mom_cpu_clock_infra::cpu_clock_begin cpu_clock_begin mom_cpu_clock_infra::cpu_clock_end cpu_clock_end mom_diag_mediator::interface::post_data post_data (interface) mom_domain_infra::do_group_pass do_group_pass mom_domain_infra::interface::create_group_pass create_group_pass (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::calltree_waypoint callTree_waypoint mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_hor_bnd_diffusion::hor_bnd_diffusion hor_bnd_diffusion mom_neutral_diffusion::neutral_diffusion neutral_diffusion mom_neutral_diffusion::neutral_diffusion_calc_coeffs neutral_diffusion_calc_coeffs mom_tracer_hor_diff::tracer_epipycnal_ml_diff tracer_epipycnal_ML_diff [private/internal] mom_tracer_hor_diff::tracer_hordiff tracer_hordiff mom_tracer_hor_diff::tracer_hordiff->mom_checksums::interface::uvchksum mom_tracer_hor_diff::tracer_hordiff->mom_coms_infra::interface::max_across_pes mom_tracer_hor_diff::tracer_hordiff->mom_cpu_clock_infra::cpu_clock_begin mom_tracer_hor_diff::tracer_hordiff->mom_cpu_clock_infra::cpu_clock_end mom_tracer_hor_diff::tracer_hordiff->mom_diag_mediator::interface::post_data mom_tracer_hor_diff::tracer_hordiff->mom_domain_infra::do_group_pass mom_tracer_hor_diff::tracer_hordiff->mom_domain_infra::interface::create_group_pass mom_tracer_hor_diff::tracer_hordiff->mom_domain_infra::interface::pass_vector mom_tracer_hor_diff::tracer_hordiff->mom_error_handler::calltree_enter mom_tracer_hor_diff::tracer_hordiff->mom_error_handler::calltree_leave mom_tracer_hor_diff::tracer_hordiff->mom_error_handler::calltree_waypoint mom_tracer_hor_diff::tracer_hordiff->mom_error_handler::mom_error mom_tracer_hor_diff::tracer_hordiff->mom_error_infra::is_root_pe mom_tracer_hor_diff::tracer_hordiff->mom_hor_bnd_diffusion::hor_bnd_diffusion mom_tracer_hor_diff::tracer_hordiff->mom_neutral_diffusion::neutral_diffusion mom_tracer_hor_diff::tracer_hordiff->mom_neutral_diffusion::neutral_diffusion_calc_coeffs mom_tracer_hor_diff::tracer_hordiff->mom_tracer_hor_diff::tracer_epipycnal_ml_diff mom_tracer_registry::interface::mom_tracer_chksum MOM_tracer_chksum (interface) mom_tracer_hor_diff::tracer_hordiff->mom_tracer_registry::interface::mom_tracer_chksum
Text view
Callers call graph
Callers of mom_tracer_hor_diff::tracer_hordiff calls cluster_mom MOM cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom::step_mom_tracer_dyn step_MOM_tracer_dyn [private/internal] mom_tracer_hor_diff::tracer_hordiff tracer_hordiff mom::step_mom_tracer_dyn->mom_tracer_hor_diff::tracer_hordiff mom::step_offline step_offline mom::step_offline->mom_tracer_hor_diff::tracer_hordiff
Text view
subroutine tracer_epipycnal_ML_diff(h, dt, Tr, ntr, khdt_epi_x, khdt_epi_y, G, GV, US, CS, tv, num_itts)

This subroutine does epipycnal diffusion of all tracers between the mixed and buffer layers and the interior, using the diffusivity in CS%KhTr. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.

Parameters
  • G [inout]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • h [in]

    layer thickness [H ~> m or kg m-2]

  • dt [in]

    time step [T ~> s]

  • Tr [inout]

    tracer array

  • ntr [in]

    number of tracers

  • khdt_epi_x [in]

    Zonal epipycnal diffusivity times a time step and the ratio of the open face width over the distance between adjacent tracer points [L2 ~> m2]

  • khdt_epi_y [in]

    Meridional epipycnal diffusivity times a time step and the ratio of the open face width over the distance between adjacent tracer points [L2 ~> m2]

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    module control structure

  • tv [in]

    thermodynamic structure

  • num_itts [in]

    number of iterations (usually=1)

Callees call graph
Callees of mom_tracer_hor_diff::tracer_epipycnal_ml_diff calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_eos MOM_EOS cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom_domain_infra::do_group_pass do_group_pass mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_tracer_hor_diff::tracer_epipycnal_ml_diff tracer_epipycnal_ML_diff [private/internal] mom_tracer_hor_diff::tracer_epipycnal_ml_diff->mom_domain_infra::do_group_pass mom_tracer_hor_diff::tracer_epipycnal_ml_diff->mom_eos::eos_domain mom_tracer_hor_diff::tracer_epipycnal_ml_diff->mom_eos::interface::calculate_density
Text view
Callers call graph
Callers of mom_tracer_hor_diff::tracer_epipycnal_ml_diff calls cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom_tracer_hor_diff::tracer_epipycnal_ml_diff tracer_epipycnal_ML_diff [private/internal] mom_tracer_hor_diff::tracer_hordiff tracer_hordiff mom_tracer_hor_diff::tracer_hordiff->mom_tracer_hor_diff::tracer_epipycnal_ml_diff
Text view
subroutine tracer_hor_diff_init(Time, G, GV, US, param_file, diag, EOS, diabatic_CSp, CS)

Initialize lateral tracer diffusion module

Parameters
  • Time [in]

    current model time

  • G [in]

    ocean grid structure

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • diag [inout]

    diagnostic control

  • EOS [in]

    Equation of state CS

  • diabatic_CSp [in]

    Equation of state CS

  • param_file [in]

    parameter file

  • CS

    horz diffusion control structure

Callees call graph
Callees of mom_tracer_hor_diff::tracer_hor_diff_init calls cluster_mom_cpu_clock_infra MOM_cpu_clock_infra cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom_cpu_clock_infra::cpu_clock_id cpu_clock_id mom_diag_mediator::register_diag_field register_diag_field mom_error_handler::calltree_showquery callTree_showQuery 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_hor_bnd_diffusion::hor_bnd_diffusion_init hor_bnd_diffusion_init mom_neutral_diffusion::neutral_diffusion_init neutral_diffusion_init mom_tracer_hor_diff::tracer_hor_diff_init tracer_hor_diff_init mom_tracer_hor_diff::tracer_hor_diff_init->mom_cpu_clock_infra::cpu_clock_id mom_tracer_hor_diff::tracer_hor_diff_init->mom_diag_mediator::register_diag_field mom_tracer_hor_diff::tracer_hor_diff_init->mom_error_handler::calltree_showquery mom_tracer_hor_diff::tracer_hor_diff_init->mom_error_handler::mom_error mom_tracer_hor_diff::tracer_hor_diff_init->mom_file_parser::interface::get_param mom_tracer_hor_diff::tracer_hor_diff_init->mom_file_parser::interface::log_version mom_tracer_hor_diff::tracer_hor_diff_init->mom_hor_bnd_diffusion::hor_bnd_diffusion_init mom_tracer_hor_diff::tracer_hor_diff_init->mom_neutral_diffusion::neutral_diffusion_init
Text view
Callers call graph
Callers of mom_tracer_hor_diff::tracer_hor_diff_init calls cluster_mom MOM cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom::initialize_mom initialize_MOM mom_tracer_hor_diff::tracer_hor_diff_init tracer_hor_diff_init mom::initialize_mom->mom_tracer_hor_diff::tracer_hor_diff_init
Text view

subroutine tracer_hor_diff_end(CS)

Parameters
  • CS

    module control structure

Callees call graph
Callees of mom_tracer_hor_diff::tracer_hor_diff_end calls cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom_hor_bnd_diffusion::hor_bnd_diffusion_end hor_bnd_diffusion_end mom_neutral_diffusion::neutral_diffusion_end neutral_diffusion_end mom_tracer_hor_diff::tracer_hor_diff_end tracer_hor_diff_end mom_tracer_hor_diff::tracer_hor_diff_end->mom_hor_bnd_diffusion::hor_bnd_diffusion_end mom_tracer_hor_diff::tracer_hor_diff_end->mom_neutral_diffusion::neutral_diffusion_end
Text view
Callers call graph
Callers of mom_tracer_hor_diff::tracer_hor_diff_end calls cluster_mom MOM cluster_mom_tracer_hor_diff MOM_tracer_hor_diff mom::mom_end MOM_end mom_tracer_hor_diff::tracer_hor_diff_end tracer_hor_diff_end mom::mom_end->mom_tracer_hor_diff::tracer_hor_diff_end
Text view
API generated with Flint · Rendered from reStructuredText