ecmwf / earthkit-regrid

1 stars 0 forks source link

Disable remote matrix file checking when lookup in cache #30

Closed sandorkertesz closed 2 weeks ago

sandorkertesz commented 2 weeks ago

This PR fixes an issue when calling interpolate() and reading an interpolation matrix from the cache unnecessarily invoked the checking of remote matrix files on the download server (get.ecwmf.int). This check is executed by calling HTTPDownloaderBase.out_of_date() from multiurl, which sends a head request to the download server and compares the result to the cached metadata. However, out_of_date() always returns False due to the settings of the download server, so this check is unnecessary and just puts extra burden on the download server.

The check is disabled now. When needed the option triggering it can be exposed to the users either as a kwarg to interpolate() or as a settings (yet to be implemented).