MOM_tracer_hor_diff module reference
Main routine for lateral (along surface or neutral) diffusion of tracers
Data Types
The control structure for along-layer and epineutral tracer diffusion |
|
A type that can be used to create arrays of pointers to 2D arrays |
|
A type that can be used to create arrays of pointers to 2D integer arrays |
Functions/Subroutines
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. |
|
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. |
|
Initialize lateral tracer diffusion module |
|
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
Text view
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_hor_diff::tracer_hordiff → mom_tracer_registry::interface::mom_tracer_chksum
Callers call graph
- 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
Callers call graph
- 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
Text view
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
subroutine tracer_hor_diff_end(CS)
- Parameters
CS
module control structure