# Why invent a new regridding package?

## For scientific correctness

Traditional interpolation routines, such as interp2d in Scipy and interp2 in MATLAB, assume flat 2D planes and do not consider the spherical geometry of the earth. They are great for image processing, but will produce incorrect/distorted results for geospatial data.

Also, traditional interpolation algorithms are typically based on piecewise polynomials (“splines”). While being highly accurate in terms of error convergence, they often lack desired physical properties such as conservation (total mass should be conserved) and monotonicity (air density cannot go negative).

## For emerging new grid types

Non-orthogonal grids are becoming popular in numerical models (Staniforth and Thuburn 2012), but traditional tools often assume standard lat-lon grids.

xESMF can regrid between general curvilinear (i.e. quadrilateral or “logically rectilinear”) grids, like

The Cubed-Sphere grid in GFDL-FV3

The Lambert Conformal grid in WRF

However, xESMF does not yet support non-quadrilateral grids, like the hexagonal grid in MPAS. See Irregular meshes for more information.

## For usability and simplicity

Current geospatial regridding tools tend to have non-trivial learning curves. xESMF tries to be simple and intuitive. Instead of inventing a new data structure, it relies on well-established standards (numpy and xarray), so users don’t need to learn a bunch of new syntax or even a new software stack.

xESMF can track metadata in `xarray.DataArray`

/ `xarray.Dataset`

, and
also work with basic `numpy.ndarray`

.
This means any Python users can use it easily, even if unfamiliar with xarray.

The choice of Python and Anaconda also makes xESMF extremely easy to install.