xoa.meta.get_variant

Contents

xoa.meta.get_variant#

xoa.meta.get_variant(ds, variants, errors='ignore')[source]#

Try to find a unique generic data array in a dataset

Parameters:
  • ds (xarraya.Dataset)

  • variants (str, list(str)) – A single or a list of meta names

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

    In case of errors

    • 'ignore': silently ignore

    • 'warn': emit a warning

    • 'raise': raise an exception

Returns:

xarray.DataArray, None