xoa.cf.CFVarSpecs.match
- CFVarSpecs.match(da, cf_name=None, loc=None)
Check if da attributes match given or any specs
- Parameters:
da (xarray.DataArray) –
cf_name (str, dict, None) – CF name. If None, all names are used. If a dict, name is interpreted as an explicit set of specifications.
loc (str, {"any", None}, {"", False}) –
str: one of these locations
None or “any”: any
False or ‘””: no location
- Returns:
bool, str – True or False if name is provided, else found name or None