mesmer.core.weighted.global_mean#
- mesmer.core.weighted.global_mean(data, weights=None, x_dim='lon', y_dim='lat')#
calculate global weighted mean
- Parameters:
data (xr.DataArray | xr.Dataset | xr.DataTree) – Array reduce to the global mean.
weights (xr.DataArray | xr.Dataset | xr.DataTree | array_like, optional) – Array containing the area of each grid cell (or a measure proportional to the grid cell area). If not given will compute it from the cosine of the latitudes using
lat_weights
.x_dim (str, default: “lon”) – Name of the x-dimension.
y_dim (str, default: “lat”) – Name of the y-dimension.
- Returns:
obj (xr.DataTree | xr.Dataset | xr.DataArray) – Array converted to an unstructured grid.
See also