PlasmaCalcs.tools.xarray_tools.xarray_dimensions.xarray_closeness

PlasmaCalcs.tools.xarray_tools.xarray_dimensions.xarray_closeness(array, dim=None)
computes “closeness” along each dim: (array.isel(dim=0)/array).std()
Result is a dataset with one scalar data_var telling closeness of each dim.
Note: the std() is always taken across ALL dims of the array.
[TODO] allow to keep some dims?
dim: None, str, or list of strs
if provided, only consider these dims.
See also: xarray_squeeze_close