namespace mom_spatial_means¶
Overview¶
Functions and routines to take area, volume, mass-weighted, layerwise, zonal or meridional means. More…
namespace mom_spatial_means { // global functions real function, public global_area_mean(var var, G G); real function, public global_area_integral(var var, G G); real function, dimension(gv %ke), public global_layer_mean(var var, h h, G G, GV GV); real function, public global_volume_mean(var var, h h, G G, GV GV); real function, public global_mass_integral(h h, G G, GV GV, var var, on_PE_only on_PE_only); subroutine, public global_i_mean(array array, i_mean i_mean, G G, mask mask); subroutine, public global_j_mean(array array, j_mean j_mean, G G, mask mask); subroutine, public adjust_area_mean_to_zero(array array, G G, scaling scaling); } // namespace mom_spatial_means
Detailed Documentation¶
Functions and routines to take area, volume, mass-weighted, layerwise, zonal or meridional means.
Global Functions¶
real function, public global_area_mean(var var, G G)
Return the global area mean of a variable. This uses reproducing sums.
Parameters:
g |
The ocean’s grid structure |
var |
The variable to average |
real function, public global_area_integral(var var, G G)
Return the global area integral of a variable. This uses reproducing sums.
Parameters:
g |
The ocean’s grid structure |
var |
The variable to integrate |
real function, dimension(gv %ke), public global_layer_mean( var var, h h, G G, GV GV )
Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums.
Parameters:
g |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
var |
The variable to average |
h |
Layer thicknesses [H ~> m or kg m-2] |
real function, public global_volume_mean(var var, h h, G G, GV GV)
Find the global thickness-weighted mean of a variable. This uses reproducing sums.
Parameters:
g |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
var |
The variable being averaged |
h |
Layer thicknesses [H ~> m or kg m-2] |
Returns:
The thickness-weighted average of var
real function, public global_mass_integral( h h, G G, GV GV, var var, on_PE_only on_PE_only )
Find the global mass-weighted integral of a variable. This uses reproducing sums.
Parameters:
g |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
h |
Layer thicknesses [H ~> m or kg m-2] |
var |
The variable being integrated |
on_pe_only |
If present and true, the sum is only done on the local PE, and it is not order invariant. |
Returns:
The mass-weighted integral of var (or 1) in kg times the units of var
subroutine, public global_i_mean(array array, i_mean i_mean, G G, mask mask)
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.
Parameters:
g |
The ocean’s grid structure |
array |
The variable being averaged |
i_mean |
Global mean of array along its i-axis |
mask |
An array used for weighting the i-mean |
subroutine, public global_j_mean(array array, j_mean j_mean, G G, mask mask)
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.
Parameters:
g |
The ocean’s grid structure |
array |
The variable being averaged |
j_mean |
Global mean of array along its j-axis |
mask |
An array used for weighting the j-mean |
subroutine, public adjust_area_mean_to_zero(array array, G G, scaling scaling)
Adjust 2d array such that area mean is zero without moving the zero contour.
Parameters:
g |
Grid structure |
array |
2D array to be adjusted |
scaling |
The scaling factor used |