JuliaDataCubes / JuliaDataCubes/EarthDataLab.jl

Test exporting a cubefromshape Cube

Open
#208 0 comments 0 reactions 1 assignee View on GitHub

@felixcremer is already working on this.

Since Feb 7, 2022.

Dominant language
Julia
Stars
34
Forks
14
PR merge metrics
No merged PRs in 30d

Description

When I load a shapefile with cubefromshape with samplefactor then I can't export it as a netcdf.

exportcube(small_kiuic_fullpix, "/home/crem_fe/Daten/small_kiuic_ref_fullpix.nc")
ERROR: MethodError: no method matching writefun(::Array{Union{Missing, Float64},0}, ::Array{Float64,1}, ::NamedTuple{(:Lat, :Label),Tuple{Tuple{Int64,Float64},Tuple{Int64,Float64}}}, ::Int64, ::Dict{Int64,String}, ::String)
Closest candidates are:
  writefun(::Any, ::AbstractArray{Union{Missing, T},N} where N, ::Any, ::Any, ::Any, ::Any; kwargs...) where T at /home/crem_fe/.julia/dev/ESDL/src/Proc/CubeIO.jl:50
Stacktrace:
 [1] innerLoop(::Tuple{UnitRange{Int64},UnitRange{Int64}}, ::Function, ::Tuple{Array{Float64,3}}, ::Tuple{Array{Union{Missing, Float64},2}}, ::Tuple{ESDL.ESDLTools.PickAxisArray{Float64,2,Array{Float64,3},(1, 2),1}}, ::Tuple{ESDL.ESDLTools.PickAxisArray{Union{Missing, Float64},2,Array{Union{Missing, Float64},2},(1, 2),0}}, ::Tuple{Tuple{ESDL.DAT.AllMissing}}, ::Tuple{Array{Array{Float64,1},1}}, ::Tuple{Array{Array{Union{Missing, Float64},0},1}}, ::ESDL.DAT.AllLoopAxes{Tuple{Symbol,Symbol},Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}}, ::Tuple{Int64,Dict{Int64,String},String}, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:650
 [2] runLoopArgs(::ESDL.DAT.DATConfig{1,1}, ::Tuple{typeof(ESDL.Proc.CubeIO.writefun),Tuple{Array{Float64,3}},Tuple{Array{Union{Missing, Float64},2}},Tuple{ESDL.ESDLTools.PickAxisArray{Float64,2,Array{Float64,3},(1, 2),1}},Tuple{ESDL.ESDLTools.PickAxisArray{Union{Missing, Float64},2,Array{Union{Missing, Float64},2},(1, 2),0}},Tuple{Tuple{ESDL.DAT.AllMissing}},Tuple{Array{Array{Float64,1},1}},Tuple{Array{Array{Union{Missing, Float64},0},1}},ESDL.DAT.AllLoopAxes{Tuple{Symbol,Symbol},Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}},Tuple{Int64,Dict{Int64,String},String},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::Base.Iterators.ProductIterator{Tuple{Array{UnitRange{Int64},1},Array{UnitRange{Int64},1}}}, ::Bool) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:411
 [3] runLoop(::ESDL.DAT.DATConfig{1,1}, ::Base.Iterators.ProductIterator{Tuple{Array{UnitRange{Int64},1},Array{UnitRange{Int64},1}}}, ::Bool) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:404
 [4] runLoop(::ESDL.DAT.DATConfig{1,1}, ::Bool) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:348
 [5] mapCube(::typeof(ESDL.Proc.CubeIO.writefun), ::Tuple{CubeMem{Float64,3}}, ::Int64, ::Vararg{Any,N} where N; max_cache::Float64, indims::InDims, outdims::OutDims, inplace::Bool, ispar::Bool, debug::Bool, include_loopvars::Bool, showprog::Bool, nthreads::Array{Int64,1}, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:278
 [6] mapCube(::Function, ::CubeMem{Float64,3}, ::Int64, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Symbol,Any,NTuple{5,Symbol},NamedTuple{(:indims, :include_loopvars, :ispar, :max_cache, :nthreads),Tuple{InDims,Bool,Bool,Float64,Array{Int64,1}}}}) at /home/crem_fe/.julia/dev/ESDL/src/DAT/DAT.jl:184
 [7] exportcube(::CubeMem{Float64,3}, ::String; priorities::Dict{String,Int64}, proj::Dict{String,Any}, forcecont::Tuple{}) at /home/crem_fe/.julia/dev/ESDL/src/Proc/CubeIO.jl:112
 [8] exportcube(::CubeMem{Float64,3}, ::String) at /home/crem_fe/.julia/dev/ESDL/src/Proc/CubeIO.jl:84
 [9] top-level scope at none:0

This is on the fc/wrap2 branch and I am reporting this here, so that we can test for this after we merged SplitPackages.
Saving as a zarrcube works, but

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.