MOM6
|
Functions and routines to take area, volume, mass-weighted, layerwise, zonal or meridional means.
Functions/Subroutines | |
real function, public | global_area_mean (var, G, scale) |
Return the global area mean of a variable. This uses reproducing sums. More... | |
real function, public | global_area_integral (var, G, scale) |
Return the global area integral of a variable. This uses reproducing sums. More... | |
real function, dimension(gv %ke), public | global_layer_mean (var, h, G, GV, scale) |
Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums. More... | |
real function, public | global_volume_mean (var, h, G, GV, scale) |
Find the global thickness-weighted mean of a variable. This uses reproducing sums. More... | |
real function, public | global_mass_integral (h, G, GV, var, on_PE_only, scale) |
Find the global mass-weighted integral of a variable. This uses reproducing sums. More... | |
subroutine, public | global_i_mean (array, i_mean, G, mask, scale, tmp_scale) |
Determine the global mean of a field along rows of constant i, returning it in a 1-d array using the local indexing. This uses reproducing sums. More... | |
subroutine, public | global_j_mean (array, j_mean, G, mask, scale, tmp_scale) |
Determine the global mean of a field along rows of constant j, returning it in a 1-d array using the local indexing. This uses reproducing sums. More... | |
subroutine, public | adjust_area_mean_to_zero (array, G, scaling, unit_scale) |
Adjust 2d array such that area mean is zero without moving the zero contour. More... | |
subroutine, public mom_spatial_means::adjust_area_mean_to_zero | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(inout) | array, |
type(ocean_grid_type), intent(in) | G, | ||
real, intent(out), optional | scaling, | ||
real, intent(in), optional | unit_scale | ||
) |
Adjust 2d array such that area mean is zero without moving the zero contour.
[in] | g | Grid structure |
[in,out] | array | 2D array to be adjusted |
[out] | scaling | The scaling factor used |
[in] | unit_scale | A rescaling factor for the variable |
Definition at line 357 of file MOM_spatial_means.F90.
Referenced by mom_surface_forcing_mct::convert_iob_to_fluxes(), and mom_surface_forcing_nuopc::convert_iob_to_fluxes().
real function, public mom_spatial_means::global_area_integral | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in) | var, |
type(ocean_grid_type), intent(in) | G, | ||
real, intent(in), optional | scale | ||
) |
Return the global area integral of a variable. This uses reproducing sums.
[in] | g | The ocean's grid structure |
[in] | var | The variable to integrate |
[in] | scale | A rescaling factor for the variable |
Definition at line 52 of file MOM_spatial_means.F90.
Referenced by mom_forcing_type::forcing_diagnostics(), and mom_diagnostics::post_surface_thermo_diags().
real function, public mom_spatial_means::global_area_mean | ( | real, dimension(szi_(g), szj_(g)), intent(in) | var, |
type(ocean_grid_type), intent(in) | G, | ||
real, intent(in), optional | scale | ||
) |
Return the global area mean of a variable. This uses reproducing sums.
[in] | g | The ocean's grid structure |
[in] | var | The variable to average |
[in] | scale | A rescaling factor for the variable |
Definition at line 29 of file MOM_spatial_means.F90.
Referenced by mom_forcing_type::forcing_diagnostics(), and mom_internal_tides::sum_en().
subroutine, public mom_spatial_means::global_i_mean | ( | real, dimension(szi_(g),szj_(g)), intent(in) | array, |
real, dimension(szj_(g)), intent(out) | i_mean, | ||
type(ocean_grid_type), intent(inout) | G, | ||
real, dimension(szi_(g),szj_(g)), intent(in), optional | mask, | ||
real, intent(in), optional | scale, | ||
real, intent(in), optional | tmp_scale | ||
) |
Determine the global mean of a field along rows of constant i, returning it in a 1-d array using the local indexing. This uses reproducing sums.
[in,out] | g | The ocean's grid structure |
[in] | array | The variable being averaged |
[out] | i_mean | Global mean of array along its i-axis |
[in] | mask | An array used for weighting the i-mean |
[in] | scale | A rescaling factor for the output variable |
[in] | tmp_scale | A rescaling factor for the internal calculations that is removed from the output |
Definition at line 186 of file MOM_spatial_means.F90.
References mom_error_handler::mom_error(), mom_coms::query_efp_overflow_error(), and mom_coms::reset_efp_overflow_error().
Referenced by mom_sponge::apply_sponge().
subroutine, public mom_spatial_means::global_j_mean | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in) | array, |
real, dimension( g %isd: g %ied), intent(out) | j_mean, | ||
type(ocean_grid_type), intent(inout) | G, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed), intent(in), optional | mask, | ||
real, intent(in), optional | scale, | ||
real, intent(in), optional | tmp_scale | ||
) |
Determine the global mean of a field along rows of constant j, returning it in a 1-d array using the local indexing. This uses reproducing sums.
[in,out] | g | The ocean's grid structure |
[in] | array | The variable being averaged |
[out] | j_mean | Global mean of array along its j-axis |
[in] | mask | An array used for weighting the j-mean |
[in] | scale | A rescaling factor for the output variable |
[in] | tmp_scale | A rescaling factor for the internal calculations that is removed from the output |
Definition at line 272 of file MOM_spatial_means.F90.
References mom_error_handler::mom_error(), mom_coms::query_efp_overflow_error(), and mom_coms::reset_efp_overflow_error().
real function, dimension( gv %ke), public mom_spatial_means::global_layer_mean | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | var, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, intent(in), optional | scale | ||
) |
Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | var | The variable to average |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | scale | A rescaling factor for the variable |
Definition at line 74 of file MOM_spatial_means.F90.
real function, public mom_spatial_means::global_mass_integral | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in), optional | var, | ||
logical, intent(in), optional | on_PE_only, | ||
real, intent(in), optional | scale | ||
) |
Find the global mass-weighted integral of a variable. This uses reproducing sums.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | var | The variable being integrated |
[in] | on_pe_only | If present and true, the sum is only done on the local PE, and it is not order invariant. |
[in] | scale | A rescaling factor for the variable |
Definition at line 138 of file MOM_spatial_means.F90.
Referenced by mom::get_ocean_stocks().
real function, public mom_spatial_means::global_volume_mean | ( | real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | var, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, intent(in), optional | scale | ||
) |
Find the global thickness-weighted mean of a variable. This uses reproducing sums.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | var | The variable being averaged |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | scale | A rescaling factor for the variable |
Definition at line 107 of file MOM_spatial_means.F90.
Referenced by mom_diagnostics::calculate_diagnostic_fields().