emissions-api / sentinel5dl

Sentinel-5(P) Downloader
https://sentinel5dl.emissions-api.org
MIT License
12 stars 9 forks source link

Store also hash files #23

Closed shaardie closed 4 years ago

shaardie commented 4 years ago

We should store the hash files after we have downloaded them. So we can check if the hash file matches the downloaded .nc file without any network connection. This is pretty handy, since the ESA website is painfully slow even for the hash files.

lkiesow commented 4 years ago

The idea for this would basically be that if we request a checksum, we store it in a file called something like filename-of-the-nc-file.nc.md5sum and before making the request, we check if such a file exists and use its content instead of making an HTTP request.

The code in question would be:

https://github.com/emissions-api/sentinel5dl/blob/03f4148332a9b7cba0b8ea420aa0fb885d234694/sentinel5dl/__init__.py#L146-L150