xarray.Dataset.bounds.add_missing_bounds#

Dataset.bounds.add_missing_bounds(width=0.5)#

Adds missing coordinate bounds for supported axes in the Dataset.

This function loops through the Dataset’s axes and attempts to adds bounds to its coordinates if they don’t exist. The coordinates must meet the following criteria in order to add bounds:

  1. The axis for the coordinates are “X”, “Y”, “T”, or “Z”

  2. Coordinates are a single dimension, not multidimensional

  3. Coordinates are a length > 1 (not singleton)

  4. Bounds must not already exist. * Determined by attempting to map the coordinate variable’s “bounds” attr (if set) to the bounds data variable of the same key.

Parameters

width (float, optional) – Width of the bounds relative to the position of the nearest points, by default 0.5.

Returns

xr.Dataset