CFVariable.update¶
- CFVariable.update(long_name=None, standard_units=None, short_name=None, standard_name=None, *, long_prefix=None, long_suffix=None, short_prefix=None, short_suffix=None, symbol=None, sigfig=None, reference=None, colormap=None, axis_scale=None, axis_reverse=None, axis_formatter=None)[source]¶
Update the variable. This is called during initialization. Unspecified variables are kept at their current state. Internally,
CFVariable.child
variables are constructed by callingCFVariable.update
on existingCFVariable
objects copied withcopy.copy
.- Parameters
long_name (str, optional) – The plot-friendly variable name.
standard_units (str, optional) – The plot-friendly CF-compatible units string. Parsed with
parse_units
.short_name (str, optional) – The shorter plot-friendly variable name. This is useful for describing the “category” of a variable and its descendents, e.g. “energy flux” for something with units watts per meters squared. If not provided, this is set to
long_name
. It is often useful to leave this unset and create child variables that inherit the parentshort_name
.standard_name (str, optional) – The unambiguous CF-defined variable name. If one does not exist, you may construct a reasonable one based on the CF guidelines. If not provided, an ad hoc
standard_name
is constructed by replacing the non-alphanumeric characters inlong_name
with underscores. Since thestandard_name
is supposed to be a unique variable identifier, it is never inherited from parent variables.long_prefix, long_suffix (str, optional) – Prefix and suffix to be added to the long name. Defaults to
short_prefix
andshort_suffix
.short_prefix, short_suffix (str, optional) – Prefix and suffix to be added to the short name. Also sets
long_prefix
andlong_suffix
if they were not specified.symbol (str, optional) – The TeX-style symbol used to represent the variable, e.g.
R_o
for the Rossby number or\lambda
for the climate sensitivity parameter.sigfig (int, optional) – The number of significant figures when printing this variable with
scalar_label
.reference (float, optional) – The notional “reference” value for the variable (in units
standard_units
). Useful for parameter sweeps with respect to some value.colormap (colormap-spec, optional) – The appropriate colormap when plotting this quantity. Generally this should be parsed by
Colormap
.axis_scale (scale-spec, optional) – The axis scale name when using this quantity as an axis variable. Generally this should be parsed by
Scale
.axis_reverse (bool, optional) – Whether to reverse the axis by default when using this quantity as an axis variable.
axis_formatter (formatter-spec, optional) – The axis formatter when using this quantity as an axis variable. Generally this should be parsed by
Formatter
. Set toFalse
orNone
to revert to the default formatter.