cf.Domain.del_construct

Domain.del_construct(key, default=ValueError())[source]

Remove a metadata construct.

If a domain axis construct is selected for removal then it can’t be spanned by any metadata construct data, nor the field construct’s data; nor be referenced by any cell method constructs.

However, a domain ancillary construct may be removed even if it is referenced by coordinate reference construct. In this case the reference is replace with None.

New in version (cfdm): 1.7.0

Parameters
key: str

The key of the metadata construct to be removed.

Parameter example:

key='auxiliarycoordinate0'

default: optional

Return the value of the default parameter if the construct can not be removed, or does not exist.

If set to an Exception instance then it will be raised instead.

Returns

The removed metadata construct.

Examples:

>>> f.del_construct('dimensioncoordinate1')
<DimensionCoordinate: grid_latitude(111) degrees>