mom_tidal_mixing module reference

Interface to vertical tidal mixing schemes including CVMix tidal mixing.

More…

Data Types

tidal_mixing_cs

Control structure with parameters for the tidal mixing module.

tidal_mixing_diags

Containers for tidal mixing diagnostics.

Functions/Subroutines

tidal_mixing_init()

Initializes internal tidal dissipation scheme for diapycnal mixing.

calculate_tidal_mixing()

Depending on whether or not CVMix is active, calls the associated subroutine to compute internal tidal dissipation and to add the effect of internal-tide-driven mixing to the layer or interface diffusivities.

calculate_cvmix_tidal()

Calls the CVMix routines to compute tidal dissipation and to add the effect of internal-tide-driven mixing to the interface diffusivities.

add_int_tide_diffusivity()

This subroutine adds the effect of internal-tide-driven mixing to the layer diffusivities.

setup_tidal_diagnostics()

Sets up diagnostics arrays for tidal mixing.

post_tidal_diagnostics()

This subroutine offers up diagnostics of the tidal mixing.

tidal_mixing_h_amp()

This subroutine returns a zonal slice of the topographic roughness amplitudes.

read_tidal_energy()

This subroutine read tidal energy inputs from a file.

read_tidal_constituents()

This subroutine reads tidal input energy from a file by constituent.

tidal_mixing_end()

Clear pointers and deallocate memory.

Detailed Description

Interface to vertical tidal mixing schemes including CVMix tidal mixing.

Type Documentation

type mom_tidal_mixing/tidal_mixing_cs

Control structure with parameters for the tidal mixing module.

