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.Dataset | xr.DataArray) – Array reduce to the global mean.

  • weights (xr.DataArray, optional) – DataArray 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.

  • x_dim (str, default: “lon”) – Name of the x-dimension.

  • y_dim (str, default: “lat”) – Name of the y-dimension.

Returns:

obj (xr.Dataset | xr.DataArray) – Array converted to an unstructured grid.