cf_xarray.accessor._get_axis_coord#

cf_xarray.accessor._get_axis_coord(obj, key)[source]#

Translate from axis or coord name to variable name.

Parameters:
objDataArray, Dataset

DataArray belonging to the coordinate to be checked

keystr, [“X”, “Y”, “Z”, “T”, “longitude”, “latitude”, “vertical”, “time”]

key to check for.

Returns:
List[str]

Variable name(s) in parent xarray object that matches axis or coordinate key.

Notes

This functions checks for the following attributes in order
  • standard_name (CF option)

  • _CoordinateAxisType (from THREDDS)

  • axis (CF option)

  • positive (CF standard for non-pressure vertical coordinate)

References

MetPy’s parse_cf