mom_diagnose_kdwork module reference

Provides diagnostics of work due to a given diffusivity.

More…

Data Types

vbf_cs

This structure has memory for used in calculating diagnostics of diffusivity many of the diffusivity diagnostics are copies of other 3d arrays.

Functions/Subroutines

kdwork_diagnostics()

Loop over all implemented diffusivities to diagnose and output Kd Work/buoyancy fluxes.

diagnosekdwork()

Diagnose the implied "work", or buoyancy forcing & its integral, due to a given diffusivity and column state.

allocate_vbf_cs()

Allocates arrays only when needed.

deallocate_vbf_cs()

Deallocate any arrays that were allocated.

kdwork_init()

Handles all KdWork diagnostics and flags which calculations should be done.

kdwork_end()

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, private Diagnostic IDs.

  • % id_bdif_salt :: integer, private Diagnostic IDs.

  • % id_bdif_temp :: integer, private Diagnostic IDs.

  • % id_bdif_dz :: integer, private Diagnostic IDs.

  • % id_bdif_salt_dz :: integer, private Diagnostic IDs.

  • % id_bdif_temp_dz :: integer, private Diagnostic IDs.

  • % id_bdif_idz :: integer, private Diagnostic IDs.

  • % id_bdif_salt_idz :: integer, private Diagnostic IDs.

  • % id_bdif_temp_idz :: integer, private Diagnostic IDs.

  • % id_bdif_idv :: integer, private Diagnostic IDs.

  • % id_bdif_salt_idv :: integer, private Diagnostic IDs.

  • % id_bdif_temp_idv :: integer, private Diagnostic IDs.

  • % id_bdif_epbl :: integer, private Diagnostic IDs.

  • % id_bdif_dz_epbl :: integer, private Diagnostic IDs.

  • % id_bdif_idz_epbl :: integer, private Diagnostic IDs.

  • % id_bdif_idv_epbl :: integer, private Diagnostic IDs.

  • % id_bdif_bbl :: integer, private Diagnostic IDs.

  • % id_bdif_dz_bbl :: integer, private Diagnostic IDs.

  • % id_bdif_idz_bbl :: integer, private Diagnostic IDs.

  • % id_bdif_idv_bbl :: integer, private Diagnostic IDs.

  • % id_bdif_ks :: integer, private Diagnostic IDs.

  • % id_bdif_dz_ks :: integer, private Diagnostic IDs.

  • % id_bdif_idz_ks :: integer, private Diagnostic IDs.

  • % id_bdif_idv_ks :: integer, private Diagnostic IDs.

  • % id_bdif_bkgnd :: integer, private Diagnostic IDs.

  • % id_bdif_dz_bkgnd :: integer, private Diagnostic IDs.

  • % id_bdif_idz_bkgnd :: integer, private Diagnostic IDs.

  • % id_bdif_idv_bkgnd :: integer, private Diagnostic IDs.

  • % id_bdif_ddiff_temp :: integer, private Diagnostic IDs.

  • % id_bdif_ddiff_salt :: integer, private Diagnostic IDs.

  • % id_bdif_dz_ddiff_temp :: integer, private Diagnostic IDs.

  • % id_bdif_dz_ddiff_salt :: integer, private Diagnostic IDs.

  • % id_bdif_idz_ddiff_temp :: integer, private Diagnostic IDs.

  • % id_bdif_idz_ddiff_salt :: integer, private Diagnostic IDs.

  • % id_bdif_idv_ddiff_temp :: integer, private Diagnostic IDs.

  • % id_bdif_idv_ddiff_salt :: integer, private Diagnostic IDs.

  • % id_bdif_leak :: integer, private Diagnostic IDs.

  • % id_bdif_dz_leak :: integer, private Diagnostic IDs.

  • % id_bdif_idz_leak :: integer, private Diagnostic IDs.

  • % id_bdif_idv_leak :: integer, private Diagnostic IDs.

  • % id_bdif_quad :: integer, private Diagnostic IDs.

  • % id_bdif_dz_quad :: integer, private Diagnostic IDs.

  • % id_bdif_idz_quad :: integer, private Diagnostic IDs.

  • % id_bdif_idv_quad :: integer, private Diagnostic IDs.

  • % id_bdif_itidal :: integer, private Diagnostic IDs.

  • % id_bdif_dz_itidal :: integer, private Diagnostic IDs.

  • % id_bdif_idz_itidal :: integer, private Diagnostic IDs.

  • % id_bdif_idv_itidal :: integer, private Diagnostic IDs.

  • % id_bdif_froude :: integer, private Diagnostic IDs.

  • % id_bdif_dz_froude :: integer, private Diagnostic IDs.

  • % id_bdif_idz_froude :: integer, private Diagnostic IDs.

  • % id_bdif_idv_froude :: integer, private Diagnostic IDs.

  • % id_bdif_slope :: integer, private Diagnostic IDs.

  • % id_bdif_dz_slope :: integer, private Diagnostic IDs.

  • % id_bdif_idz_slope :: integer, private Diagnostic IDs.

  • % id_bdif_idv_slope :: integer, private Diagnostic IDs.

  • % id_bdif_lowmode :: integer, private Diagnostic IDs.

  • % id_bdif_dz_lowmode :: integer, private Diagnostic IDs.

  • % id_bdif_idz_lowmode :: integer, private Diagnostic IDs.

  • % id_bdif_idv_lowmode :: integer, private Diagnostic IDs.

  • % id_bdif_niku :: integer, private Diagnostic IDs.

  • % id_bdif_dz_niku :: integer, private Diagnostic IDs.

  • % id_bdif_idz_niku :: integer, private Diagnostic IDs.

  • % id_bdif_idv_niku :: integer, private Diagnostic IDs.

  • % id_bdif_itides :: integer, private Diagnostic IDs.

  • % id_bdif_dz_itides :: integer, private Diagnostic IDs.

  • % id_bdif_idz_itides :: integer, private Diagnostic IDs.

  • % id_bdif_idv_itides :: integer, private Diagnostic IDs.

  • % bflx_salt :: real, dimension(:,:,:), pointer, private Salinity contribution to buoyancy flux at interfaces.

  • % bflx_temp :: real, dimension(:,:,:), pointer, private Temperature contribution to buoyancy flux at interfaces.

  • % bflx_salt_dz :: real, dimension(:,:,:), pointer, private Salinity contribution to integral of buoyancy flux over layer.

  • % bflx_temp_dz :: real, dimension(:,:,:), pointer, private Temperature contribution to integral of buoyancy flux over layer.

  • % kd_salt :: real, dimension(:,:,:), pointer, private total diapycnal diffusivity of salt at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • % kd_temp :: real, dimension(:,:,:), pointer, private total diapycnal diffusivity of heat at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • % kd_bbl :: real, dimension(:,:,:), pointer, private diapycnal diffusivity due to BBL at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • % kd_epbl :: real, dimension(:,:,:), pointer, private diapycnal diffusivity due to ePBL at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • % kd_ks :: real, dimension(:,:,:), pointer, private diapycnal 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, private diapycnal 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, private diapycnal diffusivity due to double diffusion of salt at interfaces

  • % kd_ddiff_t :: real, dimension(:,:,:), pointer, private diapycnal diffusivity due to double diffusion of heat at interfaces

  • % kd_leak :: real, dimension(:,:,:), pointer, private diapycnal 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, private diapycnal 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, private diapycnal 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, private diapycnal 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, private diapycnal 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, private diapycnal 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, private diapycnal 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, private diapycnal diffusivity due to Kd_itides at interfaces [H Z T-1 ~> m2 s-1 or kg m-1 s-1]

  • % kd_add :: real, private spatially 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, private Logical flag to indicate if N2_salt should be computed.

  • % do_bflx_temp :: logical, private Logical flag to indicate if N2_temp should be computed.

  • % do_bflx_salt_dz :: logical, private Logical flag to indicate if N2_salt should be computed.

  • % do_bflx_temp_dz :: logical, private Logical flag to indicate if N2_temp should be computed.

