We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4426fd7 commit 7961f16Copy full SHA for 7961f16
src/anemoi/datasets/data/stores.py
@@ -102,7 +102,7 @@ def __contains__(self, key):
102
return key in self.store
103
104
105
-def open_zarr(path, dont_fail=False):
+def open_zarr(path, dont_fail=False, cache=None):
106
try:
107
store = path
108
@@ -117,6 +117,9 @@ def open_zarr(path, dont_fail=False):
117
store = zarr.storage.DirectoryStore(store)
118
store = DebugStore(store)
119
120
+ if cache is not None:
121
+ store = zarr.LRUStoreCache(store, max_size=cache)
122
+
123
return zarr.convenience.open(store, "r")
124
except zarr.errors.PathNotFoundError:
125
if not dont_fail:
0 commit comments