Type fields
  • % id_tke_itidal [integer] :: Diagnostic identifiers.

  • % id_tke_leewave [integer] :: Diagnostic identifiers.

  • % id_kd_itidal [integer] :: Diagnostic identifiers.

  • % id_kd_niku [integer] :: Diagnostic identifiers.

  • % id_kd_lowmode [integer] :: Diagnostic identifiers.

  • % id_kd_itidal_work [integer] :: Diagnostic identifiers.

  • % id_kd_niku_work [integer] :: Diagnostic identifiers.

  • % id_kd_lowmode_work [integer] :: Diagnostic identifiers.

  • % id_nb [integer] :: Diagnostic identifiers.

  • % id_n2_bot [integer] :: Diagnostic identifiers.

  • % id_n2_meanz [integer] :: Diagnostic identifiers.

  • % id_fl_itidal [integer] :: Diagnostic identifiers.

  • % id_fl_lowmode [integer] :: Diagnostic identifiers.

  • % id_polzin_decay_scale [integer] :: Diagnostic identifiers.

  • % id_polzin_decay_scale_scaled [integer] :: Diagnostic identifiers.

  • % id_n2_int [integer] :: Diagnostic identifiers.

  • % id_simmons_coeff [integer] :: Diagnostic identifiers.

  • % id_schmittner_coeff [integer] :: Diagnostic identifiers.

  • % id_tidal_qe_md [integer] :: Diagnostic identifiers.

  • % id_vert_dep [integer] :: Diagnostic identifiers.

  • % debug [logical] :: If true, do more extensive debugging checks. This is hard-coded.

  • % int_tide_dissipation [logical] :: Internal tide conversion (from barotropic) with the schemes of St Laurent et al (2002) & Simmons et al (2004)

  • % int_tide_profile [integer] :: A coded integer indicating the vertical profile for dissipation of the internal waves. Schemes that are currently encoded are St Laurent et al (2002) and Polzin (2009).

  • % lee_wave_dissipation [logical] :: Enable lee-wave driven mixing, following Nikurashin (2010), with a vertical energy deposition profile specified by Lee_wave_profile to be St Laurent et al (2002) or Simmons et al (2004) scheme.

  • % lee_wave_profile [integer] :: A coded integer indicating the vertical profile for dissipation of the lee waves. Schemes that are currently encoded are St Laurent et al (2002) and Polzin (2009).

  • % int_tide_decay_scale [real] :: decay scale for internal wave TKE [Z ~> m].

  • % mu_itides [real] :: efficiency for conversion of dissipation to potential energy [nondim]

  • % gamma_itides [real] :: fraction of local dissipation [nondim]

  • % gamma_lee [real] :: fraction of local dissipation for lee waves (Nikurashin’s energy input) [nondim]

  • % decay_scale_factor_lee [real] :: Scaling factor for the decay scale of lee wave energy dissipation [nondim].

  • % min_zbot_itides [real] :: minimum depth for internal tide conversion [Z ~> m].

  • % lowmode_itidal_dissipation [logical] :: If true, consider mixing due to breaking low modes that have been remotely generated using an internal tidal dissipation scheme to specify the vertical profile of the energy input to drive diapycnal mixing, along the lines of St. Laurent et al. (2002) and Simmons et al. (2004).

  • % nu_polzin [real] :: The non-dimensional constant used in Polzin form of the vertical scale of decay of tidal dissipation [nondim].

  • % nbotref_polzin [real] :: Reference value for the buoyancy frequency at the ocean bottom used in Polzin formulation of the vertical scale of decay of tidal dissipation [T-1 ~> s-1].

  • % polzin_decay_scale_factor [real] :: Scaling factor for the decay length scale of the tidal dissipation profile in Polzin [nondim].

  • % polzin_decay_scale_max_factor [real] :: The decay length scale of tidal dissipation profile in Polzin formulation should not exceed Polzin_decay_scale_max_factor * depth of the ocean [nondim].

  • % polzin_min_decay_scale [real] :: minimum decay scale of the tidal dissipation profile in Polzin formulation [Z ~> m].

  • % tke_itide_max [real] :: maximum internal tide conversion [R Z3 T-3 ~> W m-2] available to mix above the BBL

  • % utide [real] :: constant tidal amplitude [Z T-1 ~> m s-1] if READ_TIDEAMP is false.

  • % kappa_itides [real] :: topographic wavenumber and non-dimensional scaling [Z-1 ~> m-1].

  • % kappa_h2_factor [real] :: factor for the product of wavenumber * rms sgs height

  • % inputdir [character (len=200)] :: The directory in which to find input files.

  • % use_cvmix_tidal [logical] :: true if CVMix is to be used for determining diffusivity due to tidal mixing

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

  • % cvmix_tidal_scheme [integer] :: 1 for Simmons, 2 for Schmittner

  • % cvmix_tidal_params [type(cvmix_tidal_params_type)] :: A CVMix-specific type with parameters for tidal mixing.

  • % cvmix_glb_params [type(cvmix_global_params_type)] :: CVMix-specific for Prandtl number only.

  • % tidal_max_coef [real] :: CVMix-specific maximum allowable tidal diffusivity. [m^2/s].

  • % tidal_diss_lim_tc [real] :: CVMix-specific dissipation limit depth for tidal-energy-constituent data [Z ~> m].

  • % remap_cs [type(remapping_cs)] :: The control structure for remapping.

  • % remap_answers_2018 [logical] :: If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. If false, use more robust forms of the same remapping expressions.

  • % tke_niku [real(:,:),pointer] :: Lee wave driven Turbulent Kinetic Energy input [R Z3 T-3 ~> W m-2].

  • % tke_itidal [real(:,:),pointer] :: The internal Turbulent Kinetic Energy input divided by the bottom stratfication [R Z3 T-2 ~> J m-2].

  • % nb [real(:,:),pointer] :: The near bottom buoyancy frequency [T-1 ~> s-1].

  • % mask_itidal [real(:,:),pointer] :: A mask of where internal tide energy is input.

  • % h2 [real(:,:),pointer] :: Squared bottom depth variance [Z2 ~> m2].

  • % tideamp [real(:,:),pointer] :: RMS tidal amplitude [Z T-1 ~> m s-1].

  • % int_tide_csp [type(int_tide_cs),pointer] :: Control structure for a child module.

  • % h_src [real(:),allocatable] :: tidal constituent input layer thickness [m]

  • % tidal_qe_2d [real(:,:),allocatable] :: Tidal energy input times the local dissipation fraction, q*E(x,y), with the CVMix implementation of Jayne et al tidal mixing [W m-2]. TODO: make this E(x,y) only.

  • % tidal_qe_3d_in [real(:,:,:),allocatable] :: q*E(x,y,z) with the Schmittner parameterization [W m-3?]

  • % answers_2018 [logical] :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

  • % diag [type(diag_ctrl),pointer] :: structure to regulate diagnostic output timing

  • % dd [type( tidal_mixing_diags ),pointer] :: A pointer to a structure of diagnostic arrays.

