cfdm.Constructs.ordered

Constructs.ordered()[source]

Return the constructs in their predetermined order.

For cell method constructs, the predetermined order is that in which they where added. There is no predetermined ordering for all other construct types, and a exception is raised if any non-cell method constructs are present.

Deprecated at version (cfdm) 1.9.0.0, since all metadata constructs are now stored in the order in which they where added.

New in version (cfdm): 1.7.0

Returns
collections.OrderedDict

The constructs and their construct keys, in their predetermined order.

Examples:

>>> f = cfdm.Field()
>>> c = f.constructs
>>> c.ordered()
{}
>>> m1 = cfdm.CellMethod(axes=['domainaxis1'], method='mean')
>>> c._set_construct(m1, key='cell_method_for_axis_1')
'cell_method_for_axis_1'
>>> m2 = cfdm.CellMethod(axes=['domainaxis0'], method='minimum')
>>> c._set_construct(m2, key='cell_method_for_axis_0')
'cell_method_for_axis_0'
>>> print(c)
Constructs:
{'cell_method_for_axis_0': <CellMethod: domainaxis0: minimum>,
 'cell_method_for_axis_1': <CellMethod: domainaxis1: mean>}
>>> c.ordered()
OrderedDict([('cell_method_for_axis_1', <CellMethod: domainaxis1: mean>),
             ('cell_method_for_axis_0', <CellMethod: domainaxis0: minimum>)])