pmlmodelling / nctoolkit

A Python package for netCDF analysis and post-processing
https://nctoolkit.readthedocs.io/en/latest/
GNU General Public License v3.0
79 stars 11 forks source link

Caching for downloaded files #83

Closed malmans2 closed 1 year ago

malmans2 commented 1 year ago

I think it would be nice to implement caching for downloaded files (e.g., open_url and open_thredds). pooch might be a good library for that: https://www.fatiando.org/pooch/

robertjwilson commented 1 year ago

That's a good suggestion @malmans2. I've just raised an issue to implement it https://github.com/pmlmodelling/nctoolkit/issues/89.

This can maybe be solved for open_url by adding a dictionary that tracks which urls were downloaded and what the temp location is. Probably a simple enough bit of book-keeeping.