type mom_tidal_mixing/tidal_mixing_diags

Containers for tidal mixing diagnostics.

Type fields
  • % kd_itidal [real(:,:,:),pointer] :: internal tide diffusivity at interfaces [Z2 T-1 ~> m2 s-1].

  • % fl_itidal [real(:,:,:),pointer] :: vertical flux of tidal turbulent dissipation [Z3 T-3 ~> m3 s-3]

  • % kd_niku [real(:,:,:),pointer] :: lee-wave diffusivity at interfaces [Z2 T-1 ~> m2 s-1].

  • % kd_niku_work [real(:,:,:),pointer] :: layer integrated work by lee-wave driven mixing [R Z3 T-3 ~> W m-2]

  • % kd_itidal_work [real(:,:,:),pointer] :: layer integrated work by int tide driven mixing [R Z3 T-3 ~> W m-2]

  • % kd_lowmode_work [real(:,:,:),pointer] :: layer integrated work by low mode driven mixing [R Z3 T-3 ~> W m-2]

  • % n2_int [real(:,:,:),pointer] :: Bouyancy frequency squared at interfaces [T-2 ~> s-2].

  • % vert_dep_3d [real(:,:,:),pointer] :: The 3-d mixing energy deposition [W m-3].

  • % schmittner_coeff_3d [real(:,:,:),pointer] :: The coefficient in the Schmittner et al mixing scheme, in UNITS?

  • % tidal_qe_md [real(:,:,:),pointer] :: Input tidal energy dissipated locally, interpolated to model vertical coordinate [W m-3?].

  • % kd_lowmode [real(:,:,:),pointer] :: internal tide diffusivity at interfaces due to propagating low modes [Z2 T-1 ~> m2 s-1].

  • % fl_lowmode [real(:,:,:),pointer] :: vertical flux of tidal turbulent dissipation due to propagating low modes [Z3 T-3 ~> m3 s-3]

  • % tke_itidal_used [real(:,:),pointer] :: internal tide TKE input at ocean bottom [R Z3 T-3 ~> W m-2]

  • % n2_bot [real(:,:),pointer] :: bottom squared buoyancy frequency [T-2 ~> s-2]

  • % n2_meanz [real(:,:),pointer] :: vertically averaged buoyancy frequency [T-2 ~> s-2]

  • % polzin_decay_scale_scaled [real(:,:),pointer] :: vertical scale of decay for tidal dissipation [Z ~> m]

  • % polzin_decay_scale [real(:,:),pointer] :: vertical decay scale for tidal diss with Polzin [Z ~> m]

  • % simmons_coeff_2d [real(:,:),pointer] :: The Simmons et al mixing coefficient.

Function/Subroutine Documentation

function mom_tidal_mixing/tidal_mixing_init(Time, G, GV, US, param_file, int_tide_CSp, diag, CS) [logical]

Initializes internal tidal dissipation scheme for diapycnal mixing.

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

  • int_tide_csp :: [in] A pointer to the internal tides control structure

  • diag :: [inout] Diagnostics control structure.

  • cs :: This module’s control structure.

