Why inventing 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 Lambert Conformal grid in WRF
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 syntaxes or even a new software stack.
xESMF can track metadata in
also work with basic
This means any Python users can use it easily, even if being unfamiliar with xarray.
The choice of Python and Anaconda also makes xESMF extremely easy to install.