cfdm.core.CoordinateReference.set_coordinate_conversion

CoordinateReference.set_coordinate_conversion(coordinate_conversion, copy=True)[source]

Set the coordinate conversion component.

New in version (cfdm): 1.7.0

Parameters
coordinate_conversion: CoordinateConversion

The coordinate conversion component to be inserted.

copy: bool, optional

If True (the default) then copy the component prior to insertion, else it is not copied.

Returns

None

Examples

>>> r = cfdm.core.CoordinateReference()
>>> orog = cfdm.core.DomainAncillary()
>>> c = cfdm.core.CoordinateConversion(
...     parameters={
...         'standard_name': 'atmosphere_hybrid_height_coordinate',
...     },
...     domain_ancillaries={'orog': orog}
... )
>>> r.set_coordinate_conversion(c)
>>> r.get_coordinate_conversion()
<CoordinateConversion: Parameters: standard_name; Ancillaries: orog>
>>> r.del_coordinate_conversion()
<CoordinateConversion: Parameters: standard_name; Ancillaries: orog>
>>> r.get_coordinate_conversion()
<CoordinateConversion: Parameters: ; Ancillaries: >