cf.aggregate

cf.aggregate(fields, rtol=None, atol=None, verbose=False, messages=False, strict_units=False)

Aggregates fields in a field list in place.

Applies the CF aggregation rules.

Parameters :
fields : FieldList

The fields to be aggregated into as few fields as possible.

messages : bool, optional

Print a reason for why a field can’t be aggregated.

verbose : bool, optional

Print a summary of the aggregation.

strict_units : bool, optional

If true then assume that variables with the same standard name but missing units are not aggregatable. By default assume that variables with the same standard name but missing units all have equal units

Returns :

None

Examples

>>> f
[<CF Field: eastward_wind(110, 106)>,
 <CF Field: eastward_wind(110, 106)>,
 <CF Field: eastward_wind(110, 106)>,
 <CF Field: air_temperature(12, 73, 96)>,
 <CF Field: eastward_wind(110, 106)>,
 <CF Field: eastward_wind(110, 106)>,
 <CF Field: eastward_wind(1, 1, 110, 106)>,
 <CF Field: air_temperature(96, 73)>]
>>> cf.aggregate(f)
>>> f
[<CF Field: eastward_wind(3, 2, 110, 106)>,
 <CF Field: air_temperature(13, 73, 96)>]

Previous topic

cf.outside

Next topic

cf.dump

This Page