cfdm.AggregatedArray.get_fragment_array

AggregatedArray.get_fragment_array(copy=True)[source]

Get the aggregation data dictionary.

The aggregation data dictionary contains the definitions of the fragments and the instructions on how to aggregate them. The keys are indices of the fragment array dimensions, e.g. (1, 0, 0, 0).

Added in version (cfdm): 1.12.0.0

Parameters:
copy: bool, optional

Whether or not to return a copy of the aggregation dictionary. By default a deep copy is returned.

Warning

If False then changing the returned dictionary in-place will change the aggregation dictionary stored in the AggregatedArray instance, as well as in any copies of it.

Returns:
dict

The aggregation data dictionary.

Examples

>>> a.shape
(12, 1, 73, 144)
>>> a.get_fragment_array_shape()
(2, 1, 1, 1)
>>> a.get_fragment_array()
{(0, 0, 0, 0): {
    'uri': 'January-March.nc',
    'identifier': 'temp',
    'map': [3, 1, 73, 144]}
 (1, 0, 0, 0): {
    'uri': 'April-December.nc',
    'identifier': 'temp',
    'map': [9, 1, 72, 144]}}