cfdm.core.CoordinateReference.set_datum

CoordinateReference.set_datum(datum, copy=True)[source]

Set the datum component.

New in version (cfdm): 1.7.0

See also

datum, del_datum, get_datum

Parameters
datum: Datum

The datum component to be inserted.

copy: bool, optional

If False then do not copy the datum prior to insertion. By default the datum is copied.

Returns

None

Examples:

>>> r = cfdm.core.CoordinateReference()
>>> d = cfdm.core.Datum(parameters={'earth_radius': 7000000})
>>> r.set_datum(d)
>>> r.get_datum()
<Datum: Parameters: earth_radius>
>>> r.del_datum()
<Datum: Parameters: earth_radius>
>>> r.get_datum()
<Datum: Parameters: >