mom_diagnose_kdwork module reference
Provides diagnostics of work due to a given diffusivity.
Data Types
This structure has memory for used in calculating diagnostics of diffusivity many of the diffusivity diagnostics are copies of other 3d arrays. |
Functions/Subroutines
Loop over all implemented diffusivities to diagnose and output Kd Work/buoyancy fluxes. |
|
Diagnose the implied "work", or buoyancy forcing & its integral, due to a given diffusivity and column state. |
|
Allocates arrays only when needed. |
|
Deallocate any arrays that were allocated. |
|
Handles all KdWork diagnostics and flags which calculations should be done. |
|
Deallocates control structrue. |
Detailed Description
The subroutine diagnoseKdWork diagnoses the energetics associated with various vertical diffusivities inside MOM6 diabatic routines.
Type Documentation
- type mom_diagnose_kdwork/vbf_cs
This structure has memory for used in calculating diagnostics of diffusivity many of the diffusivity diagnostics are copies of other 3d arrays. It could be written more efficiently, but it is less intrusive to copy into this structure and do all calculations in this module. These diagnostics may be expensive for routine use.
- Type fields:
% id_bdif ::
integer, privateDiagnostic IDs.% id_bdif_salt ::
integer, privateDiagnostic IDs.% id_bdif_temp ::
integer, privateDiagnostic IDs.% id_bdif_dz ::
integer, privateDiagnostic IDs.% id_bdif_salt_dz ::
integer, privateDiagnostic IDs.% id_bdif_temp_dz ::
integer, privateDiagnostic IDs.% id_bdif_idz ::
integer, privateDiagnostic IDs.% id_bdif_salt_idz ::
integer, privateDiagnostic IDs.% id_bdif_temp_idz ::
integer, privateDiagnostic IDs.% id_bdif_idv ::
integer, privateDiagnostic IDs.% id_bdif_salt_idv ::
integer, privateDiagnostic IDs.% id_bdif_temp_idv ::
integer, privateDiagnostic IDs.% id_bdif_epbl ::
integer, privateDiagnostic IDs.% id_bdif_dz_epbl ::
integer, privateDiagnostic IDs.% id_bdif_idz_epbl ::
integer, privateDiagnostic IDs.% id_bdif_idv_epbl ::
integer, privateDiagnostic IDs.% id_bdif_bbl ::
integer, privateDiagnostic IDs.% id_bdif_dz_bbl ::
integer, privateDiagnostic IDs.% id_bdif_idz_bbl ::
integer, privateDiagnostic IDs.% id_bdif_idv_bbl ::
integer, privateDiagnostic IDs.% id_bdif_ks ::
integer, privateDiagnostic IDs.% id_bdif_dz_ks ::
integer, privateDiagnostic IDs.% id_bdif_idz_ks ::
integer, privateDiagnostic IDs.% id_bdif_idv_ks ::
integer, privateDiagnostic IDs.% id_bdif_bkgnd ::
integer, privateDiagnostic IDs.% id_bdif_dz_bkgnd ::
integer, privateDiagnostic IDs.% id_bdif_idz_bkgnd ::
integer, privateDiagnostic IDs.% id_bdif_idv_bkgnd ::
integer, privateDiagnostic IDs.% id_bdif_ddiff_temp ::
integer, privateDiagnostic IDs.% id_bdif_ddiff_salt ::
integer, privateDiagnostic IDs.% id_bdif_dz_ddiff_temp ::
integer, privateDiagnostic IDs.% id_bdif_dz_ddiff_salt ::
integer, privateDiagnostic IDs.% id_bdif_idz_ddiff_temp ::
integer, privateDiagnostic IDs.% id_bdif_idz_ddiff_salt ::
integer, privateDiagnostic IDs.% id_bdif_idv_ddiff_temp ::
integer, privateDiagnostic IDs.% id_bdif_idv_ddiff_salt ::
integer, privateDiagnostic IDs.% id_bdif_leak ::
integer, privateDiagnostic IDs.% id_bdif_dz_leak ::
integer, privateDiagnostic IDs.% id_bdif_idz_leak ::
integer, privateDiagnostic IDs.% id_bdif_idv_leak ::
integer, privateDiagnostic IDs.% id_bdif_quad ::
integer, privateDiagnostic IDs.% id_bdif_dz_quad ::
integer, privateDiagnostic IDs.% id_bdif_idz_quad ::
integer, privateDiagnostic IDs.% id_bdif_idv_quad ::
integer, privateDiagnostic IDs.% id_bdif_itidal ::
integer, privateDiagnostic IDs.% id_bdif_dz_itidal ::
integer, privateDiagnostic IDs.% id_bdif_idz_itidal ::
integer, privateDiagnostic IDs.% id_bdif_idv_itidal ::
integer, privateDiagnostic IDs.% id_bdif_froude ::
integer, privateDiagnostic IDs.% id_bdif_dz_froude ::
integer, privateDiagnostic IDs.% id_bdif_idz_froude ::
integer, privateDiagnostic IDs.% id_bdif_idv_froude ::
integer, privateDiagnostic IDs.% id_bdif_slope ::
integer, privateDiagnostic IDs.% id_bdif_dz_slope ::
integer, privateDiagnostic IDs.% id_bdif_idz_slope ::
integer, privateDiagnostic IDs.% id_bdif_idv_slope ::
integer, privateDiagnostic IDs.% id_bdif_lowmode ::
integer, privateDiagnostic IDs.% id_bdif_dz_lowmode ::
integer, privateDiagnostic IDs.% id_bdif_idz_lowmode ::
integer, privateDiagnostic IDs.% id_bdif_idv_lowmode ::
integer, privateDiagnostic IDs.% id_bdif_niku ::
integer, privateDiagnostic IDs.% id_bdif_dz_niku ::
integer, privateDiagnostic IDs.% id_bdif_idz_niku ::
integer, privateDiagnostic IDs.% id_bdif_idv_niku ::
integer, privateDiagnostic IDs.% id_bdif_itides ::
integer, privateDiagnostic IDs.% id_bdif_dz_itides ::
integer, privateDiagnostic IDs.% id_bdif_idz_itides ::
integer, privateDiagnostic IDs.% id_bdif_idv_itides ::
integer, privateDiagnostic IDs.% kd_bbl ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to BBL at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_epbl ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to ePBL at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_ks ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kappa Shear at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_bkgnd ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_bkgnd at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_ddiff_s ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to double diffusion of salt at interfaces% kd_ddiff_t ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to double diffusion of heat at interfaces% kd_leak ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_leak at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_quad ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_quad at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_itidal ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_itidal at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_froude ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_Froude at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_slope ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_slope at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_lowmode ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_lowmode at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_niku ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_Niku at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_itides ::
real, dimension(:,:,:), pointer, privatediapycnal diffusivity due to Kd_itides at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]% kd_add ::
real, privatespatially uniform additional diapycnal diffusivity at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1] a diagnostic for this diffusivity is not yet included, but this makes it straightforward to add% do_bflx_salt ::
logical, privateLogical flag to indicate if N2_salt should be computed.% do_bflx_temp ::
logical, privateLogical flag to indicate if N2_temp should be computed.% do_bflx_salt_dz ::
logical, privateLogical flag to indicate if N2_salt should be computed.% do_bflx_temp_dz ::
logical, privateLogical flag to indicate if N2_temp should be computed.
Function/Subroutine Documentation
- subroutine mom_diagnose_kdwork/kdwork_diagnostics(G, GV, US, diag, VBF, Kd_salt, Kd_temp, N2_Salt, N2_Temp, dz)
Loop over all implemented diffusivities to diagnose and output Kd Work/buoyancy fluxes.
- Parameters:
g :: [in] Grid type
gv :: [in] ocean vertical grid structure
us :: [in] A dimensional unit scaling type
diag ::
diag[inout] regulates diagnostic outputvbf :: [inout] Vertical buoyancy flux structure
kd_salt :: [in] Total diapycnal diffusivity of salt and passive
kd_temp :: [in] Total diapycnal diffusivity of heat at interfaces
n2_salt :: [in] Buoyancy frequency contribution from salinity [T-2 ~> s-2]
n2_temp :: [in] Buoyancy frequency contribution from temperature [T-2 ~> s-2]
dz ::
dz[in] Grid spacing [Z ~> m]
- Call to:
- subroutine mom_diagnose_kdwork/diagnosekdwork(G, GV, N2, Kd, Bdif_flx, dz, Bdif_flx_dz)
Diagnose the implied “work”, or buoyancy forcing & its integral, due to a given diffusivity and column state.
- Parameters:
g :: [in] Grid type
gv :: [in] ocean vertical grid structure
n2 :: [in] Buoyancy frequency [T-2 ~> s-2]
kd :: [in] Diffusivity [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
bdif_flx :: [out] Buoyancy flux [H Z T-3 ~> m2 s-3 or W m-3]
dz ::
dz[in] Grid spacing [Z ~> m]bdif_flx_dz :: [out] Buoyancy flux over layer [H Z2 T-3 ~> m3 s-3 or W m-2]
- Called from:
- subroutine mom_diagnose_kdwork/allocate_vbf_cs(G, GV, VBF)
Allocates arrays only when needed.
- Parameters:
g :: [in] ocean grid structure
gv :: [in] ocean vertical grid structure
vbf :: [inout] Vertical buoyancy flux structure
- Called from:
mom_diabatic_driver::diabatic_alemom_diabatic_driver::diabatic_ale_legacymom_diabatic_driver::layered_diabatic
- subroutine mom_diagnose_kdwork/deallocate_vbf_cs(VBF)
Deallocate any arrays that were allocated.
- Parameters:
vbf :: [inout] Vertical buoyancy flux structure
- Called from:
- subroutine mom_diagnose_kdwork/kdwork_init(Time, G, GV, US, use_EOS, diag, VBF, Use_KdWork_diag)
Handles all KdWork diagnostics and flags which calculations should be done.
- Parameters:
time :: model time
g :: [in] ocean grid structure
gv :: [in] ocean vertical grid structure
us :: [in] A dimensional unit scaling type
use_eos :: [in] If true, density is calculated from temperature and salinity using an equation of state.
diag ::
diag[inout] regulates diagnostic outputvbf :: [inout] Vertical buoyancy flux structure
use_kdwork_diag :: [out] Flag if any output was turned on
- subroutine mom_diagnose_kdwork/kdwork_end(VBF)
Deallocates control structrue.
- Parameters:
vbf :: [inout] Vertical buoyancy flux structure