There are a number of objects which can be used to regrid Iris cubes. These each have their own quirks which this page aims to describe.
The top level objects provided by iris-esmf-regrid as the schemes,
these are designed to behave the same as the schemes in
iris.analysis. The three schemes iris-esmf-regrid provides
ESMFNearest. These wrap the ESMF
The schemes can be by the pattern:
result_cube = source_cube.regrid(target_cube, ESMFAreaWeighted())
These schemes are flexible and allow the source or target cube to be defined on an unstructured mesh while the other cube is define on a structured grid.
The regridders are objects one level down from schemes. A regridder
is a class which is designed to handle the regridding of data from
one specific source to one specific target. Regridders are useful
because regridding involves a computationally expensive intitialisation
step which can be avoided whenever a regridder is reused.
iris-esmf-regrid provides the regridders
ESMFNearestRegridder which correspond to
These can be initialised either by:
regridder = ESMFAreaWeightedRegridder(source_cube, target_cube)
or equivalently by:
regridder = ESMFAreaWeighted().regridder(source_cube, target_cube)
This regridder can then be called by:
result_cube = regridder(source_cube, target_cube)
which can be reused on any cube defined on the same horizontal
There are also the experimental regridders
These were formerly the only way to do regridding with a source or
target cube defined on an unstructured mesh. These are less flexible and
require that the source/target be defined on a grid/mesh. Unlike the above
regridders whose method is fixed, these regridders take a
nearest. While most of the
functionality in these regridders have been ported into the above schemes and
regridders, these remain the only regridders capable of being saved and loaded by
Overview: Miscellaneous Functions#
result = regrid_rectilinear_to_rectilinear(source_cube, target_cube)
This function also has a
method keyword which can be
conservative being the default.
Differences Between Methods#
This section is under development, for more details see the API documentation.