Skip to content

Commit

Permalink
Merge branch 'main' into inline_chunkdata
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Apr 5, 2024
2 parents d27ba38 + 1fc3f0b commit 5733185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"xarray",
"kerchunk",
"kerchunk==0.2.2",
"pydantic",
"packaging",
]
Expand Down
8 changes: 4 additions & 4 deletions virtualizarr/kerchunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,24 @@ def read_kerchunk_references_from_file(

if filetype.name.lower() == "netcdf3":
from kerchunk.netCDF3 import NetCDF3ToZarr
refs = NetCDF3ToZarr(filepath).translate()
refs = NetCDF3ToZarr(filepath, inline_threshold=0).translate()

elif filetype.name.lower() == "netcdf4":
from kerchunk.hdf import SingleHdf5ToZarr

refs = SingleHdf5ToZarr(filepath).translate()
refs = SingleHdf5ToZarr(filepath, inline_threshold=0).translate()
elif filetype.name.lower() == "grib":
# TODO Grib files should be handled as a DataTree object
# see https://github.com/TomNicholas/VirtualiZarr/issues/11
raise NotImplementedError(f"Unsupported file type: {filetype}")
elif filetype.name.lower() == "tiff":
from kerchunk.tiff import tiff_to_zarr

refs = tiff_to_zarr(filepath)
refs = tiff_to_zarr(filepath, inline_threshold=0)
elif filetype.name.lower() == "fits":
from kerchunk.fits import process_file

refs = process_file(filepath)
refs = process_file(filepath, inline_threshold=0)
else:
raise NotImplementedError(f"Unsupported file type: {filetype.name}")

Expand Down

0 comments on commit 5733185

Please sign in to comment.