cf.CellMethod¶
-
class
cf.
CellMethod
(axes=None, method=None, qualifiers=None, source=None, copy=True)[source]¶ Bases:
cfdm.cellmethod.CellMethod
A cell method construct of the CF data model.
One or more cell method constructs describe how the cell values of the field construct represent the variation of the physical quantity within its cells, i.e. the structure of the data at a higher resolution.
A single cell method construct consists of a set of axes, a “method” property which describes how a value of the field construct’s data array describes the variation of the quantity within a cell over those axes (e.g. a value might represent the cell area average), and descriptive qualifiers serving to indicate more precisely how the method was applied (e.g. recording the spacing of the original data, or the fact that the method was applied only over El Nino years).
Initialisation
- Parameters
- axes: (sequence of)
str
, optional Set the axes of the cell method construct, specified either by the construct identifiers of domain axis constructs, standard names, or the special string
'area'
.The axes may also be set after initialisation with the
set_axes
method.- Parameter example:
axes='domainaxis0'
- Parameter example:
axes=['domainaxis0']
- Parameter example:
axes=('domainaxis0', 'domainaxis1')
- Parameter example:
axes='area'
- Parameter example:
axes=['domainaxis2', 'time']
- method:
str
, optional Set the axes of the cell method construct. Either one or more domain axis construct identifiers or standard names.
The method may also be set after initialisation with the
set_method
method.- Parameter example:
method='mean'
- qualifiers:
dict
, optional Set descriptive qualifiers. The dictionary keys are qualifier names, with corresponding values.
Qualifiers may also be set after initialisation with the
qualifiers
andset_qualifier
methods.- Parameter example:
qualifiers={'comment': 'sampled instantaneously'}
- Parameter example:
qualifiers={'where': 'sea', ''over': 'ice'}
- source: optional
Convert source, which can be any type of object, to a
CellMethod
instance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
CellMethod
API. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
x
is also aCellMethod
instance thencf.CellMethod(source=x)
is equivalent tox.copy()
.- copy:
bool
, optional If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.
- axes: (sequence of)
Inspection¶
Methods
A full description of the cell method construct. |
|
Return the canonical identity for the cell method construct. |
|
Return all possible identities. |
Attributes
Return a description of the construct type. |
Qualifiers¶
Methods
Remove the axes of the cell method. |
|
Return the axes of the cell method. |
|
Whether the axes of the cell method have been set. |
|
Set the axes of the cell method. |
|
Remove the method of the cell method. |
|
Return the method of the cell method. |
|
Whether the method of the cell method has been set. |
|
Set the method of the cell method. |
|
Remove a qualifier of the cell method. |
|
Return a qualifier of the cell method. |
|
Whether a qualifier of the cell method has been set. |
|
Set a qualifier of the cell method. |
|
Return all qualifiers of the cell method. |
Attributes
Return the axes of the cell method. |
|
The cell method’s comment qualifier. |
|
|
|
The cell method’s interval qualifier(s). |
|
The cell method’s method qualifier. |
|
The cell method’s over qualifier. |
|
The cell method’s where qualifier. |
|
The cell method’s within qualifier. |
Miscellaneous¶
Methods
Return a deep copy. |
|
Change the axes of the cell method according to a given mapping. |
|
Parse a CF-like cell_methods string. |
|
Returns the commands to create the cell method construct. |
|
Whether two cell method constructs are the same. |
|
True if two cell methods are equivalent, False otherwise. |
|
Expand the cell method interval to cover all of its axes. |
|
Inspect the attributes. |
|
Return a new cell method construct with sorted axes. |
|
Return a string of the cell method. |
Special¶
Methods
Called by the |
|
Called by the |
|
Called by the |
Deprecated¶
Methods
Deprecated at version 3.0.0. |