mesmer.weighted.lat_weights

Contents

mesmer.weighted.lat_weights#

mesmer.weighted.lat_weights(data, y_dim='lat')#

area weights based on the cosine of the latitude

Parameters:
  • data (xr.DataArray | xr.Dataset | xr.DataTree | array_like) – Latitude coordinates.

  • y_dim (str, default: “lat”) – Name of the y dimension to retrieve the coordinates from.

Returns:

weights (xr.DataArray | xr.Dataset | xr.DataTree | np.ndarray) – Cosine weights of lat_coords. If a Dataset or DataTree is passed the result is stored in a DataArray named weights.