mom_diapyc_energy_req module reference

Calculates the energy requirements of mixing.

More…

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.

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.

Detailed Description

Calculates the energy requirements of mixing.

Type Documentation

type mom_diapyc_energy_req/diapyc_energy_req_cs

This control structure holds parameters for the MOM_diapyc_energy_req module.

Type fields:
  • % id_ert [integer] :: Diagnostic IDs.

  • % id_erb [integer] :: Diagnostic IDs.

  • % id_erc [integer] :: Diagnostic IDs.

  • % id_erh [integer] :: Diagnostic IDs.

  • % id_kddt [integer] :: Diagnostic IDs.

  • % id_kd [integer] :: Diagnostic IDs.

  • % id_chct [integer] :: Diagnostic IDs.

  • % id_chcb [integer] :: Diagnostic IDs.

  • % id_chcc [integer] :: Diagnostic IDs.

  • % id_chch [integer] :: Diagnostic IDs.

  • % id_t0 [integer] :: Diagnostic IDs.

  • % id_tf [integer] :: Diagnostic IDs.

  • % id_s0 [integer] :: Diagnostic IDs.

  • % id_sf [integer] :: Diagnostic IDs.

  • % id_n2_0 [integer] :: Diagnostic IDs.

  • % id_n2_f [integer] :: Diagnostic IDs.

  • % id_h [integer] :: Diagnostic IDs.

  • % id_zint [integer] :: Diagnostic IDs.

  • % initialized [logical] :: A variable that is here because empty structures are not permitted by some compilers.

  • % test_kh_scaling [real] :: A scaling factor for the diapycnal diffusivity [nondim].

  • % colht_scaling [real] :: A scaling factor for the column height change correction term [nondim].

  • % vonkar [real] :: The von Karman coefficient as used in this module [nondim].

  • % use_test_kh_profile [logical] :: If true, use the internal test diffusivity profile in place of any that might be passed in as an argument.

  • % diag [type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.

Function/Subroutine Documentation

subroutine mom_diapyc_energy_req/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]

Call to:

diapyc_energy_req_calc mom_error_handler::mom_error

Called from:

mom_diabatic_driver::diabatic

subroutine mom_diapyc_energy_req/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.

Call to:

find_pe_chg

Called from:

diapyc_energy_req_test

subroutine mom_diapyc_energy_req/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].

Called from:

diapyc_energy_req_calc

subroutine mom_diapyc_energy_req/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

Call to:

mom_diag_mediator::register_diag_field

subroutine mom_diapyc_energy_req/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.