xoa.coords.copy_coord_attrs

xoa.coords.copy_coord_attrs#

xoa.coords.copy_coord_attrs(da, ref)[source]#

Copy the attributes of the coordinates of a reference to those of an array

This is useful after xarray.apply_ufunc(), which drops the attributes of the coordinates, like the standard_name that is needed to find the longitudes and latitudes.

Parameters:
Returns:

xarray.DataArray, xarray.Dataset – The same object as da