xarray_misc
File Purpose: misc. tools related to xarray
Functions
|
return array if DataArray, else array[var] if array is Dataset with one var. |
|
return copy of ds with var.astype(dtype) for each var, dtype in var_to_dtype.items() |
|
return copy of array or dataset, using var.astype(newtype) for any var with oldtype, |
|
return dict of info suitable for creating a similar array or dataset. |
|
convert array with dtype=object to dtype=str, by doing str(x) for every x in array. |
|
xr.merge() these xarray objects (probably DataArrays or Datasets), |
|
xr.merge() this xarray object (DataArray or Dataset) with other xarray objects. |
|
return copy of array with coords (of dtype=object) converted to string. |
|
Add a history entry to a dataset. |
|
return dict of {key from lookup: ds[lookup[key]]} |
|
return dict of {key from lookup: value for that key}. |
|
returns array, masked with NaNs anywhere that the values are not finite. |
|
return data as an xr.DataArray with dims, coords, name, and attrs copied from xarray. |