MOM6
|
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.
Data Types | |
type | diagnostics_cs |
The control structure for the MOM_diagnostics module. More... | |
type | surface_diag_ids |
A structure with diagnostic IDs of the surface and integrated variables. More... | |
type | transport_diag_ids |
A structure with diagnostic IDs of mass transport related diagnostics. More... | |
Functions/Subroutines | |
subroutine, public | calculate_diagnostic_fields (u, v, h, uh, vh, tv, ADp, CDp, p_surf, dt, diag_pre_sync, G, GV, US, CS, eta_bt) |
Diagnostics not more naturally calculated elsewhere are computed here. More... | |
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. More... | |
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. More... | |
subroutine | calculate_energy_diagnostics (u, v, h, uh, vh, ADp, CDp, G, GV, US, CS) |
This subroutine calculates terms in the mechanical energy budget. More... | |
subroutine, public | register_time_deriv (lb, f_ptr, deriv_ptr, CS) |
This subroutine registers fields to calculate a diagnostic time derivative. More... | |
subroutine | calculate_derivs (dt, G, CS) |
This subroutine calculates all registered time derivatives. More... | |
subroutine, public | 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. More... | |
subroutine, public | 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. More... | |
subroutine, public | 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. More... | |
subroutine, public | 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 diagnostis depend upon. More... | |
subroutine, public | register_surface_diags (Time, G, US, IDs, diag, tv) |
Register diagnostics of the surface state and integrated quantities. More... | |
subroutine, public | register_transport_diags (Time, G, GV, US, IDs, diag) |
Register certain diagnostics related to transports. More... | |
subroutine, public | write_static_fields (G, GV, US, tv, diag) |
Offers the static fields in the ocean grid type for output via the diag_manager. More... | |
subroutine | set_dependent_diagnostics (MIS, ADp, CDp, G, CS) |
This subroutine sets up diagnostics upon which other diagnostics depend. More... | |
subroutine, public | mom_diagnostics_end (CS, ADp) |
Deallocate memory associated with the diagnostics module. More... | |
|
private |
This subroutine calculates all registered time derivatives.
[in] | dt | The time interval over which differences occur [T ~> s]. |
[in,out] | g | The ocean's grid structure. |
[in,out] | cs | Control structure returned by previous call to diagnostics_init. |
Definition at line 1124 of file MOM_diagnostics.F90.
Referenced by calculate_diagnostic_fields().
subroutine, public mom_diagnostics::calculate_diagnostic_fields | ( | real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | u, |
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | v, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | h, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | uh, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | vh, | ||
type(thermo_var_ptrs), intent(in) | tv, | ||
type(accel_diag_ptrs), intent(in) | ADp, | ||
type(cont_diag_ptrs), intent(in) | CDp, | ||
real, dimension(:,:), pointer | p_surf, | ||
real, intent(in) | dt, | ||
type(diag_grid_storage), intent(in) | diag_pre_sync, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(diagnostics_cs), intent(inout) | CS, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in), optional | eta_bt | ||
) |
Diagnostics not more naturally calculated elsewhere are computed here.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | u | The zonal velocity [L T-1 ~> m s-1]. |
[in] | v | The meridional velocity [L T-1 ~> m s-1]. |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
[in] | uh | Transport through zonal faces = u*h*dy, |
[in] | vh | Transport through meridional faces = v*h*dx, |
[in] | tv | A structure pointing to various thermodynamic variables. |
[in] | adp | structure with pointers to accelerations in momentum equation. |
[in] | 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. | |
[in] | dt | The time difference since the last call to this subroutine [T ~> s]. |
[in] | diag_pre_sync | Target grids from previous timestep |
[in,out] | cs | Control structure returned by a previous call to diagnostics_init. |
[in] | eta_bt | An optional barotropic |
Definition at line 188 of file MOM_diagnostics.F90.
References calculate_derivs(), calculate_energy_diagnostics(), calculate_vertical_integrals(), mom_diag_mediator::diag_copy_storage_to_diag(), mom_diag_mediator::diag_restore_grids(), mom_diag_mediator::diag_save_grids(), find_weights(), mom_spatial_means::global_volume_mean(), mom_error_handler::mom_error(), and mom_wave_speed::wave_speed().
|
private |
This subroutine calculates terms in the mechanical energy budget.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | u | The zonal velocity [L T-1 ~> m s-1]. |
[in] | v | The meridional velocity [L T-1 ~> m s-1]. |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
[in] | uh | Transport through zonal faces=u*h*dy, |
[in] | vh | Transport through merid faces=v*h*dx, |
[in] | adp | Structure pointing to accelerations in momentum equation. |
[in] | cdp | Structure pointing to terms in continuity equations. |
[in] | us | A dimensional unit scaling type |
[in,out] | cs | Control structure returned by a previous call to diagnostics_init. |
Definition at line 880 of file MOM_diagnostics.F90.
Referenced by calculate_diagnostic_fields().
|
private |
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.
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | h | Layer thicknesses [H ~> m or kg m-2]. |
[in] | tv | A structure pointing to various thermodynamic variables. |
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. | |
[in,out] | cs | Control structure returned by a previous call to diagnostics_init. |
Definition at line 762 of file MOM_diagnostics.F90.
Referenced by calculate_diagnostic_fields().
|
private |
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.
[in] | rlist | The list of target densities [R ~> kg m-3] |
[in] | r_in | The density being inserted into Rlist [R ~> kg m-3] |
[in,out] | k | The value of k such that Rlist(k) <= R_in < Rlist(k+1) The input value is a first guess |
[in] | nz | The number of layers in Rlist |
[out] | wt | The weight of layer k for interpolation, nondim |
[out] | wt_p | The weight of layer k+1 for interpolation, nondim |
Definition at line 695 of file MOM_diagnostics.F90.
Referenced by calculate_diagnostic_fields().
subroutine, public mom_diagnostics::mom_diagnostics_end | ( | type(diagnostics_cs), pointer | CS, |
type(accel_diag_ptrs), intent(inout) | ADp | ||
) |
Deallocate memory associated with the diagnostics module.
cs | Control structure returned by a previous call to diagnostics_init. | |
[in,out] | adp | structure with pointers to accelerations in momentum equation. |
Definition at line 2088 of file MOM_diagnostics.F90.
subroutine, public mom_diagnostics::mom_diagnostics_init | ( | type(ocean_internal_state), intent(in) | MIS, |
type(accel_diag_ptrs), intent(inout) | ADp, | ||
type(cont_diag_ptrs), intent(inout) | CDp, | ||
type(time_type), intent(in) | Time, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(inout), target | diag, | ||
type(diagnostics_cs), pointer | CS, | ||
type(thermo_var_ptrs), intent(in) | tv | ||
) |
This subroutine registers various diagnostics and allocates space for fields that other diagnostis depend upon.
[in] | mis | For "MOM Internal State" a set of pointers to the fields and accelerations that make up the ocean's internal physical state. |
[in,out] | adp | Structure with pointers to momentum equation terms. |
[in,out] | cdp | Structure with pointers to continuity equation terms. |
[in] | time | Current model time. |
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure to parse for run-time parameters. |
[in,out] | diag | Structure to regulate diagnostic output. |
cs | Pointer set to point to control structure for this module. | |
[in] | tv | A structure pointing to various thermodynamic variables. |
Definition at line 1423 of file MOM_diagnostics.F90.
References mom_error_handler::mom_error(), register_time_deriv(), set_dependent_diagnostics(), and mom_wave_speed::wave_speed_init().
subroutine, public mom_diagnostics::post_surface_dyn_diags | ( | type(surface_diag_ids), intent(in) | IDs, |
type(ocean_grid_type), intent(in) | G, | ||
type(diag_ctrl), intent(in) | diag, | ||
type(surface), intent(in) | sfc_state, | ||
real, dimension(szi_(g),szj_(g)), intent(in) | 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.
[in] | ids | A structure with the diagnostic IDs. |
[in] | g | ocean grid structure |
[in] | diag | regulates diagnostic output |
[in] | sfc_state | structure describing the ocean surface state |
[in] | ssh | Time mean surface height without corrections for ice displacement [m] |
Definition at line 1158 of file MOM_diagnostics.F90.
subroutine, public mom_diagnostics::post_surface_thermo_diags | ( | type(surface_diag_ids), intent(in) | IDs, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(diag_ctrl), intent(in) | diag, | ||
real, intent(in) | dt_int, | ||
type(surface), intent(in) | sfc_state, | ||
type(thermo_var_ptrs), intent(in) | tv, | ||
real, dimension(szi_(g),szj_(g)), intent(in) | ssh, | ||
real, dimension(szi_(g),szj_(g)), intent(in) | 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.
[in] | ids | A structure with the diagnostic IDs. |
[in] | g | ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | diag | regulates diagnostic output |
[in] | dt_int | total time step associated with these diagnostics [T ~> s]. |
[in] | sfc_state | structure describing the ocean surface state |
[in] | tv | A structure pointing to various thermodynamic variables |
[in] | ssh | Time mean surface height without corrections for ice displacement [m] |
[in] | ssh_ibc | Time mean surface height with corrections for ice displacement and the inverse barometer [m] |
Definition at line 1195 of file MOM_diagnostics.F90.
References mom_spatial_means::global_area_integral().
subroutine, public mom_diagnostics::post_transport_diagnostics | ( | type(ocean_grid_type), intent(inout) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
real, dimension( g %isdb: g %iedb, g %jsd: g %jed, g %ke), intent(in) | uhtr, | ||
real, dimension( g %isd: g %ied, g %jsdb: g %jedb, g %ke), intent(in) | vhtr, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | h, | ||
type(transport_diag_ids), intent(in) | IDs, | ||
type(diag_grid_storage), intent(inout) | diag_pre_dyn, | ||
type(diag_ctrl), intent(inout) | diag, | ||
real, intent(in) | dt_trans, | ||
type(tracer_registry_type), pointer | Reg | ||
) |
This routine posts diagnostics of the transports, including the subgridscale contributions.
[in,out] | g | ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | uhtr | Accumulated zonal thickness fluxes used to advect tracers [H L2 ~> m3 or kg] |
[in] | vhtr | Accumulated meridional thickness fluxes used to advect tracers [H L2 ~> m3 or kg] |
[in] | h | The updated layer thicknesses [H ~> m or kg m-2] |
[in] | ids | A structure with the diagnostic IDs. |
[in,out] | diag_pre_dyn | Stored grids from before dynamics |
[in,out] | diag | regulates diagnostic output |
[in] | dt_trans | total time step associated with the transports [T ~> s]. |
reg | Pointer to the tracer registry |
Definition at line 1338 of file MOM_diagnostics.F90.
References mom_diag_mediator::diag_copy_storage_to_diag(), mom_diag_mediator::diag_restore_grids(), mom_diag_mediator::diag_save_grids(), and mom_tracer_registry::post_tracer_transport_diagnostics().
subroutine, public mom_diagnostics::register_surface_diags | ( | type(time_type), intent(in) | Time, |
type(ocean_grid_type), intent(in) | G, | ||
type(unit_scale_type), intent(in) | US, | ||
type(surface_diag_ids), intent(inout) | IDs, | ||
type(diag_ctrl), intent(inout) | diag, | ||
type(thermo_var_ptrs), intent(in) | tv | ||
) |
Register diagnostics of the surface state and integrated quantities.
[in] | time | current model time |
[in] | g | ocean grid structure |
[in] | us | A dimensional unit scaling type |
[in,out] | ids | A structure with the diagnostic IDs. |
[in,out] | diag | regulates diagnostic output |
[in] | tv | A structure pointing to various thermodynamic variables |
Definition at line 1732 of file MOM_diagnostics.F90.
subroutine, public mom_diagnostics::register_time_deriv | ( | integer, dimension(3), intent(in) | lb, |
real, dimension(lb(1):,lb(2):,:), target | f_ptr, | ||
real, dimension(lb(1):,lb(2):,:), target | deriv_ptr, | ||
type(diagnostics_cs), pointer | CS | ||
) |
This subroutine registers fields to calculate a diagnostic time derivative.
[in] | 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. |
Definition at line 1085 of file MOM_diagnostics.F90.
References mom_error_handler::mom_error().
Referenced by mom_diagnostics_init(), and set_dependent_diagnostics().
subroutine, public mom_diagnostics::register_transport_diags | ( | type(time_type), intent(in) | Time, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(transport_diag_ids), intent(inout) | IDs, | ||
type(diag_ctrl), intent(inout) | diag | ||
) |
Register certain diagnostics related to transports.
[in] | time | current model time |
[in] | g | ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in,out] | ids | A structure with the diagnostic IDs. |
[in,out] | diag | regulates diagnostic output |
Definition at line 1807 of file MOM_diagnostics.F90.
References mom_verticalgrid::get_thickness_units().
|
private |
This subroutine sets up diagnostics upon which other diagnostics depend.
[in] | mis | For "MOM Internal State" a set of pointers to the fields and accelerations making up ocean internal physical state. |
[in,out] | adp | Structure pointing to accelerations in momentum equation. |
[in,out] | cdp | Structure pointing to terms in continuity equation. |
[in] | g | The ocean's grid structure. |
cs | Pointer to the control structure for this module. |
Definition at line 2029 of file MOM_diagnostics.F90.
References register_time_deriv().
Referenced by mom_diagnostics_init().
subroutine, public mom_diagnostics::write_static_fields | ( | type(ocean_grid_type), intent(in) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(thermo_var_ptrs), intent(in) | tv, | ||
type(diag_ctrl), intent(inout), target | diag | ||
) |
Offers the static fields in the ocean grid type for output via the diag_manager.
[in] | g | ocean grid structure |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | tv | A structure pointing to various thermodynamic variables |
[in,out] | diag | regulates diagnostic output |
Definition at line 1854 of file MOM_diagnostics.F90.