-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworksavecube #129
Reworksavecube #129
Conversation
…ify output chunks and compression.
@felixcremer can you try this branch and report problems you might still have? |
Codecov Report
@@ Coverage Diff @@
## master #129 +/- ##
==========================================
+ Coverage 46.56% 56.35% +9.79%
==========================================
Files 24 23 -1
Lines 2182 1879 -303
==========================================
+ Hits 1016 1059 +43
+ Misses 1166 820 -346
Continue to review full report at Codecov.
|
When I am trying to save a cube with this, I get a ERROR: type OutputCube has no field allaxes this is due to a typo in ESDL/src/DAT/DAT.jl:509 saveCube(kiuic_emd, "kiuic/s1cube_kiuic_new_emd2")
ERROR: type OutputCube has no field compressor
Stacktrace:
[1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
[2] (::getfield(ESDL.DAT, Symbol("##83#87")){ESDL.DAT.DATConfig{1,1},Array{NamedTuple{(:iloopax, :cs, :iscompressed, :innerleap),Tuple{Int64,Int64,Bool,Int64}},1}})(::RangeAxis{Dates.DateTime,:Time,Array{Dates.DateTime,1}}, ::Int64) at /home/qe89hep/.julia/dev/ESDL/src/DAT/DAT.jl:512
[3] foreach(::Function, ::Array{CubeAxis,1}, ::UnitRange{Int64}) at ./abstractarray.jl:1867
[4] getCacheSizes(::ESDL.DAT.DATConfig{1,1}) at /home/qe89hep/.julia/dev/ESDL/src/DAT/DAT.jl:498
[5] #mapCube#49(::Nothing, ::InDims, ::OutDims, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(mapCube), ::typeof(copyto!), ::Tuple{ESDL.Cubes.ConcatCube{Union{Missing, Float32},4}}) at /home/qe89hep/.julia/dev/ESDL/src/DAT/DAT.jl:265
[6] #mapCube at ./none:0 [inlined]
[7] #mapCube#34 at /home/qe89hep/.julia/dev/ESDL/src/DAT/DAT.jl:181 [inlined]
[8] #mapCube at ./none:0 [inlined]
[9] #saveCube#30(::Bool, ::NTuple{4,Int64}, ::Zarr.NoCompressor, ::Function, ::ESDL.Cubes.ConcatCube{Union{Missing, Float32},4}, ::String) at /home/qe89hep/.julia/dev/ESDL/src/Proc/CubeIO.jl:127
[10] saveCube(::ESDL.Cubes.ConcatCube{Union{Missing, Float32},4}, ::String) at /home/qe89hep/.julia/dev/ESDL/src/Proc/CubeIO.jl:110
[11] top-level scope at none:0 |
Reworksavecube fix saving of large cube
I think I am going to merge this one right now, so that we cann all work against master again. |
This is a rewrite of the
savecube
functionality, which also has some effect onmapCube
. The main change is some new keyword arguments tosaveCube
:overwrite
to enable automatic overwriting of existing cubeschunksize
to determine the chunksize of the saved cubecompressor
let the user specify compressionNote that this function should now work on any
AbstractCubeData
and therefore allows nice things like downloading a cube subset from S3 through:Under the hood this is possible because the
OutDims
constructor take the chunksize, compressor and path as arguments as well, so that basicallysaveCube
can fall back to amapCube
over the identity function, simply specifying the new output location and passing them toOutDims
.Along the way this should fix #128 and #125