JuliaDataCubes / EarthDataLab.jl

Julia interface for Reading from the Earth System Datacube
http://earthsystemdatacube.net
Other
33 stars 14 forks source link

Can't access the high resolution esdc #253

Closed felixcremer closed 2 years ago

felixcremer commented 3 years ago

When I try to access the high resolution esdc dataset I get the following error:

1

esdc(res="high")

BoundsError

Stacktrace:
  [1] _copyto_impl!(dest::Vector{Int64}, doffs::Int64, src::Vector{Int64}, soffs::Int64, n::Int64)
    @ Base ./array.jl:311
  [2] copyto!
    @ ./array.jl:304 [inlined]
  [3] copyto!
    @ ./array.jl:328 [inlined]
  [4] zuncompress!
    @ ~/.julia/packages/Zarr/Cv0sj/src/Compressors.jl:19 [inlined]
  [5] zuncompress!(data::Vector{Int64}, compressed::Vector{UInt8}, c::Zarr.BloscCompressor, #unused#::Nothing)
    @ Zarr ~/.julia/packages/Zarr/Cv0sj/src/Compressors.jl:12
  [6] readchunk!(a::Vector{Int64}, z::Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, i::CartesianIndex{1})
    @ Zarr ~/.julia/packages/Zarr/Cv0sj/src/ZArray.jl:183
  [7] (::Zarr.var"#48#51"{Bool, OffsetArrays.OffsetVector{Int64, Vector{Int64}}, Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, CartesianIndices{1, Tuple{Base.OneTo{Int64}}}, Vector{Int64}})(bI::CartesianIndex{1})
    @ Zarr ~/.julia/packages/Zarr/Cv0sj/src/ZArray.jl:154
  [8] foreach
    @ ./abstractarray.jl:2141 [inlined]
  [9] readblock!(aout::Vector{Int64}, z::Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, r::CartesianIndices{1, Tuple{Base.OneTo{Int64}}}; readmode::Bool)
    @ Zarr ~/.julia/packages/Zarr/Cv0sj/src/ZArray.jl:144
 [10] readblock!
    @ ~/.julia/packages/Zarr/Cv0sj/src/ZArray.jl:138 [inlined]
 [11] readblock!(a::Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, aout::Vector{Int64}, i::Base.OneTo{Int64})
    @ Zarr ~/.julia/packages/Zarr/Cv0sj/src/ZArray.jl:167
 [12] getindex_disk(a::Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, i::Function)
    @ DiskArrays ~/.julia/packages/DiskArrays/cT2BB/src/DiskArrays.jl:60
 [13] getindex(a::Zarr.ZArray{Int64, 1, Zarr.BloscCompressor, Zarr.ConsolidatedStore{Zarr.S3Store}}, i::Function)
    @ DiskArrays ~/.julia/packages/DiskArrays/cT2BB/src/DiskArrays.jl:195
 [14] toaxis(dimname::String, g::YAXArrayBase.ZarrDataset, offs::Int64, len::Int64)
    @ YAXArrays.Datasets ~/Documents/Programmieren/ESDLTutorials/dev/YAXArrays/src/DatasetAPI/Datasets.jl:123
 [15] (::YAXArrays.Datasets.var"#28#30"{YAXArrayBase.ZarrDataset})(d::Tuple{String, Int64, Int64})
    @ YAXArrays.Datasets ./none:0
 [16] iterate
    @ ./generator.jl:47 [inlined]
 [17] _all(f::Base.var"#282#284", itr::Base.Generator{Set{Tuple{String, Int64, Int64}}, YAXArrays.Datasets.var"#28#30"{YAXArrayBase.ZarrDataset}}, #unused#::Colon)
    @ Base ./reduce.jl:922
 [18] all
    @ ./reduce.jl:918 [inlined]
 [19] Dict(kv::Base.Generator{Set{Tuple{String, Int64, Int64}}, YAXArrays.Datasets.var"#28#30"{YAXArrayBase.ZarrDataset}})
    @ Base ./dict.jl:131
 [20] collectdims(g::YAXArrayBase.ZarrDataset)
    @ YAXArrays.Datasets ~/Documents/Programmieren/ESDLTutorials/dev/YAXArrays/src/DatasetAPI/Datasets.jl:106
 [21] open_dataset(g::Zarr.ZGroup{Zarr.ConsolidatedStore{Zarr.S3Store}}; driver::Symbol)
    @ YAXArrays.Datasets ~/Documents/Programmieren/ESDLTutorials/dev/YAXArrays/src/DatasetAPI/Datasets.jl:173
 [22] open_dataset(g::Zarr.ZGroup{Zarr.ConsolidatedStore{Zarr.S3Store}})
    @ YAXArrays.Datasets ~/Documents/Programmieren/ESDLTutorials/dev/YAXArrays/src/DatasetAPI/Datasets.jl:171
 [23] esdd(; bucket::Nothing, store::String, res::String, chunks::String, region::String)
    @ ESDL.ESDC ~/.julia/packages/ESDL/WQWro/src/esdc.jl:50
 [24] #esdc#2
    @ ~/.julia/packages/ESDL/WQWro/src/esdc.jl:69 [inlined]
 [25] top-level scope
    @ In[32]:1
 [26] eval
    @ ./boot.jl:360 [inlined]
 [27] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1094

This is in a jupyter notebook with Julia version 1.6.1 and the current master of ESDL. I didn't look further into it. The access to the low resolution cube works.

felixcremer commented 2 years ago

This seems to work at the moment.