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
identities
methods, 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. Seecoordinates
for details.Additionally, if there is a
Field
data 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.Pattern
object that matches via itssearch
method.Note that in the output of a
dump
method orprint
call, a construct is always described by an identity that will select it.- filter_kwargs: optional
Keyword arguments as accepted by
Constructs.filter
that define additional construct selection criteria.
- identity:
Examples
>>> f = cf.example_field(8) >>> f.is_discrete_axis('X') True >>> f.is_discrete_axis('T') False