xoa.grid.pad¶
-
xoa.grid.pad(da, pad_width, mode='edge', coord_mode='linear_extrap', name_kwargs=None, **kwargs)[source]¶ Pad data and coordinates along dimensions
This function adds the
"linear_extrap"mode support to the builtinxarray.DataArray.pad()methods.- Parameters
da (xarray.DataArray) –
pad_width (dict) – Pad widths. Keys are dimensions and values are int or tuple of ints.
mode (str) – Extrapolation mode for the data array
coord_mode (str) – Extrapolation mode for the coordinates
name_kwargs (dict(dict)) – Keys are coordinates names and valkues are parameters to pass to
xarray.pad()for this coordinate arraykwargs – Extra arguments are passed to
xarray.pad()
- Returns
xarray.DataArray
See also
get_centers,get_edges,apply_along_dim,xarray.pad