mesmer.core.mask.mask_ocean

Contents

mesmer.core.mask.mask_ocean#

mesmer.core.mask.mask_ocean(data, *, x_coords='lon', y_coords='lat')#

mask out ocean

Parameters:
  • data (xr.Dataset | xr.DataArray) – Array to mask.

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

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

Returns:

data (xr.Dataset | xr.DataArray) – Array with ocean grid points masked out.

Notes

  • Uses the 1:110m land mask from Natural Earth (http://www.naturalearthdata.com).

  • Whether a grid cell is in the ocean or on land is based on its center. For regularly spaced coordinates use mesmer.mask.mask_land_fraction().