Whether or not the construct identity satisfies conditions.

New in version 3.0.0.

identities: optional

Define conditions on the construct identities by one or more of

  • A construct identity. TODO

    A construct has a number of string-valued identities

defined by its identities method, and is selected if any of them match the identity parameter. identity may be a string that equals one of a construct’s identities; or a re.Pattern object that matches one of a construct’s identities via

Note that in the output of a dump method or print call, a metadata construct is always described by one of its identities, and so this description may always be used as an identity value.

Parameter example:


Parameter example:


Parameter example:

'long_name=Cell Area'

Parameter example:


Parameter example:


Parameter example:


Parameter example:


Parameter example:

To match identities of “T”, or any that start with “lat”: 'T', re.compile('^lat')


Whether or not at least one of the conditions are met.


>>> f.match_by_identity('time')
>>> f.match_by_identity(re.compile('^air'))
>>> f.match_by_identity('air_pressure', 'air_temperature')
>>> f.match_by_identity('ncvar%t')