mesmer.core.regionmaskcompat.mask_3D_frac_approx

mesmer.core.regionmaskcompat.mask_3D_frac_approx#

mesmer.core.regionmaskcompat.mask_3D_frac_approx(regions, lon, lat, **kwargs)#

3D mask of the fractional overlap of a set of regions for the given lat/ lon grid

Parameters:
  • regions (regionmask.Regions) – Region definitions.

  • lon (array) – Array of longitude coordinates.

  • lat (array) – Array of latitude coordinates.

  • **kwargs (keyword arguments) – Passed to regions.mask

Returns:

mask_3D (boolean xarray.DataArray) – 3D mask with fractional overlap

Notes

  • assumes equally-spaced lat & lon!

  • copied from Mathias Hauser: mathause/regionmask#38 in August 2020

  • prototype of what will eventually be integrated in his regionmask package