namespace mom_diagnostics¶
Overview¶
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory. More…
namespace mom_diagnostics { // global functions subroutine, public calculate_diagnostic_fields( u u, v v, h h, uh uh, vh vh, tv tv, ADp ADp, CDp CDp, p_surf p_surf, dt dt, diag_pre_sync diag_pre_sync, G G, GV GV, US US, CS CS, eta_bt eta_bt ); subroutine, public register_time_deriv(lb lb, f_ptr f_ptr, deriv_ptr deriv_ptr, CS CS); subroutine, public post_surface_dyn_diags(IDs IDs, G G, diag diag, sfc_state sfc_state, ssh ssh); subroutine, public post_surface_thermo_diags( IDs IDs, G G, GV GV, US US, diag diag, dt_int dt_int, sfc_state sfc_state, tv tv, ssh ssh, ssh_ibc ssh_ibc ); subroutine, public post_transport_diagnostics( G G, GV GV, US US, uhtr uhtr, vhtr vhtr, h h, IDs IDs, diag_pre_dyn diag_pre_dyn, diag diag, dt_trans dt_trans, Reg Reg ); subroutine, public mom_diagnostics_init( MIS MIS, ADp ADp, CDp CDp, Time Time, G G, GV GV, US US, param_file param_file, diag diag, CS CS, tv tv ); subroutine, public register_surface_diags(Time Time, G G, IDs IDs, diag diag, tv tv); subroutine, public register_transport_diags(Time Time, G G, GV GV, US US, IDs IDs, diag diag); subroutine, public write_static_fields(G G, GV GV, US US, tv tv, diag diag); subroutine, public mom_diagnostics_end(CS CS, ADp ADp); } // namespace mom_diagnostics
Detailed Documentation¶
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.
Global Functions¶
subroutine, public calculate_diagnostic_fields( u u, v v, h h, uh uh, vh vh, tv tv, ADp ADp, CDp CDp, p_surf p_surf, dt dt, diag_pre_sync diag_pre_sync, G G, GV GV, US US, CS CS, eta_bt eta_bt )
Diagnostics not more naturally calculated elsewhere are computed here.
Parameters:
g |
The ocean’s grid structure. |
gv |
The ocean’s vertical grid structure. |
us |
A dimensional unit scaling type |
u |
The zonal velocity [L T-1 ~> m s-1]. |
v |
The meridional velocity [L T-1 ~> m s-1]. |
h |
Layer thicknesses [H ~> m or kg m-2]. |
uh |
Transport through zonal faces = u*h*dy, |
vh |
Transport through meridional faces = v*h*dx, |
tv |
A structure pointing to various thermodynamic variables. |
adp |
structure with pointers to accelerations in momentum equation. |
cdp |
structure with pointers to terms in continuity equation. |
p_surf |
A pointer to the surface pressure [Pa]. If p_surf is not associated, it is the same as setting the surface pressure to 0. |
dt |
The time difference since the last call to this subroutine [s]. |
diag_pre_sync |
Target grids from previous timestep |
cs |
Control structure returned by a previous call to diagnostics_init. |
eta_bt |
An optional barotropic |
subroutine, public register_time_deriv( lb lb, f_ptr f_ptr, deriv_ptr deriv_ptr, CS CS )
This subroutine registers fields to calculate a diagnostic time derivative.
Parameters:
lb |
Lower index bound of f_ptr |
f_ptr |
Time derivative operand |
deriv_ptr |
Time derivative of f_ptr |
cs |
Control structure returned by previous call to diagnostics_init. |
subroutine, public post_surface_dyn_diags( IDs IDs, G G, diag diag, sfc_state sfc_state, ssh 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 |
A structure with the diagnostic IDs. |
g |
ocean grid structure |
diag |
regulates diagnostic output |
sfc_state |
structure describing the ocean surface state |
ssh |
Time mean surface height without corrections for ice displacement [m] |
subroutine, public post_surface_thermo_diags( IDs IDs, G G, GV GV, US US, diag diag, dt_int dt_int, sfc_state sfc_state, tv tv, ssh ssh, ssh_ibc 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 |
A structure with the diagnostic IDs. |
g |
ocean grid structure |
gv |
ocean vertical grid structure |
us |
A dimensional unit scaling type |
diag |
regulates diagnostic output |
dt_int |
total time step associated with these diagnostics [s]. |
sfc_state |
structure describing the ocean surface state |
tv |
A structure pointing to various thermodynamic variables |
ssh |
Time mean surface height without corrections for ice displacement [m] |
ssh_ibc |
Time mean surface height with corrections for ice displacement and the inverse barometer [m] |
subroutine, public post_transport_diagnostics( G G, GV GV, US US, uhtr uhtr, vhtr vhtr, h h, IDs IDs, diag_pre_dyn diag_pre_dyn, diag diag, dt_trans dt_trans, Reg Reg )
This routine posts diagnostics of the transports, including the subgridscale contributions.
Parameters:
g |
ocean grid structure |
gv |
ocean vertical grid structure |
us |
A dimensional unit scaling type |
uhtr |
Accumulated zonal thickness fluxes used to advect tracers [H L2 ~> m3 or kg] |
vhtr |
Accumulated meridional thickness fluxes used to advect tracers [H L2 ~> m3 or kg] |
h |
The updated layer thicknesses [H ~> m or kg m-2] |
ids |
A structure with the diagnostic IDs. |
diag_pre_dyn |
Stored grids from before dynamics |
diag |
regulates diagnostic output |
dt_trans |
total time step associated with the transports [s]. |
reg |
Pointer to the tracer registry |
subroutine, public mom_diagnostics_init( MIS MIS, ADp ADp, CDp CDp, Time Time, G G, GV GV, US US, param_file param_file, diag diag, CS CS, tv tv )
This subroutine registers various diagnostics and allocates space for fields that other diagnostis depend upon.
Parameters:
mis |
For “MOM Internal State” a set of pointers to the fields and accelerations that make up the ocean’s internal physical state. |
adp |
Structure with pointers to momentum equation terms. |
cdp |
Structure with pointers to continuity equation terms. |
time |
Current model time. |
g |
The ocean’s grid structure. |
gv |
The ocean’s vertical grid structure. |
us |
A dimensional unit scaling type |
param_file |
A structure to parse for run-time parameters. |
diag |
Structure to regulate diagnostic output. |
cs |
Pointer set to point to control structure for this module. |
tv |
A structure pointing to various thermodynamic variables. |
subroutine, public register_surface_diags( Time Time, G G, IDs IDs, diag diag, tv tv )
Register diagnostics of the surface state and integrated quantities.
Parameters:
time |
current model time |
g |
ocean grid structure |
ids |
A structure with the diagnostic IDs. |
diag |
regulates diagnostic output |
tv |
A structure pointing to various thermodynamic variables |
subroutine, public register_transport_diags( Time Time, G G, GV GV, US US, IDs IDs, diag diag )
Register certain diagnostics related to transports.
Parameters:
time |
current model time |
g |
ocean grid structure |
gv |
ocean vertical grid structure |
us |
A dimensional unit scaling type |
ids |
A structure with the diagnostic IDs. |
diag |
regulates diagnostic output |
subroutine, public write_static_fields(G G, GV GV, US US, tv tv, diag diag)
Offers the static fields in the ocean grid type for output via the diag_manager.
Parameters:
g |
ocean grid structure |
gv |
ocean vertical grid structure |
us |
A dimensional unit scaling type |
tv |
A structure pointing to various thermodynamic variables |
diag |
regulates diagnostic output |
subroutine, public mom_diagnostics_end(CS CS, ADp ADp)
Deallocate memory associated with the diagnostics module.
Parameters:
cs |
Control structure returned by a previous call to diagnostics_init. |
adp |
structure with pointers to accelerations in momentum equation. |