True if two fields are logically equal, False otherwise.
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> f.Conventions
'CF-1.0'
>>> g = f.copy()
>>> g.Conventions = 'CF-1.5'
>>> f.equals(g)
True
In the following example, two fields differ only by the long name of their time coordinates. The traceback shows that they differ in their domains, that they differ in their time coordinates and that the long name could not be matched.
>>> g = f.copy()
>>> g.coord('time').long_name = 'something_else'
>>> f.equals(g, traceback=True)
Coordinate: Different long_name: 'time', 'something else'
Coordinate: Different long_name: 'time', 'latitude in rotated pole grid'
Coordinate: Different long_name: 'time', 'longitude in rotated pole grid'
Domain: Different coordinate: <CF Coordinate: time(12)>
Field: Different 'domain': <CF Domain: (73, 96, 12)>, <CF Domain: (73, 96, 12)>
False