xarray.Dataset.bounds.get_bounds#

Dataset.bounds.get_bounds(axis)#

Get bounds for axis coordinates if both exist.

Parameters

axis (CFAxisName) – The CF-compliant axis name (“X”, “Y”, “T”, “Z”).

Returns

xr.DataArray – The coordinate bounds.

Raises
  • ValueError – If an incorrect axis argument is passed.

  • KeyError – If the coordinate variable was not found for the axis.

  • KeyError – If the coordinate bounds were not found for the axis.