xoa.coords.geo_unstack

Contents

xoa.coords.geo_unstack#

xoa.coords.geo_unstack(obj, ref, stack_dim='npts')[source]#

Restore the geographic dimensions of ref from an object stacked with geo_stack()

The stacked dimension is reshaped to the dimensions of the longitude and latitude coordinates of ref, in the order used by geo_stack(), and the coordinates of ref that are along them are restored with their values and attributes. Unlike xarray.DataArray.unstack(), the order of the coordinates is preserved.

Parameters:
Returns:

xarray.DataArray, xarray.Dataset – The geographic dimensions are the last ones, with latitude before longitude. Scalar coordinates are restored if ref has a single position.

See also

geo_stack