MOM_diapyc_energy_req module reference

Calculates the energy requirements of mixing.

Data Types

diapyc_energy_req_CS

This control structure holds parameters for the MOM_diapyc_energy_req module

Functions/Subroutines

diapyc_energy_req_test

This subroutine helps test the accuracy of the diapycnal mixing energy requirement code by writing diagnostics, possibly using an intensely mixing test profile of diffusivity

diapyc_energy_req_calc

This subroutine uses a substantially refactored tridiagonal equation for diapycnal mixing of temperature and salinity to estimate the potential energy change due to diapycnal mixing in a column of water. It does this estimate 4 different ways, all of which should be equivalent, but reports only one. The various estimates are taken because they will later be used as templates for other bits of code

find_PE_chg

This subroutine calculates the change in potential energy and or derivatives for several changes in an interface's diapycnal diffusivity times a timestep.

diapyc_energy_req_init

Initialize parameters and allocate memory associated with the diapycnal energy requirement module.

diapyc_energy_req_end

Clean up and deallocate memory associated with the diapycnal energy requirement module.

Type Documentation

type, public :: diapyc_energy_req_CS

This control structure holds parameters for the MOM_diapyc_energy_req module

Parameters
  • initialized

    A variable that is here because empty structures are not permitted by some compilers.

  • test_Kh_scaling

    A scaling factor for the diapycnal diffusivity [nondim]

  • ColHt_scaling

    A scaling factor for the column height change correction term [nondim]

  • VonKar

    The von Karman coefficient as used in this module [nondim]

  • use_test_Kh_profile

    If true, use the internal test diffusivity profile in place of any that might be passed in as an argument.

  • id_ERt

    Diagnostic IDs

  • id_ERb

    Diagnostic IDs

  • id_ERc

    Diagnostic IDs

  • id_ERh

    Diagnostic IDs

  • id_Kddt

    Diagnostic IDs

  • id_Kd

    Diagnostic IDs

  • id_CHCt

    Diagnostic IDs

  • id_CHCb

    Diagnostic IDs

  • id_CHCc

    Diagnostic IDs

  • id_CHCh

    Diagnostic IDs

  • id_T0

    Diagnostic IDs

  • id_Tf

    Diagnostic IDs

  • id_S0

    Diagnostic IDs

  • id_Sf

    Diagnostic IDs

  • id_N2_0

    Diagnostic IDs

  • id_N2_f

    Diagnostic IDs

  • id_h

    Diagnostic IDs

  • id_zInt

    Diagnostic IDs

Functions/Subroutine Documentation

subroutine diapyc_energy_req_test(h_3d, dt, tv, G, GV, US, CS, Kd_int)

