cfdm.core.Field.has_construct

Field.has_construct(key)[source]

Whether a metadata construct exists.

New in version (cfdm): 1.7.0

Parameters
key: str

The identifier of the metadata construct.

Parameter example:

key='auxiliarycoordinate0'

Returns
bool

True if the construct exists, otherwise False.

Examples

>>> f.has_construct('dimensioncoordinate1')
True
>>> f.has_construct('dimensioncoordinate99')
False