cfdm.CoordinateReference.set_coordinates

CoordinateReference.set_coordinates(coordinates)[source]

Set references to coordinate constructs.

New in version (cfdm): 1.7.0

Parameters
coordinates: (sequence of) str

The coordinate construct keys to be set.

Parameter example:

coordinates=['dimensioncoordinate0']

Parameter example:

coordinates='dimensioncoordinate0'

Parameter example:

coordinates=set(['dimensioncoordinate0', 'auxiliarycoordinate1'])

Parameter example:

coordinates=[]

Returns

None

Examples

>>> r = cfdm.CoordinateReference()
>>> r.set_coordinates(['dimensioncoordinate0', 'auxiliarycoordinate1'])
>>> r.coordinates()
{'auxiliarycoordinate1', 'dimensioncoordinate0'}
>>> r.clear_coordinates()
{'auxiliarycoordinate1', 'dimensioncoordinate0'}
>>> r.coordinates()
set()