Skip to content

Commit 7a1ccbe

Browse files
Fix loading dimensions on ugrids
1 parent 1fd82a8 commit 7a1ccbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/parcels/_core/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def to_windowed_arrays(self, *, max_levels: int | None = None) -> Self:
105105
windowed = self.__dict__.setdefault("_windowed", {})
106106
for dim in ["lon", "lat"]:
107107
# ensure lon and lat are loaded into memory for dask-backed datasets
108-
if is_dask_collection(self.data[dim]):
108+
if dim in self.data and is_dask_collection(self.data[dim]):
109109
self.data[dim].load()
110110
if "depth" in self.data.dims and is_dask_collection(self.data["depth"]):
111111
self.data["depth"].load()

0 commit comments

Comments
 (0)