This subroutine helps test the accuracy of the diapycnal mixing energy requirement code by writing diagnostics, possibly using an intensely mixing test profile of diffusivity

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • h_3d [in]

    Layer thickness before entrainment [H ~> m or kg m-2].

  • tv [inout]

    A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

  • dt [in]

    The amount of time covered by this call [T ~> s].

  • CS

    This module's control structure.

  • Kd_int [in]

    Interface diffusivities [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

Callees call graph
Callees of mom_diapyc_energy_req::diapyc_energy_req_test calls cluster_mom_diapyc_energy_req MOM_diapyc_energy_req cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_interface_heights MOM_interface_heights mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::diapyc_energy_req_test diapyc_energy_req_test mom_diapyc_energy_req::diapyc_energy_req_test->mom_diapyc_energy_req::diapyc_energy_req_calc mom_error_handler::mom_error MOM_error mom_diapyc_energy_req::diapyc_energy_req_test->mom_error_handler::mom_error mom_error_infra::is_root_pe is_root_pe mom_diapyc_energy_req::diapyc_energy_req_test->mom_error_infra::is_root_pe mom_interface_heights::interface::thickness_to_dz thickness_to_dz (interface) mom_diapyc_energy_req::diapyc_energy_req_test->mom_interface_heights::interface::thickness_to_dz
Text view
Callers call graph
Callers of mom_diapyc_energy_req::diapyc_energy_req_test calls cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diapyc_energy_req MOM_diapyc_energy_req mom_diabatic_driver::diabatic diabatic mom_diapyc_energy_req::diapyc_energy_req_test diapyc_energy_req_test mom_diabatic_driver::diabatic->mom_diapyc_energy_req::diapyc_energy_req_test
Text view
subroutine diapyc_energy_req_calc(h_in, dz_in, T_in, S_in, Kd, energy_Kd, dt, tv, G, GV, US, may_print, CS)

This subroutine uses a substantially refactored tridiagonal equation for diapycnal mixing of temperature and salinity to estimate the potential energy change due to diapycnal mixing in a column of water. It does this estimate 4 different ways, all of which should be equivalent, but reports only one. The various estimates are taken because they will later be used as templates for other bits of code

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 [in]

    Layer thickness before entrainment, [H ~> m or kg m-2]

  • dz_in [in]

    Vertical distance across layers before entrainment [Z ~> m]

  • T_in [in]

    The layer temperatures [C ~> degC].

  • S_in [in]

    The layer salinities [S ~> ppt].

  • Kd [in]

    The interfaces diapycnal diffusivities [H Z T-1 ~> m2 s-1 or kg m-1 s-1].

  • dt [in]

    The amount of time covered by this call [T ~> s].

  • energy_Kd [out]

    The column-integrated rate of energy consumption by diapycnal diffusion [R Z L2 T-3 ~> W m-2].

  • tv [inout]

    A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

  • may_print [in]

    If present and true, write out diagnostics of energy use.

  • CS

    This module's control structure.

Callees call graph
Callees of mom_diapyc_energy_req::diapyc_energy_req_calc calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diapyc_energy_req MOM_diapyc_energy_req cluster_mom_eos MOM_EOS mom_diag_mediator::interface::post_data post_data (interface) mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::diapyc_energy_req_calc->mom_diag_mediator::interface::post_data mom_diapyc_energy_req::find_pe_chg find_PE_chg [private/internal] mom_diapyc_energy_req::diapyc_energy_req_calc->mom_diapyc_energy_req::find_pe_chg mom_eos::interface::calculate_density calculate_density (interface) mom_diapyc_energy_req::diapyc_energy_req_calc->mom_eos::interface::calculate_density mom_eos::interface::calculate_specific_vol_derivs calculate_specific_vol_derivs (interface) mom_diapyc_energy_req::diapyc_energy_req_calc->mom_eos::interface::calculate_specific_vol_derivs
Text view
Callers call graph
Callers of mom_diapyc_energy_req::diapyc_energy_req_calc calls cluster_mom_diapyc_energy_req MOM_diapyc_energy_req mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::diapyc_energy_req_test diapyc_energy_req_test mom_diapyc_energy_req::diapyc_energy_req_test->mom_diapyc_energy_req::diapyc_energy_req_calc
Text view
subroutine find_PE_chg(Kddt_h0, dKddt_h, hp_a, hp_b, Th_a, Sh_a, Th_b, Sh_b, dT_to_dPE_a, dS_to_dPE_a, dT_to_dPE_b, dS_to_dPE_b, pres_Z, dT_to_dColHt_a, dS_to_dColHt_a, dT_to_dColHt_b, dS_to_dColHt_b, PE_chg, dPEc_dKd, dPE_max, dPEc_dKd_0, PE_ColHt_cor)

This subroutine calculates the change in potential energy and or derivatives for several changes in an interface's diapycnal diffusivity times a timestep.

Parameters
  • Kddt_h0 [in]

    The previously used diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface [H ~> m or kg m-2].

  • dKddt_h [in]

    The trial change in the diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface [H ~> m or kg m-2].

  • hp_a [in]

    The effective pivot thickness of the layer above the interface, given by h_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt_h for the interface above [H ~> m or kg m-2].

  • hp_b [in]

    The effective pivot thickness of the layer below the interface, given by h_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt_h for the interface above [H ~> m or kg m-2].

  • Th_a [in]

    An effective temperature times a thickness in the layer above, including implicit mixing effects with other yet higher layers [C H ~> degC m or degC kg m-2].

  • Sh_a [in]

    An effective salinity times a thickness in the layer above, including implicit mixing effects with other yet higher layers [S H ~> ppt m or ppt kg m-2].

  • Th_b [in]

    An effective temperature times a thickness in the layer below, including implicit mixing effects with other yet lower layers [C H ~> degC m or degC kg m-2].

  • Sh_b [in]

    An effective salinity times a thickness in the layer below, including implicit mixing effects with other yet lower layers [S H ~> ppt m or ppt kg m-2].

  • dT_to_dPE_a [in]

    A factor (pres_lay*mass_lay*dSpec_vol/dT) relating a layer's temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers above [R Z L2 T-2 C-1 ~> J m-2 degC-1].

  • dS_to_dPE_a [in]

    A factor (pres_lay*mass_lay*dSpec_vol/dS) relating a layer's salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers above [R Z L2 T-2 S-1 ~> J m-2 ppt-1].

  • dT_to_dPE_b [in]

    A factor (pres_lay*mass_lay*dSpec_vol/dT) relating a layer's temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers below [R Z L2 T-2 C-1 ~> J m-2 degC-1].

  • dS_to_dPE_b [in]

    A factor (pres_lay*mass_lay*dSpec_vol/dS) relating a layer's salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers below [R Z L2 T-2 S-1 ~> J m-2 ppt-1].

  • pres_Z [in]

    The hydrostatic interface pressure, which relates the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing [R L2 T-2 ~> J m-3].

  • dT_to_dColHt_a [in]

    A factor (mass_lay*dSColHtc_vol/dT) relating a layer's temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers above [Z C-1 ~> m degC-1].

  • dS_to_dColHt_a [in]

    A factor (mass_lay*dSColHtc_vol/dS) relating a layer's salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers above [Z S-1 ~> m ppt-1].

  • dT_to_dColHt_b [in]

    A factor (mass_lay*dSColHtc_vol/dT) relating a layer's temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers below [Z C-1 ~> m degC-1].

  • dS_to_dColHt_b [in]

    A factor (mass_lay*dSColHtc_vol/dS) relating a layer's salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers below [Z S-1 ~> m ppt-1].

  • PE_chg [out]

    The change in column potential energy from applying Kddt_h at the present interface [R Z L2 T-2 ~> J m-2].

  • dPEc_dKd [out]

    The partial derivative of PE_chg with Kddt_h, [R Z L2 T-2 H-1 ~> J m-3 or J kg-1].

  • dPE_max [out]

    The maximum change in column potential energy that could be realized by applying a huge value of Kddt_h at the present interface [R Z L2 T-2 ~> J m-2].

  • dPEc_dKd_0 [out]

    The partial derivative of PE_chg with Kddt_h in the limit where Kddt_h = 0 [R Z L2 T-2 H-1 ~> J m-3 or J kg-1].

  • PE_ColHt_cor [out]

    The correction to PE_chg that is made due to a net change in the column height [R Z L2 T-2 ~> J m-2].

Callers call graph
Callers of mom_diapyc_energy_req::find_pe_chg calls cluster_mom_diapyc_energy_req MOM_diapyc_energy_req mom_diapyc_energy_req::diapyc_energy_req_calc diapyc_energy_req_calc mom_diapyc_energy_req::find_pe_chg find_PE_chg [private/internal] mom_diapyc_energy_req::diapyc_energy_req_calc->mom_diapyc_energy_req::find_pe_chg
Text view
subroutine diapyc_energy_req_init(Time, G, GV, US, param_file, diag, CS)

Initialize parameters and allocate memory associated with the diapycnal energy requirement module.

Parameters
  • Time [in]

    model time

  • G [in]

    model grid structure

  • GV [in]

    ocean vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    file to parse for parameter values

  • diag [inout]

    structure to regulate diagnostic output

  • CS

    module control structure

Callees call graph
Callees of mom_diapyc_energy_req::diapyc_energy_req_init calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_diapyc_energy_req MOM_diapyc_energy_req cluster_mom_file_parser MOM_file_parser mom_diag_mediator::register_diag_field register_diag_field mom_diapyc_energy_req::diapyc_energy_req_init diapyc_energy_req_init mom_diapyc_energy_req::diapyc_energy_req_init->mom_diag_mediator::register_diag_field mom_file_parser::interface::get_param get_param (interface) mom_diapyc_energy_req::diapyc_energy_req_init->mom_file_parser::interface::get_param mom_file_parser::interface::log_version log_version (interface) mom_diapyc_energy_req::diapyc_energy_req_init->mom_file_parser::interface::log_version
Text view
Callers call graph
Callers of mom_diapyc_energy_req::diapyc_energy_req_init calls cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diapyc_energy_req MOM_diapyc_energy_req mom_diabatic_driver::diabatic_driver_init diabatic_driver_init mom_diapyc_energy_req::diapyc_energy_req_init diapyc_energy_req_init mom_diabatic_driver::diabatic_driver_init->mom_diapyc_energy_req::diapyc_energy_req_init
Text view
subroutine diapyc_energy_req_end(CS)

Clean up and deallocate memory associated with the diapycnal energy requirement module.

Parameters
  • CS

    Diapycnal energy requirement control structure that will be deallocated in this subroutine.

Callers call graph
Callers of mom_diapyc_energy_req::diapyc_energy_req_end calls cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_diapyc_energy_req MOM_diapyc_energy_req mom_diabatic_driver::diabatic_driver_end diabatic_driver_end mom_diapyc_energy_req::diapyc_energy_req_end diapyc_energy_req_end mom_diabatic_driver::diabatic_driver_end->mom_diapyc_energy_req::diapyc_energy_req_end
Text view
API generated with Flint · Rendered from reStructuredText