MetOffice / CSET

Toolkit for evaluation and investigation of numerical models for weather and climate applications.
https://metoffice.github.io/CSET/
Apache License 2.0
8 stars 1 forks source link

Add regrid caching for regrid operator on multiple cubes #720

Open jwarner8 opened 6 days ago

jwarner8 commented 6 days ago

What problem does your feature request solve?

Caching a regridder can speed up code when applying a regrid operation to multiple cubes (sequentially), when using a target cube.

Describe the solution you'd like

Implement regrid cache.

Links to #721

jwarner8 commented 6 days ago

Caching a regridder requires a target grid. This is simple for regrid_onto_cube, as we have a target cube by definition. This is not the case for regrid_onto_xyspacing. So I will rebase from a branch linked to issue #721 when we have the ability to run over multiple cubes - and then if a cubelist is supplied to this function, run first cube as currently applied, and cache regridder, and then for subsequent cubes, use cached regridder.