cf.CoordinateReference.change_identifiers

CoordinateReference.change_identifiers(identity_map, coordinate=True, ancillary=True, strict=False, inplace=False, i=False)[source]

Change the TODO

If an identifier is not in the provided mapping then it is set to None and thus effectively removed from the coordinate reference.

Parameters
identity_map: dict

For example: {'dim2': 'dim3', 'aux2': 'latitude', 'aux4': None}

strict: bool, optional

If True then coordinate or domain ancillary identifiers not set in the identity_map dictiontary are set to None. By default they are left unchanged.

i: bool, optional

Returns

None

Examples:

>>> r = cf.CoordinateReference('atmosphere_hybrid_height_coordinate',
...                             a='ncvar:ak',
...                             b='ncvar:bk')
>>> r.coordinates
{'atmosphere_hybrid_height_coordinate'}
>>> r.change_coord_identitiers({
...     'atmosphere_hybrid_height_coordinate', 'dim1', 'ncvar:ak': 'aux0'
... })
>>> r.coordinates
{'dim1', 'aux0'}