xarray.DataArray.xoa.get_coord

xarray.DataArray.xoa.get_coord#

DataArray.xoa.get_coord(meta_name, loc='any', single=True, errors='ignore')#

Search for a coordinate knowing its generic CF name

Search is made with the search_coord() method of the MetaSpecs() instance was set at initialisation or inferred with xoa.meta.infer_meta_specs().

Parameters:
  • meta_name (str) – Generic CF name

  • loc (str, {"any", None}, {"", False}) –

    • str: one of these locations

    • None or “any”: any

    • False or “”: no location

  • errors ({'ignore', 'warn', 'raise'}) –

    In case of errors

    • 'ignore': silently ignore

    • 'warn': emit a warning

    • 'raise': raise an exception

See also

xoa.meta.MetaSpecs.search(), xoa.meta.MetaCoordSpecs.search(), xoa.meta.MetaVarSpecs.search()