xoa.cf.SGLocator.get_loc

SGLocator.get_loc(name=None, attrs=None, errors='warn')[source]

Parse name and attributes to find a unique location

Parameters
  • name (None, str) – Name to parse

  • attrs (None, dict) – Dict with standard_name and/or long_name attributes.

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

    In case of errors

    • ignore: silently ignore

    • warn: emit a warning

    • raise: raise an exception

Returns

None, strNone if no location is found, else the corresponding string

Raises

XoaCFError – When locations parsed from name and attributes are conflicting. Thus, this method method is a way to check location consistency.