Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit dfb3355

Browse files
committed
Chain fsspec options correctly
1 parent 6be43c0 commit dfb3355

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nowcasting_dataset/data_sources/satellite/satellite_data_source.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,11 @@ def open_sat_data(
412412
# add logger to preprocess function
413413
p_dedupe_time_coords = partial(dedupe_time_coords, logger=logger)
414414
if str(zarr_path).split(".")[-1] == "zip":
415-
# Assumes in remote filesystem
416-
dataset = xr.open_dataset("zip::" + str(zarr_path), engine="zarr")
415+
if "s3://" or "gs://" in str(zarr_path):
416+
data_path = "zip::" + str(zarr_path)
417+
else:
418+
data_path = "zip://" + str(zarr_path)
419+
dataset = xr.open_dataset(data_path, engine="zarr")
417420

418421
else:
419422
# Open datasets.

0 commit comments

Comments
 (0)