Call to

mom_string_functions::lowercase mom_error_handler::mom_error polzin_09 polzin_profile_string read_tidal_energy schmittner schmittner_scheme_string simmons simmons_scheme_string stlaurent_02 stlaurent_profile_string mom_string_functions::uppercase

Called from

mom_set_diffusivity::set_diffusivity_init

subroutine mom_tidal_mixing/calculate_tidal_mixing(h, N2_bot, j, TKE_to_Kd, max_TKE, G, GV, US, CS, N2_lay, N2_int, Kd_lay, Kd_int, Kd_max, Kv)

Depending on whether or not CVMix is active, calls the associated subroutine to compute internal tidal dissipation and to add the effect of internal-tide-driven mixing to the layer or interface diffusivities.

Parameters
  • g :: [in] The ocean’s grid structure

  • gv :: [in] The ocean’s vertical grid structure

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

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

  • n2_bot :: [in] The near-bottom squared buoyancy frequency [T-2 ~> s-2].

  • n2_lay :: [in] The squared buoyancy frequency of the layers [T-2 ~> s-2].

  • n2_int :: [in] The squared buoyancy frequency at the interfaces [T-2 ~> s-2].

  • j :: [in] The j-index to work on

  • tke_to_kd :: [in] The conversion rate between the TKE dissipated within a layer and the diapycnal diffusivity within that layer, usually (~Rho_0 / (G_Earth * dRho_lay)) [Z2 T-1 / Z3 T-3 = T2 Z-1 ~> s2 m-1]

  • max_tke :: [in] The energy required to for a layer to entrain to its maximum realizable thickness [Z3 T-3 ~> m3 s-3]

  • cs :: The control structure for this module

  • kd_lay :: [inout] The diapycnal diffusivity in layers [Z2 T-1 ~> m2 s-1].

  • kd_int :: [inout] The diapycnal diffusivity at interfaces,

  • kd_max :: [in] The maximum increment for diapycnal diffusivity due to TKE-based processes, [Z2 T-1 ~> m2 s-1]. Set this to a negative value to have no limit.

  • kv :: The “slow” vertical viscosity at each interface (not layer!) [Z2 T-1 ~> m2 s-1].

Call to

add_int_tide_diffusivity calculate_cvmix_tidal

subroutine mom_tidal_mixing/calculate_cvmix_tidal(h, j, G, GV, US, CS, N2_int, Kd_lay, Kd_int, Kv)

Calls the CVMix routines to compute tidal dissipation and to add the effect of internal-tide-driven mixing to the interface diffusivities.

Parameters
  • j :: [in] The j-index to work on

  • g :: [in] Grid structure.

  • gv :: [in] ocean vertical grid structure

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

  • cs :: This module’s control structure.

  • n2_int :: [in] The squared buoyancy frequency at the interfaces [T-2 ~> s-2].

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

  • kd_lay :: [inout] The diapycnal diffusivity in the layers [Z2 T-1 ~> m2 s-1].

  • kd_int :: [inout] The diapycnal diffusivity at interfaces [Z2 T-1 ~> m2 s-1].

  • kv :: The “slow” vertical viscosity at each interface (not layer!) [Z2 T-1 ~> m2 s-1].

Call to

mom_error_handler::mom_error mom_remapping::remapping_core_h schmittner simmons

Called from

calculate_tidal_mixing

subroutine mom_tidal_mixing/add_int_tide_diffusivity(h, N2_bot, j, TKE_to_Kd, max_TKE, G, GV, US, CS, N2_lay, Kd_lay, Kd_int, Kd_max)

This subroutine adds the effect of internal-tide-driven mixing to the layer diffusivities. The mechanisms considered are (1) local dissipation of internal waves generated by the barotropic flow (“itidal”), (2) local dissipation of internal waves generated by the propagating low modes (rays) of the internal tide (“lowmode”), and (3) local dissipation of internal lee waves. Will eventually need to add diffusivity due to other wave-breaking processes (e.g. Bottom friction, Froude-number-depending breaking, PSI, etc.).

