xoa.coords.get_meta_dims

Contents

xoa.coords.get_meta_dims#

xoa.coords.get_meta_dims(da, meta_args, allow_positional=False, positions='tzyx', errors='warn', **kwargs)[source]#

Get the data array dimensions names from their type

Parameters:
  • da (xarray.DataArray) – Array to scan

  • meta_args (str, list) – Letters among “x”, “y”, “z”, “t” and “f”, or generic CF names.

  • allow_positional (bool) – Fall back to positional dimension of types if unkown.

  • positions (str) – Default position per type starting from the end.

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

    In case of errors

    • 'ignore': silently ignore

    • 'warn': emit a warning

    • 'raise': raise an exception

  • kwargs (dict) – Extra parameters are passed to xoa.meta.MetaSpecs.get_dims() in addition to the above parameters.

Returns:

tuple(list) or list – Tuple of dimension name or None when the dimension if not found

See also

xoa.meta.MetaSpecs.get_dims