uxarray.UxDataArray.difference

uxarray.UxDataArray.difference#

UxDataArray.difference(destination='edge')#

Computes the absolute difference between a data variable.

The difference for a face-centered data variable can be computed on each edge using the edge_face_connectivity, specified by destination='edge'.

The difference for a node-centered data variable can be computed on each edge using the edge_node_connectivity, specified by destination='edge'.

Computing the difference for an edge-centered data variable is not yet supported.

Note

Not to be confused with the .diff() method from xarray. https://docs.xarray.dev/en/stable/generated/xarray.DataArray.diff.html

Parameters:

destination ({‘node’, ‘edge’, ‘face’}, default='edge'') – The desired destination for computing the difference across and storing on