cf.Field.domain_axis_key¶
-
Field.
domain_axis_key
(identity, default=ValueError())[source]¶ Return the key of the domain axis construct that is spanned by 1-d coordinate constructs.
Parameters: identity:
Select the 1-d coordinate constructs that have the given identity.
An identity is specified by a string (e.g.
'latitude'
,'long_name=time'
, etc.); or a compiled regular expression (e.g.re.compile('^atmosphere')
), for which all constructs whose identities match (viare.search
) are selected.Each coordinate construct has a number of identities, and is selected if any of them match any of those provided. A construct’s identities are those returned by its
identities
method. In the following example, the constructx
has four identities:>>> x.identities() ['time', 'long_name=Time', 'foo=bar', 'ncvar%T']
In addition, each construct also has an identity based its construct key (e.g.
'key%dimensioncoordinate2'
)Note that in the output of a
print
call ordump
method, a construct is always described by one of its identities, and so this description may always be used as an identity argument.- default: optional
Return the value of the default parameter if a domain axis construct can not be found. If set to an
Exception
instance then it will be raised instead.
Returns: str
The key of the domain axis construct that is spanned by the data of the selected 1-d coordinate constructs.
Examples:
TODO