Parameters
  • g :: [in] The ocean’s grid structure

  • gv :: [in] The ocean’s vertical grid structure

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

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

  • n2_bot :: [in] The near-bottom squared buoyancy frequency frequency [T-2 ~> s-2].

  • n2_lay :: [in] The squared buoyancy frequency of the layers [T-2 ~> s-2].

  • j :: [in] The j-index to work on

  • tke_to_kd :: [in] The conversion rate between the TKE dissipated within a layer and the diapycnal diffusivity within that layer, usually (~Rho_0 / (G_Earth * dRho_lay)) [Z2 T-1 / Z3 T-3 = T2 Z-1 ~> s2 m-1]

  • max_tke :: [in] The energy required to for a layer to entrain to its maximum realizable thickness [Z3 T-3 ~> m3 s-3]

  • cs :: The control structure for this module

  • kd_lay :: [inout] The diapycnal diffusivity in layers [Z2 T-1 ~> m2 s-1]

  • kd_int :: [inout] The diapycnal diffusivity at interfaces

  • kd_max :: [in] The maximum increment for diapycnal diffusivity due to TKE-based processes [Z2 T-1 ~> m2 s-1]. Set this to a negative value to have no limit.

Call to

mom_internal_tides::get_lowmode_loss polzin_09 stlaurent_02

Called from

calculate_tidal_mixing

subroutine mom_tidal_mixing/setup_tidal_diagnostics(G, GV, CS)

Sets up diagnostics arrays for tidal mixing.

Parameters
  • g :: [in] The ocean’s grid structure

  • gv :: [in] The ocean’s vertical grid structure

  • cs :: The control structure for this module

Call to

mom_error_handler::mom_error schmittner simmons

subroutine mom_tidal_mixing/post_tidal_diagnostics(G, GV, h, CS)

This subroutine offers up diagnostics of the tidal mixing.

Parameters
  • g :: [in] The ocean’s grid structure

  • gv :: [in] The ocean’s vertical grid structure.

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

  • cs :: The control structure for this module

subroutine mom_tidal_mixing/tidal_mixing_h_amp(h_amp, G, j, CS)

This subroutine returns a zonal slice of the topographic roughness amplitudes.

Parameters
  • g :: [in] The ocean’s grid structure

  • h_amp :: [out] The topographic roughness amplitude [Z ~> m]

  • j :: [in] j-index of the row to work on

  • cs :: The control structure for this module

subroutine mom_tidal_mixing/read_tidal_energy(G, US, tidal_energy_type, tidal_energy_file, CS)

This subroutine read tidal energy inputs from a file.

Parameters
  • g :: [in] The ocean’s grid structure

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

  • tidal_energy_type :: [in] The type of tidal energy inputs to read

  • tidal_energy_file :: [in] The file from which to read tidalinputs

  • cs :: The control structure for this module

Call to

mom_error_handler::mom_error read_tidal_constituents mom_string_functions::uppercase

Called from

tidal_mixing_init

subroutine mom_tidal_mixing/read_tidal_constituents(G, US, tidal_energy_file, CS)

This subroutine reads tidal input energy from a file by constituent.

Parameters
  • g :: [in] The ocean’s grid structure

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

  • tidal_energy_file :: [in] The file from which to read tidal energy inputs

  • cs :: The control structure for this module

Call to

mom_io::field_size mom_remapping::initialize_remapping mom_error_handler::mom_error

Called from

read_tidal_energy

subroutine mom_tidal_mixing/tidal_mixing_end(CS)

Clear pointers and deallocate memory.

Parameters

cs :: [inout] This module’s control structure, which will be deallocated in this routine.

Called from

mom_set_diffusivity::set_diffusivity_end