Is there a plan to support variable-length (per-axis irregular) chunks in Zarr v3?
The two relevant extensions are rectangular (ZEP 0003) and rectilinear (zarr-extensions) — both currently experimental. Reference impl: zarrs (Rust) has both.
Today Zarr.jl rejects anything but regular:
|
# Chunk Grid |
|
chunk_grid = d["chunk_grid"] |
|
if chunk_grid["name"] == "regular" |
|
chunks = Int.(chunk_grid["configuration"]["chunk_shape"]) |
|
if length(shape) != length(chunks) |
|
throw(ArgumentError("Shape has rank $(length(shape)) which does not match the chunk_shape rank of $(length(chunks))")) |
|
end |
|
else |
|
throw(ArgumentError("Unknown chunk_grid of name, $(chunk_grid["name"])")) |
|
end |
This will be useful for distributed output in Oceananigans with variably-sized partitions, eg when the simulation is divided into regions that communicate via MPI, but those regions have different sizes (because of continents) in order to balance the load between different nodes.
cc @simone-silvestri, @vopikamm, @giordano
Is there a plan to support variable-length (per-axis irregular) chunks in Zarr v3?
The two relevant extensions are
rectangular(ZEP 0003) andrectilinear(zarr-extensions) — both currently experimental. Reference impl:zarrs(Rust) has both.Today Zarr.jl rejects anything but
regular:Zarr.jl/src/metadata3.jl
Lines 214 to 223 in 03270b2
This will be useful for distributed output in Oceananigans with variably-sized partitions, eg when the simulation is divided into regions that communicate via MPI, but those regions have different sizes (because of continents) in order to balance the load between different nodes.
cc @simone-silvestri, @vopikamm, @giordano