xarray_coords

File Purpose: tools related to xarray coords

Functions

xarray_assign_self_as_coord(array)

return copy of array with coord named array.name, equal to array values.

xarray_coords_dims(array, *[, ...])

returns dict of {coord name: [dim name for all dims associated with this coord]}.

xarray_demote_index_coords(array[, coords])

demote '{cname}_index' dims to coords by promoting '{cname}' coords to dim instead.

xarray_differentiate(array, coord, *[, ...])

differentiate array along coord, treating array like it is an xarray.DataArray.

xarray_dims_coords(array, *[, ...])

returns dict of {dim name: [coord name for all coords with this dim]}.

xarray_fill_coords(array[, dim, need])

return copy of array with coords filled for indicated dims.

xarray_get_dx_along(array, coord, *[, atol, ...])

returns number equal to the diff along array.coords[coord], after checking that it is constant.

xarray_index_coords(array[, coords, ...])

return copy of array with coord_index coords telling np.arange() for each coord.

xarray_is_sorted(array, *[, increasing])

returns whether array is sorted; array must be 1D.

xarray_log_coords(array[, coords, newname, ...])

return copy of array with coords replaced by log coords (& renamed to log_coord)

xarray_mod_coords(array[, mod, missing_ok, ...])

return copy of array with coords modded (via np.mod) by mod.

xarray_nondim_coords(array, *[, ...])

returns dict of {coord name: coord.values} for all non-dimension coords (not in array.dims).

xarray_promote_index_coords(array[, coords])

promote to dims all '{cname}_index' coords for which '{cname}' is associated with a 1D dim.

xarray_scale_coords(array[, scale, missing_ok])

return copy of array with coords multiplied by scale.

xarray_shift_coords(array[, shift, missing_ok])

return copy of array with coords shifted by shift.

xarray_str_coords(array[, coords, newname, ...])

return copy of array with coords replaced by str coords (& renamed to str_coord)