Skip to content

Debug cubed + NLDAS virtual store on the VEDA Hub #292

Description

@maxrjones

Opening a ticket for tracking - I tried to use coiled with the NLDAS virtual store on the VEDA Hub and it fails silently. I think this may be related to a Hub issue (https://developmentseed.slack.com/archives/C04R9B69T5W/p1764968671305229).

Here's a MVCe (notice that "Cubed success" is never printed):

# /// script
# requires-python = ">=3.10"
# dependencies = [
#     "icechunk",
#     "xarray",
#     "zarr",
#     "cubed",
#     "cubed-xarray",
#     "dask",
# ]
# ///
print("starting")
import icechunk
import xarray as xr
import warnings

warnings.filterwarnings(
    "ignore",
    message="Numcodecs codecs are not in the Zarr version 3 specification*",
    category=UserWarning
)

# Open icechunk repository
storage = icechunk.s3_storage(
    bucket='nasa-waterinsight',
    prefix=f"virtual-zarr-store/NLDAS-3-icechunk",
    region="us-west-2",
    anonymous=True,
)

chunk_url = "s3://nasa-waterinsight/NLDAS3/forcing/daily/"
virtual_credentials = icechunk.containers_credentials({
    chunk_url: icechunk.s3_anonymous_credentials()
})

repo = icechunk.Repository.open(
    storage=storage,
    authorize_virtual_chunk_access=virtual_credentials,
)

session = repo.readonly_session('main')
ds = xr.open_zarr(session.store, consolidated=False, zarr_format=3, chunks={}, chunked_array_type="dask")
tair = ds["Tair"].sel(time="2001-01-02", lat=slice(10, 15), lon=slice(-60, -55))
data = tair.load()
print("Dask success")

ds = xr.open_zarr(session.store, consolidated=False, zarr_format=3, chunks={}, chunked_array_type="cubed")
tair = ds["Tair"].sel(time="2001-01-02", lat=slice(10, 15), lon=slice(-60, -55))
data = tair.load()
print("Cubed success")

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions