ESMP is a Python interface to the Earth System Modeling Framework (ESMF) regridding utility. ESMF is software for building and coupling weather, climate, and related models. ESMF has a robust, parallel and scalable remapping package, used to generate remapping weights. It can handle a wide variety of grids and options: logically rectangular grids and unstructured meshes; regional or global grids; 2D or 3D; and pole and masking options.
ESMP supports a single-tile logically rectangular discretization type called ESMP_Grid and an unstructured discretization type called ESMP_Mesh (ESMF also supports observational data streams). ESMP supports bilinear, finite element patch recovery and first-order conservative regridding. There is also an option to ignore unmapped destination points and mask out points on either the source or destination. Regridding on the sphere takes place in 3D Cartesian space, so the pole problem is not an issue as it can be with other Earth system grid remapping software. Grid and Mesh objects can be created in 2D or 3D space, and 3D first-order conservative regridding is fully supported. Future plans for ESMP involve the incorporation of observational data streams.
There are currently two supported packages: ESMP and ESMPy. Both of these packages have the same general functionality. ESMP was a first prototype and ESMPy has a more Pythonic interface. After the ESMF_620 release (expected in May), the ESMP package will be deprecated and the ESMPy package will enter a beta phase. You can download both of these on the 'Download and Releases' page - the ESMP releases are in the top table and the ESMPy releases are in the bottom table.
Please see the latest ESMP documentation for more details on the Python interface.
Please see the latest ESMPy documentation for more details on the beta version of the interface.
More about regridding
Regridding, also called remapping or interpolation, is the process of changing the grid underneath field data values while preserving qualities of the original data. Different kinds of transformations are appropriate for different problems. Regridding may be needed when communicating data between Earth system model components such as land and atmosphere, or between different data sets to support analysis or visualization.
Regridding can be broken into two stages. The first stage is generation of an interpolation weight matrix that describes how points in the source grid contribute to points in the destination grid. The second stage is the multiplication of values on the source grid by the interpolation weight matrix to produce the appropriate values on the destination grid. ESMP provides access to both stages through two separate interfaces.
There are many different interpolation methods, suitable for different problems. In ESMP, the basic bilinear option is a two dimensional variant of linear interpolation. The higher order patch recovery is a second degree polynomial regridding method, which uses a least squares algorithm to calculate the polynomial. The first-order conservative regridding is a variant of a constant method which compares the proportions of overlapping source and destination cells to determine appropriate weights. All of these methods can be broken down to a simple sparse matrix multiplication operation between interpolation weights and data values.
This link gives more information on the ESMF regridding tool used to generate interpolation weights from files (ESMF_RegridWeightGen). This is a good way to explore the underlying ESMF regridding package with relatively little effort.
ESMP is being developed by the NOAA Environmental Software Infrastructure and Interoperability Group (NESII)