2025-03-30 20:23:05 +00:00
|
|
|
Index: xarray-2025.03.0/xarray/tutorial.py
|
|
|
|
===================================================================
|
|
|
|
--- xarray-2025.03.0.orig/xarray/tutorial.py
|
|
|
|
+++ xarray-2025.03.0/xarray/tutorial.py
|
|
|
|
@@ -164,9 +164,11 @@ def open_dataset(
|
2025-03-30 08:22:22 +00:00
|
|
|
downloader = pooch.HTTPDownloader(headers=headers)
|
|
|
|
|
|
|
|
# retrieve the file
|
|
|
|
- filepath = pooch.retrieve(
|
|
|
|
- url=url, known_hash=None, path=cache_dir, downloader=downloader
|
|
|
|
- )
|
|
|
|
+ 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()
|