namespace mom_diapyc_energy_req¶
Overview¶
Calculates the energy requirements of mixing. More…
namespace mom_diapyc_energy_req { // global functions subroutine, public diapyc_energy_req_test( h_3d h_3d, dt dt, tv tv, G G, GV GV, US US, CS CS, Kd_int Kd_int ); subroutine, public diapyc_energy_req_calc( h_in h_in, T_in T_in, S_in S_in, Kd Kd, energy_Kd energy_Kd, dt dt, tv tv, G G, GV GV, US US, may_print may_print, CS CS ); subroutine, public diapyc_energy_req_init( Time Time, G G, GV GV, US US, param_file param_file, diag diag, CS CS ); subroutine, public diapyc_energy_req_end(CS CS); } // namespace mom_diapyc_energy_req
Detailed Documentation¶
Calculates the energy requirements of mixing.
Global Functions¶
subroutine, public diapyc_energy_req_test( h_3d h_3d, dt dt, tv tv, G G, GV GV, US US, CS CS, Kd_int 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 |
The ocean’s grid structure. |
gv |
The ocean’s vertical grid structure. |
us |
A dimensional unit scaling type |
h_3d |
Layer thickness before entrainment [H ~> m or kg m-2]. |
tv |
A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs. |
dt |
The amount of time covered by this call [T ~> s]. |
cs |
This module’s control structure. |
kd_int |
Interface diffusivities [Z2 T-1 ~> m2 s-1]. |
subroutine, public diapyc_energy_req_calc( h_in h_in, T_in T_in, S_in S_in, Kd Kd, energy_Kd energy_Kd, dt dt, tv tv, G G, GV GV, US US, may_print may_print, CS 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 |
The ocean’s grid structure. |
gv |
The ocean’s vertical grid structure. |
us |
A dimensional unit scaling type |
h_in |
Layer thickness before entrainment, [H ~> m or kg m-2]. |
t_in |
The layer temperatures [degC]. |
s_in |
The layer salinities [ppt]. |
kd |
The interfaces diapycnal diffusivities [Z2 T-1 ~> m2 s-1]. |
dt |
The amount of time covered by this call [T ~> s]. |
energy_kd |
The column-integrated rate of energy consumption by diapycnal diffusion [W m-2]. |
tv |
A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs. |
may_print |
If present and true, write out diagnostics of energy use. |
cs |
This module’s control structure. |
subroutine, public diapyc_energy_req_init( Time Time, G G, GV GV, US US, param_file param_file, diag diag, CS CS )
Initialize parameters and allocate memory associated with the diapycnal energy requirement module.
Parameters:
time |
model time |
g |
model grid structure |
gv |
ocean vertical grid structure |
us |
A dimensional unit scaling type |
param_file |
file to parse for parameter values |
diag |
structure to regulate diagnostic output |
cs |
module control structure |
subroutine, public diapyc_energy_req_end(CS 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. |