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 CSKhTr, or using space-dependent diffusivity. |
|
This subroutine does epipycnal diffusion of all tracers between the mixed and buffer layers and the interior, using the diffusivity in CSKhTr. |
|
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
mom_tracer_hor_diff/
tracer_hor_diff_cs
¶ The control structure for along-layer and epineutral tracer diffusion.
- Type fields:
%
id_khtr_u
[integer] :: Diagnostic IDs.%
id_khtr_v
[integer] :: Diagnostic IDs.%
id_khtr_h
[integer] :: Diagnostic IDs.%
id_cfl
[integer] :: Diagnostic IDs.%
id_khdt_x
[integer] :: Diagnostic IDs.%
id_khdt_y
[integer] :: Diagnostic IDs.%
khtr
[real] :: The along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].%
khtr_slope_cff
[real] :: The non-dimensional coefficient in KhTr formula [nondim].%
khtr_min
[real] :: Minimum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].%
khtr_max
[real] :: Maximum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].%
khtr_passivity_coeff
[real] :: 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
[real] :: Passivity minimum (default = 1/2) [nondim].%
ml_khtr_scale
[real] :: With Diffuse_ML_interior, the ratio of the truly horizontal diffusivity in the mixed layer to the epipycnal diffusivity [nondim].%
max_diff_cfl
[real] :: If positive, locally limit the along-isopycnal tracer diffusivity to keep the diffusive CFL locally at or below this value [nondim].%
khth_use_ebt_struct
[logical] :: If true, uses the equivalent barotropic structure as the vertical structure of tracer diffusivity.%
diffuse_ml_interior
[logical] :: If true, diffuse along isopycnals between the mixed layer and the interior.%
check_diffusive_cfl
[logical] :: If true, automatically iterate the diffusion to ensure that the diffusive equivalent of the CFL limit is not violated.%
use_neutral_diffusion
[logical] :: If true, use the neutral_diffusion module from within tracer_hor_diff.%
use_hor_bnd_diffusion
[logical] :: If true, use the hor_bnd_diffusion module from within tracer_hor_diff.%
recalc_neutral_surf
[logical] :: If true, recalculate the neutral surfaces if CFL has been exceeded.%
neutral_diffusion_csp
[type( neutral_diffusion_cs ),pointer] :: Control structure for neutral diffusion.%
hor_bnd_diffusion_csp
[type( hbd_cs ),pointer] :: Control structure for horizontal boundary diffusion.%
diag
[type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.%
debug
[logical] :: If true, write verbose checksums for debugging purposes.%
show_call_tree
[logical] :: Display the call tree while running. Set by VERBOSITY level.%
first_call
[logical] :: This is true until after the first call.%
pass_t
[type(group_pass_type)] :: For group halo pass, used in both tracer_hordiff and tracer_epipycnal_ML_diff.
-
type
mom_tracer_hor_diff/
p2d
¶ A type that can be used to create arrays of pointers to 2D arrays.
- Type fields:
%
p
[real(:,:),pointer, private] :: A pointer to a 2D array of reals [various].
-
type
mom_tracer_hor_diff/
p2di
¶ A type that can be used to create arrays of pointers to 2D integer arrays.
- Type fields:
%
p
[integer(:,:),pointer, private] :: A pointer to a 2D array of integers.
Function/Subroutine Documentation¶
-
subroutine
mom_tracer_hor_diff/
tracer_hordiff
(h, dt, MEKE, VarMix, 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 CSKhTr, 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
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
read_khdt_y :: [in] If present, these are the meridional diffusivities
- Call to:
mom_error_handler::calltree_enter
mom_error_handler::calltree_leave
mom_error_handler::calltree_waypoint
mom_hor_bnd_diffusion::hor_bnd_diffusion
id_clock_diffuse
id_clock_epimix
id_clock_pass
id_clock_sync
mom_neutral_diffusion::neutral_diffusion
mom_neutral_diffusion::neutral_diffusion_calc_coeffs
tracer_epipycnal_ml_diff
-
subroutine
mom_tracer_hor_diff/
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 CSKhTr. 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)
- Call to:
mom_eos::eos_domain
id_clock_pass
- Called from:
-
subroutine
mom_tracer_hor_diff/
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
- Call to:
id_clock_diffuse
id_clock_epimix
id_clock_pass
id_clock_sync
mom_diag_mediator::register_diag_field
-
subroutine
mom_tracer_hor_diff/
tracer_hor_diff_end
(CS)¶ - Parameters:
cs :: module control structure
- Call to:
- Called from: