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. |
Detailed Description
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.
Type Documentation
- type mom_diagnostics/diagnostics_cs
The control structure for the MOM_diagnostics module.
- Type fields:
% id_u ::
integerDiagnostic IDs.% id_v ::
integerDiagnostic IDs.% id_h ::
integerDiagnostic IDs.% id_usq ::
integerDiagnostic IDs.% id_vsq ::
integerDiagnostic IDs.% id_uv ::
integerDiagnostic IDs.% id_e ::
integerDiagnostic IDs.% id_e_d ::
integerDiagnostic IDs.% id_du_dt ::
integerDiagnostic IDs.% id_dv_dt ::
integerDiagnostic IDs.% id_h_du_dt ::
integerDiagnostic IDs.% id_h_dv_dt ::
integerDiagnostic IDs.% id_hf_du_dt_2d ::
integerDiagnostic IDs.% id_hf_dv_dt_2d ::
integerDiagnostic IDs.% id_col_ht ::
integerDiagnostic IDs.% id_dh_dt ::
integerDiagnostic IDs.% id_ke ::
integerDiagnostic IDs.% id_dkedt ::
integerDiagnostic IDs.% id_pe_to_ke ::
integerDiagnostic IDs.% id_ke_bt ::
integerDiagnostic IDs.% id_ke_sal ::
integerDiagnostic IDs.% id_ke_tides ::
integerDiagnostic IDs.% id_ke_bt_pf ::
integerDiagnostic IDs.% id_ke_bt_cf ::
integerDiagnostic IDs.% id_ke_bt_wd ::
integerDiagnostic IDs.% id_pe_to_ke_btbc ::
integerDiagnostic IDs.% id_ke_coradv_btbc ::
integerDiagnostic IDs.% id_ke_coradv ::
integerDiagnostic IDs.% id_ke_adv ::
integerDiagnostic IDs.% id_ke_visc ::
integerDiagnostic IDs.% id_ke_stress ::
integerDiagnostic IDs.% id_ke_visc_gl90 ::
integerDiagnostic IDs.% id_ke_horvisc ::
integerDiagnostic IDs.% id_ke_dia ::
integerDiagnostic IDs.% id_uh_rlay ::
integerDiagnostic IDs.% id_vh_rlay ::
integerDiagnostic IDs.% id_uhgm_rlay ::
integerDiagnostic IDs.% id_vhgm_rlay ::
integerDiagnostic IDs.% id_h_rlay ::
integerDiagnostic IDs.% id_rd1 ::
integerDiagnostic IDs.% id_rml ::
integerDiagnostic IDs.% id_rcv ::
integerDiagnostic IDs.% id_cg1 ::
integerDiagnostic IDs.% id_cfl_cg1 ::
integerDiagnostic IDs.% id_cfl_cg1_x ::
integerDiagnostic IDs.% id_cfl_cg1_y ::
integerDiagnostic IDs.% id_cg_ebt ::
integerDiagnostic IDs.% id_rd_ebt ::
integerDiagnostic IDs.% id_p_ebt ::
integerDiagnostic IDs.% id_temp_int ::
integerDiagnostic IDs.% id_salt_int ::
integerDiagnostic IDs.% id_absscint ::
integerDiagnostic IDs.% id_pfscint ::
integerDiagnostic IDs.% id_scint ::
integerDiagnostic IDs.% id_chcint ::
integerDiagnostic IDs.% id_phcint ::
integerDiagnostic IDs.% id_mass_wt ::
integerDiagnostic IDs.% id_col_mass ::
integerDiagnostic IDs.% id_masscello ::
integerDiagnostic IDs.% id_masso ::
integerDiagnostic IDs.% id_volcello ::
integerDiagnostic IDs.% id_tpot ::
integerDiagnostic IDs.% id_sprac ::
integerDiagnostic IDs.% id_tob ::
integerDiagnostic IDs.% id_sob ::
integerDiagnostic IDs.% id_thetaoga ::
integerDiagnostic IDs.% id_soga ::
integerDiagnostic IDs.% id_bigthetaoga ::
integerDiagnostic IDs.% id_abssoga ::
integerDiagnostic IDs.% id_sosga ::
integerDiagnostic IDs.% id_tosga ::
integerDiagnostic IDs.% id_abssosga ::
integerDiagnostic IDs.% id_bigtosga ::
integerDiagnostic IDs.% id_temp_layer_ave ::
integerDiagnostic IDs.% id_salt_layer_ave ::
integerDiagnostic IDs.% id_bigtemp_layer_ave ::
integerDiagnostic IDs.% id_abssalt_layer_ave ::
integerDiagnostic IDs.% id_pbo ::
integerDiagnostic IDs.% id_thkcello ::
integerDiagnostic IDs.% id_rhoinsitu ::
integerDiagnostic IDs.% id_rhopot0 ::
integerDiagnostic IDs.% id_rhopot2 ::
integerDiagnostic IDs.% id_drho_dt ::
integerDiagnostic IDs.% id_drho_ds ::
integerDiagnostic IDs.% id_h_pre_sync ::
integerDiagnostic IDs.% id_tosq ::
integerDiagnostic IDs.% id_sosq ::
integerDiagnostic IDs.% id_t20d ::
integerDiagnostic IDs.% id_t17d ::
integerDiagnostic IDs.% initialized ::
logicalTrue if this control structure has been initialized.% mono_n2_column_fraction ::
realThe 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 ::
realThe 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 ::
logicalIf 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 ::
type(diag_ctrl), pointerA structure that is used to regulate the timing of diagnostic output.% du_dt ::
real, dimension(:,:,:), allocatablenet i-acceleration [L T-2 ~> m s-2]% dv_dt ::
real, dimension(:,:,:), allocatablenet j-acceleration [L T-2 ~> m s-2]% dh_dt ::
real, dimension(:,:,:), allocatablethickness rate of change [H T-1 ~> m s-1 or kg m-2 s-1]% ke_term_on ::
logicalIf true, at least one diagnostic term in the KE budget is in use.% wave_speed ::
type(wave_speed_cs)Wave speed control struct.% var_ptr ::
type(p3d), dimension(50)pointers to variables used in the calculation of time derivatives% deriv ::
type(p3d), dimension(50)Time derivatives of various fields.% prev_val ::
type(p3d), dimension(50)Previous values of variables used in the calculation of time derivatives previous values of variables used in calculation of time derivatives.% nlay ::
integer, dimension(50)The number of layers in each diagnostics.% num_time_deriv ::
integerThe number of time derivative diagnostics.% pass_ke_uv ::
type(group_pass_type)A handle used for group halo passes.
- type mom_diagnostics/surface_diag_ids
A structure with diagnostic IDs of the surface and integrated variables.
- Type fields:
% id_zos ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_zossq ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_volo ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_speed ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssh ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssh_ga ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sst ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sst_sq ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sstcon ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sss ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sss_sq ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_sssabs ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssu ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssv ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssu_east ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_ssv_north ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_fraz ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_salt_deficit ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_heat_pme ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.% id_intern_heat ::
integerDiagnostic IDs for 2-d surface and bottom flux and state fields.
- type mom_diagnostics/transport_diag_ids
A structure with diagnostic IDs of mass transport related diagnostics.
- Type fields:
% id_uhtr ::
integerDiagnostics for tracer horizontal transport.% id_umo ::
integerDiagnostics for tracer horizontal transport.% id_umo_2d ::
integerDiagnostics for tracer horizontal transport.% id_vhtr ::
integerDiagnostics for tracer horizontal transport.% id_vmo ::
integerDiagnostics for tracer horizontal transport.% id_vmo_2d ::
integerDiagnostics for tracer horizontal transport.% id_dynamics_h ::
integerDiagnostics for tracer horizontal transport.% id_dynamics_h_tendency ::
integerDiagnostics for tracer horizontal transport.
Function/Subroutine Documentation
- subroutine mom_diagnostics/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 ::
u[in] The zonal velocity [L T-1 ~> m s-1].v ::
v[in] The meridional velocity [L T-1 ~> m s-1].h ::
h[in] Layer thicknesses [H ~> m or kg m-2].uh ::
uh[in] Transport through zonal faces = u*h*dy,vh ::
vh[in] Transport through meridional faces = v*h*dx,tv ::
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 ::
p_surfA 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 ::
dt[in] The time difference since the last call to this subroutine [T ~> s].diag_pre_sync ::
diag_pre_sync[in] Target grids from previous timestepcs :: [inout] Control structure returned by a previous call to diagnostics_init.
- Call to:
mom_eos::abs_saln_to_prac_salncalculate_derivscalculate_energy_diagnosticscalculate_vertical_integralsmom_diag_mediator::diag_copy_storage_to_diagmom_diag_mediator::diag_restore_gridsmom_diag_mediator::diag_save_gridsmom_interface_heights::find_dz_for_etafind_weightsmom_spatial_means::global_volume_meanmom_error_handler::mom_errormom_wave_speed::wave_speed
- subroutine mom_diagnostics/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 ::
k[inout] The value of k such that Rlist(k) <= R_in < Rlist(k+1) The input value is a first guessnz ::
nz[in] The number of layers in Rlistwt ::
wt[out] The weight of layer k for interpolation [nondim]wt_p ::
wt_p[out] The weight of layer k+1 for interpolation [nondim]
- Called from:
- subroutine mom_diagnostics/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 ::
h[in] Layer thicknesses [H ~> m or kg m-2].tv ::
tv[in] A structure pointing to various thermodynamic variables.p_surf ::
p_surfA 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.
- Call to:
mom_eos::abs_saln_to_prac_salnmom_interface_heights::find_col_massmom_eos::prac_saln_to_abs_saln- Called from:
- subroutine mom_diagnostics/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 ::
u[in] The zonal velocity [L T-1 ~> m s-1].v ::
v[in] The meridional velocity [L T-1 ~> m s-1].h ::
h[in] Layer thicknesses [H ~> m or kg m-2].uh ::
uh[in] Transport through zonal faces=u*h*dy,vh ::
vh[in] Transport through merid faces=v*h*dx,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.
- Called from:
- subroutine mom_diagnostics/register_time_deriv(lb, f_ptr, deriv_ptr, CS)
This subroutine registers fields to calculate a diagnostic time derivative.
- Parameters:
lb ::
lb[in] Lower index bound of f_ptrf_ptr ::
f_ptrTime derivative operand, in arbitrary units [A ~> a]deriv_ptr ::
deriv_ptrTime 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.
- Call to:
- Called from:
- subroutine mom_diagnostics/calculate_derivs(dt, G, CS)
This subroutine calculates all registered time derivatives.
- Parameters:
dt ::
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.
- Called from:
- subroutine mom_diagnostics/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 ::
diag[in] regulates diagnostic outputsfc_state ::
sfc_state[in] structure describing the ocean surface statessh ::
ssh[in] Time mean surface height without corrections
- subroutine mom_diagnostics/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 ::
diag[in] regulates diagnostic outputdt_int ::
dt_int[in] total time step associated with these diagnostics [T ~> s].sfc_state ::
sfc_state[in] structure describing the ocean surface statetv ::
tv[in] A structure pointing to various thermodynamic variablesssh ::
ssh[in] Time mean surface height without corrections for ice displacement [Z ~> m]ssh_ibc ::
ssh_ibc[in] Time mean surface height with corrections for ice displacement and the inverse barometer [Z ~> m]
- Call to:
mom_eos::abs_saln_to_prac_salnmom_coupler_types::coupler_type_send_datamom_spatial_means::global_area_integral
- subroutine mom_diagnostics/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 ::
uhtr[in] Accumulated zonal thickness fluxes used to advect tracers [H L2 ~> m3 or kg]vhtr ::
vhtr[in] Accumulated meridional thickness fluxes used to advect tracers [H L2 ~> m3 or kg]h ::
h[in] The updated layer thicknesses [H ~> m or kg m-2]ids :: [in] A structure with the diagnostic IDs.
diag_pre_dyn ::
diag_pre_dyn[inout] Stored grids from before dynamicsdiag ::
diag[inout] regulates diagnostic outputdt_trans ::
dt_trans[in] total time step associated with the transports [T ~> s].reg :: Pointer to the tracer registry
- Call to:
mom_diag_mediator::diag_copy_storage_to_diagmom_diag_mediator::diag_restore_gridsmom_diag_mediator::diag_save_gridsmom_tracer_registry::post_tracer_transport_diagnostics
- subroutine mom_diagnostics/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 ::
param_file[in] A structure to parse for run-time parameters.diag ::
diag[inout] Structure to regulate diagnostic output.cs :: [inout] Diagnostic control struct
tv ::
tv[in] A structure pointing to various thermodynamic variables.
- Call to:
mom_verticalgrid::get_flux_unitsmom_verticalgrid::get_thickness_unitsset_dependent_diagnosticsmom_wave_speed::wave_speed_init
- subroutine mom_diagnostics/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 ::
diag[inout] regulates diagnostic outputtv ::
tv[in] A structure pointing to various thermodynamic variables
- subroutine mom_diagnostics/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 ::
diag[inout] regulates diagnostic output
- Call to:
- subroutine mom_diagnostics/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 ::
tv[in] A structure pointing to various thermodynamic variablesdiag ::
diag[inout] regulates diagnostic output
- subroutine mom_diagnostics/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.
- Call to:
- Called from:
- subroutine mom_diagnostics/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.
- Called from: