xoa.regrid.extrap1d#
- xoa.regrid.extrap1d(da, dim, mode, dask='parallelized')[source]#
Extrapolate along a single dimension
Fills NaN values at the edges of
dimby nearest-neighbor extrapolation. Name, attributes and coordinates are preserved.- Parameters:
da (xarray.DataArray) – Array to extrapolate.
dim (str) – Dimension along which to extrapolate.
mode (str, int) – Extrapolation mode as one of the following:
0|"no"|"none"|"false",1|"top"|"above"|"after",-1|"bottom"|"below",2|"both"|"all"|"yes"|"true"dask (str) – See
xarray.apply_ufunc().
- Returns:
xarray.DataArray – Extrapolated array.
Example
Fill NaN values at both ends along the
"y"dimension:vo = extrap1d(vi, "y", mode="both")
See also