cf.CoordinateReference.has_coordinate

CoordinateReference.has_coordinate(key)[source]

Whether a reference to a coordinate construct has been set.

New in version (cfdm): 1.7.0

Parameters
key: str

The construct key of the coordinate construct.

Parameter example:

key='dimensioncoordinate1'

Parameter example:

key='auxiliarycoordinate0'

Returns
bool

True if the coordinate construct key has been set, otherwise False.

Examples:

>>> c.coordinates()
{'dimensioncoordinate0',
 'dimensioncoordinate1'}
>>> c.has_coordinate('dimensioncoordinate0')
True
>>> c.has_coordinate('auxiliarycoordinate1')
False