geocat.comp.gc_util._find_optional_var

geocat.comp.gc_util._find_optional_var#

geocat.comp.gc_util._find_optional_var(ds, standard_name=None, long_name=None, possible_names=None, description=None)#

Find an optional variable using CF-compliant checks.

Parameters:
  • ds (xr.Dataset or ux.UxDataset) – The dataset to search

  • standard_name (str, optional) – CF standard_name to check in attrs

  • long_name (str, optional) – Long_name to check in attrs

  • possible_names (list of str, optional) – List of possible variable names

  • description (str) – String for descriptive Error message

Returns:

str or None – The name of the found coordinate, or None if not found