PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_dims_coords

PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_dims_coords(array, *, include_dims_as_coords=True)
returns dict of {dim name: [coord name for all coords with this dim]}.
result[()] will be list of all scalar coords (ndim=0 so no associated dims).
coords associated with multiple dims will appear in multiple places in the result.
include_dims_as_coords: bool
whether to include dims as coord names in the result.
Dims with no same-named coord will appear in appropriate place in result.