[source]

Function/Subroutine Documentation

subroutine mom_diagnose_kdwork/kdwork_diagnostics(G, GV, US, diag, VBF, 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 output

  • vbf :: [inout] Vertical buoyancy flux structure

  • n2_salt :: [in] Buoyancy frequency [T-2 ~> s-2]

  • n2_temp :: [in] Buoyancy frequency [T-2 ~> s-2]

  • dz :: dz [in] Grid spacing [Z ~> m]

Call to:

diagnosekdwork mom_spatial_means::global_area_integral

[source]

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:

kdwork_diagnostics

[source]

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_ale mom_diabatic_driver::diabatic_ale_legacy

[source]

subroutine mom_diagnose_kdwork/deallocate_vbf_cs(VBF)

Deallocate any arrays that were allocated.

Parameters:

vbf :: [inout] Vertical buoyancy flux structure

Called from:

mom_diabatic_driver::diabatic_ale mom_diabatic_driver::diabatic_ale_legacy

[source]

subroutine mom_diagnose_kdwork/kdwork_init(Time, G, GV, US, 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

  • diag :: diag [inout] regulates diagnostic output

  • vbf :: [inout] Vertical buoyancy flux structure

  • use_kdwork_diag :: [out] Flag if any output was turned on

Call to:

mom_diag_mediator::register_scalar_field

[source]

subroutine mom_diagnose_kdwork/kdwork_end(VBF)

Deallocates control structrue.

Parameters:

vbf :: [inout] Vertical buoyancy flux structure

[source]

[source]