cf.FieldList.collapse

FieldList.collapse(method, axes=None, squeeze=False, mtol=1, weights='auto', ddof=1, a=None, i=False, group=None, regroup=False, within_days=None, within_years=None, over_days=None, over_years=None, coordinate='mid_range', group_by='coords', **kwargs)[source]

Collapse axes of each field by statistical calculations.

fl.collapse() is equivalent to cf.FieldList(f.collapse() for f in fl).

See cf.Field.collapse for details.

Parameters:
method : str or cf.Cellmethods

Define the collapse method.See cf.Field.collapse for details.

axes, kwargs : optional

The axes to be collapsed. See cf.Field.collapse for details.

weights : optional

Specify the weights for the collapse. See cf.Field.collapse for details.

squeeze : bool, optional

If True then collapsed axes are removed from the data array. See cf.Field.collapse for details.

mtol : number, optional

For each element in the output data array, the fraction of contributing input array elements which is allowed to contain missing data. See cf.Field.collapse for details.

ddof : number, optional

The delta degrees of freedom in the calculation of a standard deviation or variance. See cf.Field.collapse for details.

a : optional

Specify the value of \(a\) in the calculation of a weighted standard deviation or variance when ddof is greater than 0. See cf.Field.collapse for details.

i : bool, optional

If True then update the field list and its fields in place. By default a new field list containing new fields is created.

Returns:
out : cf.FieldList

The collapsed fields.

Previous topic

cf.FieldList.close

Next topic

cf.FieldList.coord

This Page