Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Last active November 10, 2024 03:50
Show Gist options
  • Save mdsumner/36486aad5bbe6d3cb1c15bc7371902d0 to your computer and use it in GitHub Desktop.
Save mdsumner/36486aad5bbe6d3cb1c15bc7371902d0 to your computer and use it in GitHub Desktop.

def open_virtual(filepath, creds): ds = open_virtual_dataset(filepath, indexes = {}, loadable_variables=['x', 'y', 'time', 'crs'], decode_times = True, reader_options={'storage_options': creds})

zarr-developers/VirtualiZarr#291

from virtualizarr import open_virtual_dataset
import fsspec
import glob
from virtualizarr.backend import FileType

files = glob.glob("./**/*.tif", recursive = True)

open_virtual_dataset(files[0], filetype = FileType.tiff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment