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, cell_method=None, source=None, copy=True, _use_data=True, _view=False, _ignore=())[source]

Bases: future.types.newobject.newobject

A container for metadata constucts.

New in version 1.7.0.

Initialization

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'

cell_method: str, optional

The base name for keys of cell method constructs.

Parameter example:

cell_method='cellmethod'

source: optional

Initialize the construct keys and contained metadata constructs from those of source.

copy: bool, optional

If False then do not deep copy metadata constructs from those of source prior to initialization. By default such metadata constructs deep copied.

Filtering

Methods

filter_by_type Select metadata constructs by type.

Constructs and keys

Methods

key Return the construct key of the sole metadata construct.
value Return the sole metadata construct.

Data axes

Methods

data_axes Return the domain axis constructs spanned by metadata construct data.

Miscellaneous

Methods

copy Return a deep copy.
shallow_copy Return a shallow copy.
ordered Return the contructs in their predetermined order.

Dictionary-access methods

Methods

get Return the construct for construct key, if it exists, else default.
items Return the items as (construct key, construct) pairs.
keys Return all of the construct keys, in arbitrary order.
values Returns all of the metadata constructs, in arbitrary order.
__getitem__ Return a construct with the given key.

Special

Methods

__call__
__contains__ Called to implement membership test operators for construct keys.
__copy__ Called by the copy.copy standard library function.
__deepcopy__ Called by the copy.deepcopy standard library function.
__getitem__ Return a construct with the given key.
__iter__ Called when an iterator is required.
__len__ Return the number of constructs.