cf.FieldList.equivalent_data

FieldList.equivalent_data(other, rtol=None, atol=None, traceback=False)[source]

Return True if two fields have equivalent data arrays.

Equivalence is defined as both fields having the same data arrays after accounting for different but equivalent units, size one dimensions, different dimension directions and different dimension orders.

Parameters:

other : cf.Field

atol : float, optional

The absolute tolerance for all numerical comparisons, By default the value returned by the cf.ATOL function is used.

rtol : float, optional

The relative tolerance for all numerical comparisons, By default the value returned by the cf.RTOL function is used.

traceback : bool, optional

If True then print a traceback highlighting where the two data arrays differ.

Returns:
out : bool

Whether or not the two fields’ data arrays are equivalent.

Examples:
>>> f.equivalent_data(g)

Previous topic

cf.FieldList.equivalent

Next topic

cf.FieldList.equivalent_domain

This Page