MOM_diagnostics module reference
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.
Data Types
The control structure for the MOM_diagnostics module |
|
A structure with diagnostic IDs of the surface and integrated variables |
|
A structure with diagnostic IDs of mass transport related diagnostics |
Functions/Subroutines
Diagnostics not more naturally calculated elsewhere are computed here. |
|
This subroutine finds the location of R_in in an increasing ordered list, Rlist, returning as k the element such that Rlist(k) <= R_in < Rlist(k+1), and where wt and wt_p are the linear weights that should be assigned to elements k and k+1. |
|
This subroutine calculates vertical integrals of several tracers, along with the mass-weight of these tracers, the total column mass, and the carefully calculated column height. |
|
This subroutine calculates terms in the mechanical energy budget. |
|
This subroutine registers fields to calculate a diagnostic time derivative. |
|
This subroutine calculates all registered time derivatives. |
|
This routine posts diagnostics of various dynamic ocean surface quantities, including velocities, speed and sea surface height, at the time the ocean state is reported back to the caller |
|
This routine posts diagnostics of various ocean surface and integrated quantities at the time the ocean state is reported back to the caller |
|
This routine posts diagnostics of the transports, including the subgridscale contributions. |
|
This subroutine registers various diagnostics and allocates space for fields that other diagnostics depend upon. |
|
Register diagnostics of the surface state and integrated quantities |
|
Register certain diagnostics related to transports |
|
Offers the static fields in the ocean grid type for output via the diag_manager. |
|
This subroutine sets up diagnostics upon which other diagnostics depend. |
|
Deallocate memory associated with the diagnostics module |
Type Documentation
- type, public :: diagnostics_CS
The control structure for the MOM_diagnostics module
- Parameters
initialized
True if this control structure has been initialized.
mono_N2_column_fraction
The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed [nondim].
mono_N2_depth
The depth below which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed [H ~> m or kg m-2].
accurate_thick_cello
If true, use the same careful integrals to find the diagnosed non-Boussinesq layer thicknesses as are used to find the free surface height, instead of using an approximate thickness based on division by the mid-layer density.
diag
A structure that is used to regulate the timing of diagnostic output.
du_dt
net i-acceleration [L T-2 ~> m s-2]
dv_dt
net j-acceleration [L T-2 ~> m s-2]
dh_dt
thickness rate of change [H T-1 ~> m s-1 or kg m-2 s-1]
id_u
Diagnostic IDs
id_v
Diagnostic IDs
id_h
Diagnostic IDs
id_usq
Diagnostic IDs
id_vsq
Diagnostic IDs
id_uv
Diagnostic IDs
id_e
Diagnostic IDs
id_e_D
Diagnostic IDs
id_du_dt
Diagnostic IDs
id_dv_dt
Diagnostic IDs
id_h_du_dt
Diagnostic IDs
id_h_dv_dt
Diagnostic IDs
id_hf_du_dt_2d
Diagnostic IDs
id_hf_dv_dt_2d
Diagnostic IDs
id_col_ht
Diagnostic IDs
id_dh_dt
Diagnostic IDs
id_KE
Diagnostic IDs
id_dKEdt
Diagnostic IDs
id_PE_to_KE
Diagnostic IDs
id_KE_BT
Diagnostic IDs
id_KE_SAL
Diagnostic IDs
id_KE_TIDES
Diagnostic IDs
id_KE_BT_PF
Diagnostic IDs
id_KE_BT_CF
Diagnostic IDs
id_KE_BT_WD
Diagnostic IDs
id_PE_to_KE_btbc
Diagnostic IDs
id_KE_Coradv_btbc
Diagnostic IDs
id_KE_Coradv
Diagnostic IDs
id_KE_adv
Diagnostic IDs
id_KE_visc
Diagnostic IDs
id_KE_stress
Diagnostic IDs
id_KE_visc_gl90
Diagnostic IDs
id_KE_horvisc
Diagnostic IDs
id_KE_dia
Diagnostic IDs
id_uh_Rlay
Diagnostic IDs
id_vh_Rlay
Diagnostic IDs
id_uhGM_Rlay
Diagnostic IDs
id_vhGM_Rlay
Diagnostic IDs
id_h_Rlay
Diagnostic IDs
id_Rd1
Diagnostic IDs
id_Rml
Diagnostic IDs
id_Rcv
Diagnostic IDs
id_cg1
Diagnostic IDs
id_cfl_cg1
Diagnostic IDs
id_cfl_cg1_x
Diagnostic IDs
id_cfl_cg1_y
Diagnostic IDs
id_cg_ebt
Diagnostic IDs
id_Rd_ebt
Diagnostic IDs
id_p_ebt
Diagnostic IDs
id_temp_int
Diagnostic IDs
id_salt_int
Diagnostic IDs
id_absscint
Diagnostic IDs
id_pfscint
Diagnostic IDs
id_scint
Diagnostic IDs
id_chcint
Diagnostic IDs
id_phcint
Diagnostic IDs
id_mass_wt
Diagnostic IDs
id_col_mass
Diagnostic IDs
id_masscello
Diagnostic IDs
id_masso
Diagnostic IDs
id_volcello
Diagnostic IDs
id_Tpot
Diagnostic IDs
id_Sprac
Diagnostic IDs
id_tob
Diagnostic IDs
id_sob
Diagnostic IDs
id_thetaoga
Diagnostic IDs
id_soga
Diagnostic IDs
id_bigthetaoga
Diagnostic IDs
id_abssoga
Diagnostic IDs
id_sosga
Diagnostic IDs
id_tosga
Diagnostic IDs
id_abssosga
Diagnostic IDs
id_bigtosga
Diagnostic IDs
id_temp_layer_ave
Diagnostic IDs
id_salt_layer_ave
Diagnostic IDs
id_bigtemp_layer_ave
Diagnostic IDs
id_abssalt_layer_ave
Diagnostic IDs
id_pbo
Diagnostic IDs
id_thkcello
Diagnostic IDs
id_rhoinsitu
Diagnostic IDs
id_rhopot0
Diagnostic IDs
id_rhopot2
Diagnostic IDs
id_drho_dT
Diagnostic IDs
id_drho_dS
Diagnostic IDs
id_h_pre_sync
Diagnostic IDs
id_tosq
Diagnostic IDs
id_sosq
Diagnostic IDs
id_t20d
Diagnostic IDs
id_t17d
Diagnostic IDs
wave_speed
Wave speed control struct
var_ptr
pointers to variables used in the calculation of time derivatives
deriv
Time derivatives of various fields
prev_val
Previous values of variables used in the calculation of time derivatives previous values of variables used in calculation of time derivatives
nlay
The number of layers in each diagnostics
num_time_deriv
The number of time derivative diagnostics
pass_KE_uv
A handle used for group halo passes
- type, public :: surface_diag_IDs
A structure with diagnostic IDs of the surface and integrated variables
- Parameters
id_zos
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_zossq
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_volo
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_speed
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssh
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssh_ga
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sst
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sst_sq
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sstcon
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sss
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sss_sq
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_sssabs
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssu
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssv
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssu_east
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_ssv_north
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_fraz
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_salt_deficit
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_Heat_PmE
Diagnostic IDs for 2-d surface and bottom flux and state fields
id_intern_heat
Diagnostic IDs for 2-d surface and bottom flux and state fields
- type, public :: transport_diag_IDs
A structure with diagnostic IDs of mass transport related diagnostics
- Parameters
id_uhtr
Diagnostics for tracer horizontal transport
id_umo
Diagnostics for tracer horizontal transport
id_umo_2d
Diagnostics for tracer horizontal transport
id_vhtr
Diagnostics for tracer horizontal transport
id_vmo
Diagnostics for tracer horizontal transport
id_vmo_2d
Diagnostics for tracer horizontal transport
id_dynamics_h
Diagnostics for tracer horizontal transport
id_dynamics_h_tendency
Diagnostics for tracer horizontal transport
Functions/Subroutine Documentation
- subroutine calculate_diagnostic_fields(u, v, h, uh, vh, tv, ADp, CDp, p_surf, dt, diag_pre_sync, G, GV, US, CS)
Diagnostics not more naturally calculated elsewhere are computed here.
- Parameters
G [inout]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
u [in]
The zonal velocity [L T-1 ~> m s-1].
v [in]
The meridional velocity [L T-1 ~> m s-1].
h [in]
Layer thicknesses [H ~> m or kg m-2].
uh [in]
Transport through zonal faces = u*h*dy, [H L2 T-1 ~> m3 s-1 or kg s-1].
vh [in]
Transport through meridional faces = v*h*dx, [H L2 T-1 ~> m3 s-1 or kg s-1].
tv [in]
A structure pointing to various thermodynamic variables.
ADp [in]
structure with pointers to accelerations in momentum equation.
CDp [in]
structure with pointers to terms in continuity equation.
p_surf
A pointer to the surface pressure [R L2 T-2 ~> Pa]. If p_surf is not associated, it is the same as setting the surface pressure to 0.
dt [in]
The time difference since the last call to this subroutine [T ~> s].
diag_pre_sync [in]
Target grids from previous timestep
CS [inout]
Control structure returned by a previous call to diagnostics_init.
Callees call graph
Text view
mom_diagnostics::calculate_diagnostic_fields → mom_coms::interface::reproducing_sum
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::diag_copy_storage_to_diag
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::diag_restore_grids
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::diag_save_grids
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::interface::post_data
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::post_product_sum_u
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::post_product_sum_v
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::post_product_u
mom_diagnostics::calculate_diagnostic_fields → mom_diag_mediator::post_product_v
mom_diagnostics::calculate_diagnostic_fields → mom_diagnostics::calculate_derivs
mom_diagnostics::calculate_diagnostic_fields → mom_diagnostics::calculate_energy_diagnostics
mom_diagnostics::calculate_diagnostic_fields → mom_diagnostics::calculate_vertical_integrals
mom_diagnostics::calculate_diagnostic_fields → mom_diagnostics::find_weights
mom_diagnostics::calculate_diagnostic_fields → mom_eos::abs_saln_to_prac_saln
mom_diagnostics::calculate_diagnostic_fields → mom_eos::cons_temp_to_pot_temp
mom_diagnostics::calculate_diagnostic_fields → mom_eos::eos_domain
mom_diagnostics::calculate_diagnostic_fields → mom_eos::interface::calculate_density
mom_diagnostics::calculate_diagnostic_fields → mom_eos::interface::calculate_density_derivs
mom_diagnostics::calculate_diagnostic_fields → mom_error_handler::mom_error
mom_diagnostics::calculate_diagnostic_fields → mom_interface_heights::find_dz_for_eta
mom_diagnostics::calculate_diagnostic_fields → mom_spatial_means::global_area_mean
mom_diagnostics::calculate_diagnostic_fields → mom_spatial_means::global_layer_mean
mom_diagnostics::calculate_diagnostic_fields → mom_spatial_means::global_volume_mean
mom_diagnostics::calculate_diagnostic_fields → mom_wave_speed::wave_speed
- subroutine find_weights(Rlist, R_in, k, nz, wt, wt_p)
This subroutine finds the location of R_in in an increasing ordered list, Rlist, returning as k the element such that Rlist(k) <= R_in < Rlist(k+1), and where wt and wt_p are the linear weights that should be assigned to elements k and k+1.
- Parameters
Rlist [in]
The list of target densities [R ~> kg m-3]
R_in [in]
The density being inserted into Rlist [R ~> kg m-3]
k [inout]
The value of k such that Rlist(k) <= R_in < Rlist(k+1) The input value is a first guess
nz [in]
The number of layers in Rlist
wt [out]
The weight of layer k for interpolation [nondim]
wt_p [out]
The weight of layer k+1 for interpolation [nondim]
Callers call graph
- subroutine calculate_vertical_integrals(h, tv, p_surf, G, GV, US, CS)
This subroutine calculates vertical integrals of several tracers, along with the mass-weight of these tracers, the total column mass, and the carefully calculated column height.
- Parameters
G [inout]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
h [in]
Layer thicknesses [H ~> m or kg m-2].
tv [in]
A structure pointing to various thermodynamic variables.
p_surf
A pointer to the surface pressure [R L2 T-2 ~> Pa]. If p_surf is not associated, it is the same as setting the surface pressure to 0.
CS [inout]
Control structure returned by a previous call to diagnostics_init.
Callees call graph
Text view
mom_diagnostics::calculate_vertical_integrals → mom_diag_mediator::interface::post_data
mom_diagnostics::calculate_vertical_integrals → mom_eos::abs_saln_to_prac_saln
mom_diagnostics::calculate_vertical_integrals → mom_eos::cons_temp_to_pot_temp
mom_diagnostics::calculate_vertical_integrals → mom_eos::eos_domain
mom_diagnostics::calculate_vertical_integrals → mom_eos::pot_temp_to_cons_temp
mom_diagnostics::calculate_vertical_integrals → mom_eos::prac_saln_to_abs_saln
mom_diagnostics::calculate_vertical_integrals → mom_interface_heights::find_col_mass
mom_diagnostics::calculate_vertical_integrals → mom_interface_heights::interface::find_eta
Callers call graph
- subroutine calculate_energy_diagnostics(u, v, h, uh, vh, ADp, CDp, G, GV, US, CS)
This subroutine calculates terms in the mechanical energy budget.
- Parameters
G [inout]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
u [in]
The zonal velocity [L T-1 ~> m s-1].
v [in]
The meridional velocity [L T-1 ~> m s-1].
h [in]
Layer thicknesses [H ~> m or kg m-2].
uh [in]
Transport through zonal faces=u*h*dy, [H L2 T-1 ~> m3 s-1 or kg s-1].
vh [in]
Transport through merid faces=v*h*dx, [H L2 T-1 ~> m3 s-1 or kg s-1].
ADp [in]
Structure pointing to accelerations in momentum equation.
CDp [in]
Structure pointing to terms in continuity equations.
US [in]
A dimensional unit scaling type
CS [inout]
Control structure returned by a previous call to diagnostics_init.
Callees call graph
Callers call graph
- subroutine register_time_deriv(lb, f_ptr, deriv_ptr, CS)
This subroutine registers fields to calculate a diagnostic time derivative.
- Parameters
lb [in]
Lower index bound of f_ptr
f_ptr
Time derivative operand, in arbitrary units [A ~> a]
deriv_ptr
Time derivative of f_ptr, in units derived from the arbitrary units of f_ptr [A T-1 ~> a s-1]
CS [inout]
Control structure returned by previous call to diagnostics_init.
m
New index of deriv_ptr in CS%deriv
ub
Upper index bound of f_ptr, based on shape.
Callers call graph
- subroutine calculate_derivs(dt, G, CS)
This subroutine calculates all registered time derivatives.
- Parameters
dt [in]
The time interval over which differences occur [T ~> s].
G [inout]
The ocean's grid structure.
CS [inout]
Control structure returned by previous call to diagnostics_init.
Callers call graph
- subroutine post_surface_dyn_diags(IDs, G, diag, sfc_state, ssh)
This routine posts diagnostics of various dynamic ocean surface quantities, including velocities, speed and sea surface height, at the time the ocean state is reported back to the caller
- Parameters
IDs [in]
A structure with the diagnostic IDs.
G [in]
ocean grid structure
diag [in]
regulates diagnostic output
sfc_state [in]
structure describing the ocean surface state
ssh [in]
Time mean surface height without corrections for ice displacement [Z ~> m]
Callees call graph
- subroutine post_surface_thermo_diags(IDs, G, GV, US, diag, dt_int, sfc_state, tv, ssh, ssh_ibc)
This routine posts diagnostics of various ocean surface and integrated quantities at the time the ocean state is reported back to the caller
- Parameters
IDs [in]
A structure with the diagnostic IDs.
G [in]
ocean grid structure
GV [in]
ocean vertical grid structure
US [in]
A dimensional unit scaling type
diag [in]
regulates diagnostic output
dt_int [in]
total time step associated with these diagnostics [T ~> s].
sfc_state [in]
structure describing the ocean surface state
tv [in]
A structure pointing to various thermodynamic variables
ssh [in]
Time mean surface height without corrections for ice displacement [Z ~> m]
ssh_ibc [in]
Time mean surface height with corrections for ice displacement and the inverse barometer [Z ~> m]
Callees call graph
Text view
mom_diagnostics::post_surface_thermo_diags → mom_coupler_types::coupler_type_send_data
mom_diagnostics::post_surface_thermo_diags → mom_diag_mediator::get_diag_time_end
mom_diagnostics::post_surface_thermo_diags → mom_diag_mediator::interface::post_data
mom_diagnostics::post_surface_thermo_diags → mom_eos::abs_saln_to_prac_saln
mom_diagnostics::post_surface_thermo_diags → mom_eos::cons_temp_to_pot_temp
mom_diagnostics::post_surface_thermo_diags → mom_eos::eos_domain
mom_diagnostics::post_surface_thermo_diags → mom_spatial_means::global_area_integral
mom_diagnostics::post_surface_thermo_diags → mom_spatial_means::global_area_mean
- subroutine post_transport_diagnostics(G, GV, US, uhtr, vhtr, h, IDs, diag_pre_dyn, diag, dt_trans, Reg)
This routine posts diagnostics of the transports, including the subgridscale contributions.
- Parameters
G [inout]
ocean grid structure
GV [in]
ocean vertical grid structure
US [in]
A dimensional unit scaling type
uhtr [in]
Accumulated zonal thickness fluxes used to advect tracers [H L2 ~> m3 or kg]
vhtr [in]
Accumulated meridional thickness fluxes used to advect tracers [H L2 ~> m3 or kg]
h [in]
The updated layer thicknesses [H ~> m or kg m-2]
IDs [in]
A structure with the diagnostic IDs.
diag_pre_dyn [inout]
Stored grids from before dynamics
diag [inout]
regulates diagnostic output
dt_trans [in]
total time step associated with the transports [T ~> s].
Reg
Pointer to the tracer registry
Callees call graph
Text view
mom_diagnostics::post_transport_diagnostics → mom_diag_mediator::diag_copy_storage_to_diag
mom_diagnostics::post_transport_diagnostics → mom_diag_mediator::diag_restore_grids
mom_diagnostics::post_transport_diagnostics → mom_diag_mediator::diag_save_grids
mom_diagnostics::post_transport_diagnostics → mom_diag_mediator::interface::post_data
mom_diagnostics::post_transport_diagnostics → mom_tracer_registry::post_tracer_transport_diagnostics
- subroutine MOM_diagnostics_init(MIS, ADp, CDp, Time, G, GV, US, param_file, diag, CS, tv)
This subroutine registers various diagnostics and allocates space for fields that other diagnostics depend upon.
- Parameters
MIS [in]
For "MOM Internal State" a set of pointers to the fields and accelerations that make up the ocean's internal physical state.
ADp [inout]
Structure with pointers to momentum equation terms.
CDp [inout]
Structure with pointers to continuity equation terms.
Time [in]
Current model time.
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
param_file [in]
A structure to parse for run-time parameters.
diag [inout]
Structure to regulate diagnostic output.
CS [inout]
Diagnostic control struct
tv [in]
A structure pointing to various thermodynamic variables.
Callees call graph
Text view
mom_diagnostics::mom_diagnostics_init → mom_diag_mediator::diag_get_volume_cell_measure_dm_id
mom_diagnostics::mom_diagnostics_init → mom_diag_mediator::interface::register_scalar_field
mom_diagnostics::mom_diagnostics_init → mom_diag_mediator::register_diag_field
mom_diagnostics::mom_diagnostics_init → mom_diagnostics::set_dependent_diagnostics
mom_diagnostics::mom_diagnostics_init → mom_file_parser::interface::get_param
mom_diagnostics::mom_diagnostics_init → mom_file_parser::interface::log_version
mom_diagnostics::mom_diagnostics_init → mom_verticalgrid::get_flux_units
mom_diagnostics::mom_diagnostics_init → mom_verticalgrid::get_thickness_units
mom_diagnostics::mom_diagnostics_init → mom_wave_speed::wave_speed_init
- subroutine register_surface_diags(Time, G, US, IDs, diag, tv)
Register diagnostics of the surface state and integrated quantities
- Parameters
Time [in]
current model time
G [in]
ocean grid structure
US [in]
A dimensional unit scaling type
IDs [inout]
A structure with the diagnostic IDs.
diag [inout]
regulates diagnostic output
tv [in]
A structure pointing to various thermodynamic variables
Callees call graph
- subroutine register_transport_diags(Time, G, GV, US, IDs, diag)
Register certain diagnostics related to transports
- Parameters
Time [in]
current model time
G [in]
ocean grid structure
GV [in]
ocean vertical grid structure
US [in]
A dimensional unit scaling type
IDs [inout]
A structure with the diagnostic IDs.
diag [inout]
regulates diagnostic output
Callees call graph
- subroutine write_static_fields(G, GV, US, tv, diag)
Offers the static fields in the ocean grid type for output via the diag_manager.
- Parameters
G [in]
ocean grid structure
GV [in]
ocean vertical grid structure
US [in]
A dimensional unit scaling type
tv [in]
A structure pointing to various thermodynamic variables
diag [inout]
regulates diagnostic output
Callees call graph
- subroutine set_dependent_diagnostics(MIS, ADp, CDp, G, GV, CS)
This subroutine sets up diagnostics upon which other diagnostics depend.
- Parameters
MIS [in]
For "MOM Internal State" a set of pointers to the fields and accelerations making up ocean internal physical state.
ADp [inout]
Structure pointing to accelerations in momentum equation.
CDp [inout]
Structure pointing to terms in continuity equation.
G [in]
The ocean's grid structure.
GV [in]
ocean vertical grid structure
CS [inout]
Pointer to the control structure for this module.
Callees call graph
Callers call graph
- subroutine MOM_diagnostics_end(CS, ADp, CDp)
Deallocate memory associated with the diagnostics module
- Parameters
CS [inout]
Control structure returned by a previous call to diagnostics_init.
ADp [inout]
structure with pointers to accelerations in momentum equation.
CDp [inout]
Structure pointing to terms in continuity equation.