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
See also
- Parameters
- key:
str
The construct key of the coordinate construct.
- Parameter example:
key='dimensioncoordinate1'
- Parameter example:
key='auxiliarycoordinate0'
- key:
- Returns
Examples:
>>> r = cf.CoordinateReference() >>> r.set_coordinates(['dimensioncoordinate0', 'auxiliarycoordinate1']) >>> r.coordinates() {'auxiliarycoordinate1', 'dimensioncoordinate0'} >>> r.has_coordinate('dimensioncoordinate0') True >>> r.has_coordinate('dimensioncoordinate1') False