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 ::
integerDiagnostic IDs.% id_khtr_v ::
integerDiagnostic IDs.% id_khtr_h ::
integerDiagnostic IDs.% id_cfl ::
integerDiagnostic IDs.% id_khdt_x ::
integerDiagnostic IDs.% id_khdt_y ::
integerDiagnostic IDs.% khtr ::
realThe along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].% khtr_slope_cff ::
realThe non-dimensional coefficient in KhTr formula [nondim].% khtr_min ::
realMinimum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].% khtr_max ::
realMaximum along-isopycnal tracer diffusivity [L2 T-1 ~> m2 s-1].% khtr_passivity_coeff ::
realPassivity coefficient that scales Rd/dx (default = 0) where passivity is the ratio between along-isopycnal tracer mixing and thickness mixing [nondim].% khtr_passivity_min ::
realPassivity minimum (default = 1/2) [nondim].% ml_khtr_scale ::
realWith Diffuse_ML_interior, the ratio of the truly horizontal diffusivity in the mixed layer to the epipycnal diffusivity [nondim].% max_diff_cfl ::
realIf positive, locally limit the along-isopycnal tracer diffusivity to keep the diffusive CFL locally at or below this value [nondim].% khtr_use_vert_struct ::
logicalIf true, uses the equivalent barotropic structure as the vertical structure of tracer diffusivity.% full_depth_khtr_min ::
logicalIf 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 ::
logicalIf true, diffuse along isopycnals between the mixed layer and the interior.% check_diffusive_cfl ::
logicalIf true, automatically iterate the diffusion to ensure that the diffusive equivalent of the CFL limit is not violated.% use_neutral_diffusion ::
logicalIf true, use the neutral_diffusion module from within tracer_hor_diff.% use_hor_bnd_diffusion ::
logicalIf true, use the hor_bnd_diffusion module from within tracer_hor_diff.% recalc_neutral_surf ::
logicalIf true, recalculate the neutral surfaces if CFL has been exceeded.% limit_bug ::
logicalIf 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 ::
integerThe 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 ::
type(neutral_diffusion_cs), pointerControl structure for neutral diffusion.% hor_bnd_diffusion_csp ::
type(hbd_cs), pointerControl structure for horizontal boundary diffusion.% diag ::
type(diag_ctrl), pointerA structure that is used to regulate the timing of diagnostic output.% debug ::
logicalIf true, write verbose checksums for debugging purposes.% show_call_tree ::
logicalDisplay the call tree while running. Set by VERBOSITY level.% first_call ::
logicalThis 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, dimension(:,:), pointer, privateA pointer to a 2D array of reals [various].
Function/Subroutine Documentation
- subroutine mom_tracer_hor_diff/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 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 ::
h[in] Layer thickness [H ~> m or kg m-2]dt ::
dt[in] time step [T ~> s]meke :: [in] MEKE fields
varmix :: [in] Variable mixing type
visc ::
visc[in] Structure with vertical viscosities, boundary layer properties and related fieldsus :: [in] A dimensional unit scaling type
cs :: module control structure
reg :: registered tracers
tv ::
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 ::
do_online_flag[in] If present and true, do online tracer transport with stored velocities.read_khdt_x ::
read_khdt_x[in] If present, these are the zonal diffusivitiesread_khdt_y ::
read_khdt_y[in] If present, these are the meridional diffusivities
- Call to:
mom_error_handler::calltree_entermom_error_handler::calltree_leavemom_error_handler::calltree_waypointmom_hor_bnd_diffusion::hor_bnd_diffusionid_clock_diffuseid_clock_epimixid_clock_passid_clock_syncmom_neutral_diffusion::neutral_diffusionmom_neutral_diffusion::neutral_diffusion_calc_coeffstracer_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 ::
h[in] layer thickness [H ~> m or kg m-2]dt ::
dt[in] time step [T ~> s]tr :: [inout] tracer array
ntr ::
ntr[in] number of tracerskhdt_epi_x ::
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 ::
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 ::
tv[in] thermodynamic structurenum_itts ::
num_itts[in] number of iterations (usually=1)
- Call to:
mom_eos::eos_domainid_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 ::
diag[inout] diagnostic controleos :: [in] Equation of state CS
diabatic_csp :: [in] Equation of state CS
param_file ::
param_file[in] parameter filecs :: horz diffusion control structure
- Call to:
id_clock_diffuseid_clock_epimixid_clock_passid_clock_syncmom_diag_mediator::register_diag_field
- subroutine mom_tracer_hor_diff/tracer_hor_diff_end(CS)
- Parameters:
cs :: module control structure
- Call to:
- Called from: