MOM6
|
Calculates the energy requirements of mixing.
Data Types | |
type | diapyc_energy_req_cs |
This control structure holds parameters for the MOM_diapyc_energy_req module. More... | |
Functions/Subroutines | |
subroutine, public | 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. More... | |
subroutine, public | diapyc_energy_req_calc (h_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. More... | |
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, ColHt_cor) |
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces's diapycnal diffusivity times a timestep. More... | |
subroutine | find_pe_chg_orig (Kddt_h, h_k, b_den_1, dTe_term, dSe_term, dT_km1_t2, dS_km1_t2, dT_to_dPE_k, dS_to_dPE_k, dT_to_dPEa, dS_to_dPEa, pres_Z, dT_to_dColHt_k, dS_to_dColHt_k, dT_to_dColHta, dS_to_dColHta, PE_chg, dPEc_dKd, dPE_max, dPEc_dKd_0) |
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces's diapycnal diffusivity times a timestep using the original form used in the first version of ePBL. More... | |
subroutine, public | diapyc_energy_req_init (Time, G, GV, US, param_file, diag, CS) |
Initialize parameters and allocate memory associated with the diapycnal energy requirement module. More... | |
subroutine, public | diapyc_energy_req_end (CS) |
Clean up and deallocate memory associated with the diapycnal energy requirement module. More... | |
subroutine, public mom_diapyc_energy_req::diapyc_energy_req_calc | ( | real, dimension(gv%ke), intent(in) | h_in, |
real, dimension(gv%ke), intent(in) | T_in, | ||
real, dimension(gv%ke), intent(in) | S_in, | ||
real, dimension(gv%ke+1), intent(in) | Kd, | ||
real, intent(out) | energy_Kd, | ||
real, intent(in) | dt, | ||
type(thermo_var_ptrs), intent(inout) | tv, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
logical, intent(in), optional | may_print, | ||
type(diapyc_energy_req_cs), optional, pointer | 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.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | h_in | Layer thickness before entrainment, [H ~> m or kg m-2]. |
[in] | t_in | The layer temperatures [degC]. |
[in] | s_in | The layer salinities [ppt]. |
[in] | kd | The interfaces diapycnal diffusivities [Z2 T-1 ~> m2 s-1]. |
[in] | dt | The amount of time covered by this call [T ~> s]. |
[out] | energy_kd | The column-integrated rate of energy consumption by diapycnal diffusion [W m-2]. |
[in,out] | tv | A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs. |
[in] | may_print | If present and true, write out diagnostics of energy use. |
cs | This module's control structure. |
Definition at line 122 of file MOM_diapyc_energy_req.F90.
References mom_eos::calculate_specific_vol_derivs(), find_pe_chg(), and find_pe_chg_orig().
Referenced by diapyc_energy_req_test().
subroutine, public mom_diapyc_energy_req::diapyc_energy_req_end | ( | type(diapyc_energy_req_cs), pointer | CS | ) |
Clean up and deallocate memory associated with the diapycnal energy requirement module.
cs | Diapycnal energy requirement control structure that will be deallocated in this subroutine. |
Definition at line 1345 of file MOM_diapyc_energy_req.F90.
subroutine, public mom_diapyc_energy_req::diapyc_energy_req_init | ( | type(time_type), intent(in) | Time, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(diapyc_energy_req_cs), pointer | CS | ||
) |
Initialize parameters and allocate memory associated with the diapycnal energy requirement module.
[in] | time | model time |
[in] | g | model grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | param_file | file to parse for parameter values |
[in,out] | diag | structure to regulate diagnostic output |
cs | module control structure |
Definition at line 1271 of file MOM_diapyc_energy_req.F90.
References mom_diag_mediator::register_diag_field().
subroutine, public mom_diapyc_energy_req::diapyc_energy_req_test | ( | real, dimension(g%isd:g%ied,g%jsd:g%jed,gv%ke), intent(in) | h_3d, |
real, intent(in) | dt, | ||
type(thermo_var_ptrs), intent(inout) | tv, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(diapyc_energy_req_cs), pointer | CS, | ||
real, dimension(g%isd:g%ied,g%jsd:g%jed,gv%ke+1), intent(in), optional | 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.
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | h_3d | Layer thickness before entrainment [H ~> m or kg m-2]. |
[in,out] | tv | A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs. |
[in] | dt | The amount of time covered by this call [T ~> s]. |
cs | This module's control structure. | |
[in] | kd_int | Interface diffusivities [Z2 T-1 ~> m2 s-1]. |
Definition at line 50 of file MOM_diapyc_energy_req.F90.
References diapyc_energy_req_calc(), mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
Referenced by mom_diabatic_driver::diabatic().
|
private |
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces's diapycnal diffusivity times a timestep.
[in] | kddt_h0 | 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]. |
[in] | dkddt_h | 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]. |
[in] | hp_a | 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]. |
[in] | hp_b | 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]. |
[in] | th_a | An effective temperature times a thickness in the layer above, including implicit mixing effects with other yet higher layers [degC H ~> degC m or degC kg m-2]. |
[in] | sh_a | An effective salinity times a thickness in the layer above, including implicit mixing effects with other yet higher layers [ppt H ~> ppt m or ppt kg m-2]. |
[in] | th_b | An effective temperature times a thickness in the layer below, including implicit mixing effects with other yet lower layers [degC H ~> degC m or degC kg m-2]. |
[in] | sh_b | An effective salinity times a thickness in the layer below, including implicit mixing effects with other yet lower layers [ppt H ~> ppt m or ppt kg m-2]. |
[in] | dt_to_dpe_a | 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 [J m-2 degC-1]. |
[in] | ds_to_dpe_a | 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 [J m-2 ppt-1]. |
[in] | dt_to_dpe_b | 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 [J m-2 degC-1]. |
[in] | ds_to_dpe_b | 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 [J m-2 ppt-1]. |
[in] | pres_z | The hydrostatic interface pressure, which is used to relate the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing [J m-2 Z-1 ~> J m-3]. |
[in] | dt_to_dcolht_a | 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 degC-1 ~> m degC-1]. |
[in] | ds_to_dcolht_a | 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 ppt-1 ~> m ppt-1]. |
[in] | dt_to_dcolht_b | 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 degC-1 ~> m degC-1]. |
[in] | ds_to_dcolht_b | 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 ppt-1 ~> m ppt-1]. |
[out] | pe_chg | The change in column potential energy from applying Kddt_h at the present interface [J m-2]. |
[out] | dpec_dkd | The partial derivative of PE_chg with Kddt_h, [J m-2 H-1 ~> J m-3 or J kg-1]. |
[out] | dpe_max | The maximum change in column potential energy that could be realizedd by applying a huge value of Kddt_h at the present interface [J m-2]. |
[out] | dpec_dkd_0 | The partial derivative of PE_chg with Kddt_h in the limit where Kddt_h = 0 [J m-2 H-1 ~> J m-3 or J kg-1]. |
[out] | colht_cor | The correction to PE_chg that is made due to a net change in the column height [J m-2]. |
Definition at line 971 of file MOM_diapyc_energy_req.F90.
Referenced by diapyc_energy_req_calc().
|
private |
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces's diapycnal diffusivity times a timestep using the original form used in the first version of ePBL.
[in] | kddt_h | 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]. |
[in] | h_k | The thickness of the layer below the interface [H ~> m or kg m-2]. |
[in] | b_den_1 | The first term in the denominator of the pivot for the tridiagonal solver, 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]. |
[in] | dte_term | A diffusivity-independent term related to the temperature change in the layer below the interface [degC H ~> degC m or degC kg m-2]. |
[in] | dse_term | A diffusivity-independent term related to the salinity change in the layer below the interface [ppt H ~> ppt m or ppt kg m-2]. |
[in] | dt_km1_t2 | A diffusivity-independent term related to the temperature change in the layer above the interface [degC]. |
[in] | ds_km1_t2 | A diffusivity-independent term related to the salinity change in the layer above the interface [ppt]. |
[in] | pres_z | The hydrostatic interface pressure, which is used to relate the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing [J m-2 Z-1 ~> J m-3]. |
[in] | dt_to_dpe_k | 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 [J m-2 degC-1]. |
[in] | ds_to_dpe_k | 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 [J m-2 ppt-1]. |
[in] | dt_to_dpea | 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 [J m-2 degC-1]. |
[in] | ds_to_dpea | 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 [J m-2 ppt-1]. |
[in] | dt_to_dcolht_k | 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 degC-1 ~> m degC-1]. |
[in] | ds_to_dcolht_k | 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 ppt-1 ~> m ppt-1]. |
[in] | dt_to_dcolhta | 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 degC-1 ~> m degC-1]. |
[in] | ds_to_dcolhta | 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 ppt-1 ~> m ppt-1]. |
[out] | pe_chg | The change in column potential energy from applying Kddt_h at the present interface [J m-2]. |
[out] | dpec_dkd | The partial derivative of PE_chg with Kddt_h, [J m-2 H-1 ~> J m-3 or J kg-1]. |
[out] | dpe_max | The maximum change in column potential energy that could be realized by applying a huge value of Kddt_h at the present interface [J m-2]. |
[out] | dpec_dkd_0 | The partial derivative of PE_chg with Kddt_h in the limit where Kddt_h = 0 [J m-2 H-1 ~> J m-3 or J kg-1]. |
Definition at line 1121 of file MOM_diapyc_energy_req.F90.
Referenced by diapyc_energy_req_calc().