cf.Field.is_discrete_axis¶
- Field.is_discrete_axis(*identity, **filter_kwargs)[source]¶
Return True if the given axis is discrete.
In general, a discrete axis is any axis that does not correspond to a continuous physical quantity, but only the following types of discrete axis are identified here:
The feature instance axis of a discrete sampling geometry (DSG) domain.
An axis spanned by the domain topology construct of an unstructured grid.
The axis with geometry cells.
See also
- Parameters:
- identity:
tuple, optional Select domain axis constructs that have an identity, defined by their
identitiesmethods, that matches any of the given values.Additionally, the values are matched against construct identifiers, with or without the
'key%'prefix.Additionally, if for a given
value,f.coordinates(value, filter_by_naxes=(1,))returns 1-d coordinate constructs that all span the same domain axis construct then that domain axis construct is selected. Seecoordinatesfor details.Additionally, if there is a
Fielddata array and a value matches the integer position of an array dimension, then the corresponding domain axis construct is selected.If no values are provided then all domain axis constructs are selected.
A value may be any object that can match via the
==operator, or are.Patternobject that matches via itssearchmethod.Note that in the output of a
dumpmethod orprintcall, a construct is always described by an identity that will select it.- filter_kwargs: optional
Keyword arguments as accepted by
Constructs.filterthat define additional construct selection criteria.
- identity:
Examples
>>> f = cf.example_field(8) >>> f.is_discrete_axis('X') True >>> f.is_discrete_axis('T') False