CFVariable¶
- class CFVariable(name, *args, registry=None, **kwargs)[source]¶
Bases:
object
Lightweight CF-style representation of physical variables. Integrated with the xarray accessor via
cfvariable
.- Parameters
name (str) – The canonical variable name.
registry (
CFVariableRegistry
) – The associated registry.*args, **kwargs – Passed to
CFVariable.update
. Thelong_name
,standard_units
, andshort_name
can be passed positionally (in that order).
Attributes Summary
Aliases for the variable name.
The axis formatter used when plotting against this variable.
Whether to reverse the axis when plotting against this variable.
The axis scale when plotting against this variable.
The variable children.
The color associated with the variable.
The colormap associated with the variable.
The truncated colormap associated with the variable.
Tuple of unique variable identifiers (the
name
, thestandard_name
, and thealiases
).Readable plot label using the long name and units.
The plot-friendly variable name.
The canonical variable name.
The “reference” value associated with this variable.
Scalar label.
Readable plot label using the short name and units.
The shorter plot-friendly variable name.
The number of significant figures for scalar labels of this variable.
The CF-style standard name.
The plot-friendly standard units.
Mathematical symbol for this variable.
The active accessor units or the standard units formatted for matplotlib labels.
The standard unit string translated to
pint.Unit
.Methods Summary
child
(name, *args[, other_parents])Return a new child variable with properties inherited from the current one.
update
([long_name, standard_units, …])Update the variable.