cfdm.core.Constructs¶
-
class
cfdm.core.
Constructs
(auxiliary_coordinate=None, dimension_coordinate=None, domain_ancillary=None, field_ancillary=None, cell_measure=None, coordinate_reference=None, domain_axis=None, domain_topology=None, cell_connectivity=None, cell_method=None, source=None, copy=True, _use_data=True, _view=False, _ignore=())[source]¶ Bases:
cfdm.core.abstract.container.Container
A container for metadata constructs.
The following metadata constructs can be included:
domain axis constructs
dimension coordinate constructs
auxiliary coordinate constructs
coordinate reference constructs
domain ancillary constructs
cell measure constructs
domain topology constructs
cell connectivity constructs
cell method constructs
field ancillary constructs
The container is used by used by
Field
andDomain
instances.The container is like a dictionary in many ways, in that it stores key/value pairs where the key is the unique construct key with corresponding metadata construct value, and provides some of the usual dictionary methods.
New in version (cfdm): 1.7.0
Initialisation
- Parameters
- auxiliary_coordinate:
str
, optional The base name for keys of auxiliary coordinate constructs.
- Parameter example:
auxiliary_coordinate='auxiliarycoordinate'
- dimension_coordinate:
str
, optional The base name for keys of dimension coordinate constructs.
- Parameter example:
dimension_coordinate='dimensioncoordinate'
- domain_ancillary:
str
, optional The base name for keys of domain ancillary constructs.
- Parameter example:
domain_ancillary='domainancillary'
- field_ancillary:
str
, optional The base name for keys of field ancillary constructs.
- Parameter example:
field_ancillary='fieldancillary'
- cell_measure:
str
, optional The base name for keys of cell measure constructs.
- Parameter example:
cell_measure='cellmeasure'
- coordinate_reference:
str
, optional The base name for keys of coordinate reference constructs.
- Parameter example:
coordinate_reference='coordinatereference'
- domain_axis:
str
, optional The base name for keys of domain axis constructs.
- Parameter example:
domain_axis='domainaxis'
- domain_topology:
str
, optional The base name for keys of domain topology constructs.
- Parameter example:
'domaintopology'
New in version (cfdm): 1.11.0.0
- cell_connectivity:
str
, optional The base name for keys of cell connectivity constructs.
- Parameter example:
'cellconnectivity'
New in version (cfdm): 1.11.0.0
- cell_method:
str
, optional The base name for keys of cell method constructs.
- Parameter example:
cell_method='cellmethod'
- source: optional
Convert source, which can be any type of object, to a
Constructs
instance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
Constructs
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 aConstructs
instance thencfdm.core.Constructs(source=x)
is equivalent tox.copy()
.- copy:
bool
, optional If True (the default) then deep copy metadata constructs from those of source prior to initialisation, else they are not deep copied.
- _ignore: sequence of
str
, optional Ignores the given construct types.
- Parameter example:
_ignore=('cell_method', 'field_ancillary')
- auxiliary_coordinate:
Filtering¶
Methods
Select metadata constructs by type. |
Constructs and identifiers¶
Methods
Return the construct key of the sole metadata construct. |
|
Return the sole metadata construct. |
|
Return the type of a construct for a given key. |
|
Return all of the construct types for all keys. |
|
Return a new, unused construct key. |
|
Replace one metadata construct with another. |
Data axes¶
Methods
Returns the axes spanned by the data. |
|
Return the keys of the axes spanned by a construct’s data. |
Miscellaneous¶
Methods
Return a deep copy. |
|
Return a shallow copy. |
|
Return the constructs in their predetermined order. |
|
Return a dictionary of the metadata constructs. |
Dictionary-access methods¶
Methods
Returns the construct for the key, else default. |
|
Return the items as (construct key, construct) pairs. |
|
Return all of the construct keys, in arbitrary order. |
|
Return all of the metadata constructs, in arbitrary order. |
|
Return a construct with the given key. |
Special¶
Methods
Implements membership test operators for construct keys. |
|
Called by the |
|
Called by the |
|
Return a construct with the given key. |
|
Called when an iterator is required. |
|
Return the number of constructs. |
Docstring substitutions¶
Methods
Return the special docstring substitutions. |
|
Returns the substitutions that apply to methods of the class. |
|
Returns the class {{package}} substitutions package depth. |
|
Returns method names excluded in the class substitutions. |