xcdat.get_bounds_dim#
- xcdat.get_bounds_dim(da_bounds)[source]#
Identify the bounds dimension in the given bounds DataArray.
This function checks the dimensions of the provided DataArray to find a valid bounds dimension. Valid bounds dimensions include “bnds”, “bnd”, “bounds”, and “bound”.
- Parameters:
da_bounds (
xr.DataArray
) – The bounds DataArray whose dimensions are to be checked for a valid bounds dimension.- Returns:
str
– The name of the valid bounds dimension found in the DataArray.- Raises:
ValueError – If no valid bounds dimension is found in the DataArray.
Notes
This function is designed to work with DataArrays that include a dimension representing bounds, which is commonly used in geospatial or temporal data.