JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

Chunksize after saving not as expected

Open
#137 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
132
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi,
I have saved a cube (gdal vrt) into zarr format using:

YAXArray with the following dimensions                                                                                                                                            
Y                   Axis with 20031 Elements from 8.999672143000053 to 10.798997657091446                                                                                            
X                   Axis with 11121 Elements from 56.84381181516477 to 55.84488521922387                                                                                             
Time             Axis with 243 Elements from 2020-01-03T00:00:00 to 2020-12-31T00:00:00                                                                                           
name: layer                                                                                                                                                                  
Total size: 201.66 GB

let
    cubepath=joinpath(path_out, "$(start_date)_$(end_date).zarr")
    if !isdir(cubepath)
	    savecube(cube, cubepath, chunksize=Dict("Time"=>1, "X"=>256, "Y"=>256))
    end
end

When I load the cube again and check the chunk size it has a different chunk size:

julia> YAXArrays.Cubes.cubechunks(cube)
(20031, 512, 1)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the savecube call with chunksize set for Time, X, and Y, then reload the Zarr cube and inspect it with cubechunks(cube). Compare the requested chunk sizes with the returned tuple; done means the reloaded cube reports the configured chunking or clearly documents the conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.