Skip to content
Discussion options

You must be logged in to vote

This is one way (note asynchronous=True in remote_options).:

import json

import xarray as xr

with open("mur_kerchunk.json", "r") as f:
    refs = json.load(f)

backend_args = {"consolidated": False, "storage_options": {"fo": refs, "remote_protocol": "s3", "remote_options": {"anon": True, "asynchronous": True, }}}
ds = xr.open_dataset("reference://", engine="zarr", backend_kwargs=backend_args)
print(ds)

or another:

import json

import fsspec
import xarray as xr
import zarr
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper

with open("mur_kerchunk.json", "r") as f:
    refs = json.load(f)

fs = fsspec.filesystem("reference", fo=refs, remote_protocol = "s3", remote_opt…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@martindurant
Comment options

@maxrjones
Comment options

@martindurant
Comment options

Answer selected by betolink
Comment options

You must be logged in to vote
1 reply
@martindurant
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants