mom_cvmix_ddiff module reference

Interface to CVMix double diffusion scheme.

More…

Data Types

cvmix_ddiff_cs

Control structure including parameters for CVMix double diffusion.

Functions/Subroutines

cvmix_ddiff_init()

Initialized the CVMix double diffusion module.

compute_ddiff_coeffs()

Subroutine for computing vertical diffusion coefficients for the double diffusion mixing parameterization.

cvmix_ddiff_is_used()

Reads the parameter “USE_CVMIX_DDIFF” and returns state.

cvmix_ddiff_end()

Clear pointers and dealocate memory.

Detailed Description

Interface to CVMix double diffusion scheme.

Type Documentation

type mom_cvmix_ddiff/cvmix_ddiff_cs

Control structure including parameters for CVMix double diffusion.

Type fields
  • % strat_param_max [real] :: maximum value for the stratification parameter [nondim]

  • % kappa_ddiff_s [real] :: leading coefficient in formula for salt-fingering regime for salinity diffusion [m2 s-1]

  • % ddiff_exp1 [real] :: interior exponent in salt-fingering regime formula [nondim]

  • % ddiff_exp2 [real] :: exterior exponent in salt-fingering regime formula [nondim]

  • % mol_diff [real] :: molecular diffusivity [m2 s-1]

  • % kappa_ddiff_param1 [real] :: exterior coefficient in diffusive convection regime [nondim]

  • % kappa_ddiff_param2 [real] :: middle coefficient in diffusive convection regime [nondim]

  • % kappa_ddiff_param3 [real] :: interior coefficient in diffusive convection regime [nondim]

  • % min_thickness [real] :: Minimum thickness allowed [m].

  • % diff_conv_type [character (len=4)] :: type of diffusive convection to use. Options are Marmorino & Caldwell 1976 (“MC76”; default) and Kelley 1988, 1990 (“K90”)

  • % debug [logical] :: If true, turn on debugging.

Function/Subroutine Documentation

function mom_cvmix_ddiff/cvmix_ddiff_init(Time, G, GV, US, param_file, diag, CS) [logical]

Initialized the CVMix double diffusion module.

Parameters
  • time :: [in] The current time.

  • g :: [in] Grid structure.

  • gv :: [in] Vertical grid structure.

  • us :: [in] A dimensional unit scaling type

  • param_file :: [in] Run-time parameter file handle

  • diag :: [inout] Diagnostics control structure.

  • cs :: This module’s control structure.

Call to

mdl mom_error_handler::mom_error

subroutine mom_cvmix_ddiff/compute_ddiff_coeffs(h, tv, G, GV, US, j, Kd_T, Kd_S, CS, R_rho)

Subroutine for computing vertical diffusion coefficients for the double diffusion mixing parameterization.

Parameters
  • g :: [in] Grid structure.

  • gv :: [in] Vertical grid structure.

  • h :: [in] Layer thickness [H ~> m or kg m-2].

  • tv :: [in] Thermodynamics structure.

  • us :: [in] A dimensional unit scaling type

  • j :: [in] Meridional grid index to work on.

  • kd_t :: [inout] Interface double diffusion diapycnal diffusivity for temp [Z2 T-1 ~> m2 s-1].

  • kd_s :: [inout] Interface double diffusion diapycnal diffusivity for salt [Z2 T-1 ~> m2 s-1].

  • cs :: The control structure returned by a previous call to CVMix_ddiff_init.

  • r_rho :: [inout] The density ratios at interfaces [nondim].

Called from

mom_set_diffusivity::set_diffusivity

function mom_cvmix_ddiff/cvmix_ddiff_is_used(param_file) [logical]

Reads the parameter “USE_CVMIX_DDIFF” and returns state. This function allows other modules to know whether this parameterization will be used without needing to duplicate the log entry.

Parameters

param_file :: [in] A structure to parse for run-time parameters

Call to

mdl

Called from

mom_diabatic_driver::diabatic_driver_init

subroutine mom_cvmix_ddiff/cvmix_ddiff_end(CS)

Clear pointers and dealocate memory.

Parameters

cs :: Control structure for this module that will be deallocated in this subroutine