xarray.DataArray.cf.coordinates#

DataArray.cf.coordinates#

Mapping valid Coordinate standard names for .cf[] to variable names.

This is useful for checking whether a key is valid for indexing, i.e. that the attributes necessary to allow indexing by that key exist. However, it will only return the Coordinate names ("latitude", "longitude", "vertical", "time") present in .coords, not in .data_vars.

Returns:
dict

Dictionary of valid Coordinate names that can be used with __getitem__ or .cf[key]. Keys will be the appropriate subset of ("latitude", "longitude", "vertical", "time"). Values are lists of variable names that match that particular key.