2021-05-27 06:19:25 +00:00
|
|
|
---
|
|
|
|
xarray/tutorial.py | 5 ++++-
|
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
--- a/xarray/tutorial.py
|
|
|
|
+++ b/xarray/tutorial.py
|
2022-10-18 22:26:22 +00:00
|
|
|
@@ -156,7 +156,10 @@ def open_dataset(
|
2021-05-27 06:19:25 +00:00
|
|
|
url = f"{base_url}/raw/{version}/{path.name}"
|
|
|
|
|
|
|
|
# retrieve the file
|
|
|
|
- filepath = pooch.retrieve(url=url, known_hash=None, path=cache_dir)
|
|
|
|
+ fname = pathlib.Path(cache_dir, path).expanduser()
|
|
|
|
+ if not fname.exists():
|
|
|
|
+ fname = None
|
|
|
|
+ filepath = pooch.retrieve(url=url, fname=fname, known_hash=None, path=cache_dir)
|
|
|
|
ds = _open_dataset(filepath, engine=engine, **kws)
|
|
|
|
if not cache:
|
|
|
|
ds = ds.load()
|