Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The pre-generated interpolation matrices and the index json file describing them are now hosted under: https://get.ecmwf.int/repository/earthkit/regrid/matrices including the following input and output grids:
The git repo itself does not contain the json index file and any of the matrices. All of these are downloaded on demand and stored in a cache on disk. To implement this I took the caching code from
earthkit-data
. However, the settings code was not taken and the cache is simply controlled by a hard-coded settings dict.For testing purposes it is possible to use an index json file and matrices stored at a user defined path. This can be initiated by using the
earthkit.regrid.db._use_local_index
context manager. The tests intests/test_local.py
are using this technique to work with the index+matrix data stored intests/data/local
.I added proper checks for the input and output gridspecs, e.g. sub-areas are now recognised and rejected. I had to reuse some
gridspec
code from theearthkit-data/feature/gridspec
branch to implement this.A notebook example is available at: https://earthkit-regrid.readthedocs.io/en/feature-remote-matrices/examples/interpolation.html
TODO