Return a coordinate of the field.
Note that the returned coordinate is an object identity to the coordinate stored in the space so, for example, a coordinate’s properties may be changed in-place:
>>> f.coord('height').long_name
AttributeError: 'Coordinate' object has no CF property 'long_name'
>>> f.coord('hei').long_name = 'HEIGHT'
>>> f.coord('heigh').long_name
'HEIGHT'
Or a deep copy may be made:
>>> c = f.coord('height').copy()
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> f.coord('lon')
<CF Coordinate: longitude(128)>
>>> f.coord('lon', key=True)
'dim2'
>>> f.coord('lonX', key=True)
None
>>> f.coord('lon', exact=True)
None
>>> f.coord('longitude', exact=True)
<CF Coordinate: longitude(128)>