# Pyinterp 2026.11.0: fast interpolation and conservative regridding from xarray

**URL:** <https://discourse.pangeo.io/t/pyinterp-2026-11-0-fast-interpolation-and-conservative-regridding-from-xarray/5872>\
**Category:** News & Announcements\
**Created:** [November 1, 2026, 7:48am UTC](https://discourse.pangeo.io/t/pyinterp-2026-11-0-fast-interpolation-and-conservative-regridding-from-xarray/5872 "2026-11-01T07:48:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbriol](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/fbriol/32/93_2.png) [@fbriol](https://discourse.pangeo.io/u/fbriol)\
**Post date:** [November 1, 2026, 7:48am UTC](https://discourse.pangeo.io/t/pyinterp-2026-11-0-fast-interpolation-and-conservative-regridding-from-xarray/5872/1 "2026-11-01T07:48:05Z")

</div>

Hi everyone,

pyinterp 2026.11.0 is out. pyinterp is an open-source Python library for fast interpolation of geo-referenced data, and this release makes it available directly from xarray.

```python
import numpy as np
import pyinterp
import xarray as xr

da = xr.open_dataset("sst.nc")["sst"]

# Bilinear interpolation onto a 0.1° grid
fine = da.pyinterp.interp(lon=np.arange(-180, 180, 0.1), lat=np.arange(-80, 80, 0.1))

# Conservative regridding onto a 1° grid
coarse = da.pyinterp.regrid(lon=np.arange(0.5, 360), lat=np.arange(-89.5, 90))

```

**What’s new**

- **xarray accessor** : `da.pyinterp.interp` and `ds.pyinterp.interp` follow `DataArray.interp`, and the result keeps its labels and attributes.
- **Periodic longitudes** : a grid stored in [0, 360) can be queried in [-180, 180) with no padding. In the example above, the source grid and the target grid use different conventions.
- **Conservative regridding** : `da.pyinterp.regrid` works between rectilinear grids, on a sphere or an ellipsoid. It computes no 2D weights, so there is nothing to generate or store.
- **Reduced Gaussian grids** : ECMWF grids can be interpolated in 2D, 3D and time from plain arrays, with no GRIB library needed.
- **Python 3.15** : wheels are available for CPython 3.12 and later, including free-threaded builds.

**Performance**

On a global 0.25° grid, measured on an Apple M3 Max:

- One million scattered points, bilinear: 20 ms on one thread, against 99 ms for `scipy.interpolate.RegularGridInterpolator`, and 2.6 ms on all cores.
- Conservative regridding to 1°: 1.2 ms on one thread, against 118 ms for xESMF to apply its weights, after 11 s to compute them.

xESMF does more than this: it also handles curvilinear and unstructured grids. The two tools also define cells differently, along parallels for pyinterp and great circles for ESMF. The benchmarks page explains these differences and how to run the comparison yourself: [Benchmarks — pyinterp](https://cnes.github.io/pangeo-pyinterp/benchmarks.html)

**Install**

```shell
pip install "pyinterp[xarray]"

```

or

```shell
mamba install -c conda-forge pyinterp

```

Full release notes: [Release 2026.11.0 · CNES/pangeo-pyinterp · GitHub](https://github.com/CNES/pangeo-pyinterp/releases/tag/2026.11.0)  
Documentation: [pyinterp — pyinterp](https://cnes.github.io/pangeo-pyinterp/)

Feedback and bug reports are very welcome.
