xoa.cf.CFSpecs.get_dim_type
- CFSpecs.get_dim_type(dim, da=None, lower=True)[source]
Get the type of a dimension
Three cases:
This dimension is registered in CF dims.
obj has dim as dim and has an axis attribute inferred with
get_axis()
.obj has a coord named dim with an axis attribute inferred with
get_axis()
.
- Parameters:
dim (str) – Dimension name
obj (xarray.DataArray, xarray.Dataset) – Data array that the dimension belongs to, to help inferring the type
lower (bool) – For lower case
- Returns:
str, None – Letter as one of x, y, z, t or f, if found, else None
See also