cf.Field.set_coordinate_reference

Field.set_coordinate_reference(coordinate_reference, key=None, field=None, strict=True)[source]

Set a coordinate reference construct.

By default, this is equivalent to using the set_construct method. If, however, the field parameter has been set then it is assumed to be a field construct that contains the new coordinate reference construct. In this case, existing coordinate and domain ancillary constructs will be referenced by the inserted coordinate reference construct, based on those which are referenced from the other parent field construct (given by the field parameter).

New in version 3.0.0.

See also

set_construct

Parameters
coordinate_reference: CoordinateReference

The coordinate reference construct to be inserted.

key: str, optional

The construct identifier to be used for the construct. If not set then a new, unique identifier is created automatically. If the identifier already exists then the existing construct will be replaced.

Parameter example:

key='coordinatereference1'

field: Field, optional

A parent field construct that contains the new coordinate reference construct.

strict: bool, optional

If False then allow non-strict identities for identifying coordinate and domain ancillary metadata constructs.

Returns
str

The construct identifier for the coordinate reference construct.