check if states are covered using statevars() #61
Labels
duplicate
This issue or pull request already exists
user-experience
Improvements to the settings file, logging, error handling, etc.
When turning of the reservoirs using the option reservoirs=false in the toml file, the following error is thrown. Solved by commenting the reservoir state section, nice to have this automatically taken care of by the code.
ERROR: type Nothing has no field volume
Stacktrace:
[1] getproperty(::Nothing, ::Symbol) at .\Base.jl:33
[2] BottomRF at .\reduce.jl:81 [inlined]
[3] afoldl(::Base.BottomRF{typeof(getproperty)}, ::Nothing, ::Symbol) at .\operators.jl:525
[4] afoldl(::Base.BottomRF{typeof(getproperty)}, ::Wflow.SurfaceFlow{Float64,Nothing,Nothing}, ::Symbol, ::Symbol) at .\operators.jl:526 (repeats 3 times)
[5] _foldl_impl at .\tuple.jl:207 [inlined]
[6] foldl_impl at .\reduce.jl:48 [inlined]
[7] mapfoldl_impl at .\reduce.jl:44 [inlined]
[8] #mapfoldl#204 at .\reduce.jl:160 [inlined]
[9] #foldl#205 at .\reduce.jl:178 [inlined]
[10] param(::NamedTuple{(:vertical, :lateral),Tuple{Wflow.SBM{Float64,4,5},NamedTuple{(:subsurface, :land, :river),Tuple{Wflow.LateralSSF{Float64},Wflow.SurfaceFlow{Float64,Nothing,Nothing},Wflow.SurfaceFlow{Float64,Nothing,Nothing}}}}}, ::NTuple{4,Symbol}) at C:\Users\hegnauer.julia\dev\Wflow\src\io.jl:17
[11] out_map(::Dict{Tuple{Symbol,Vararg{Symbol,N} where N},String}, ::NamedTuple{(:vertical, :lateral),Tuple{Wflow.SBM{Float64,4,5},NamedTuple{(:subsurface, :land, :river),Tuple{Wflow.LateralSSF{Float64},Wflow.SurfaceFlow{Float64,Nothing,Nothing},Wflow.SurfaceFlow{Float64,Nothing,Nothing}}}}}) at C:\Users\hegnauer.julia\dev\Wflow\src\io.jl:578
[12] prepare_writer(::Wflow.Config, ::Wflow.NCReader{Float32}, ::String, ::NamedTuple{(:vertical, :lateral),Tuple{Wflow.SBM{Float64,4,5},NamedTuple{(:subsurface, :land, :river),Tuple{Wflow.LateralSSF{Float64},Wflow.SurfaceFlow{Float64,Nothing,Nothing},Wflow.SurfaceFlow{Float64,Nothing,Nothing}}}}}, ::Dict{Tuple{Symbol,Vararg{Symbol,N} where N},String}, ::NamedTuple{(:land, :river, :reservoir, :lake),Tuple{Array{Int64,2},Array{Int64,2},Nothing,Nothing}}, ::Array{Float64,1}, ::Array{Float64,1}, ::Bool, ::NCDatasets.NCDataset{Nothing}; maxlayers::Int64) at C:\Users\hegnauer.julia\dev\Wflow\src\io.jl:623
[13] initialize_sbm_model(::Wflow.Config) at C:\Users\hegnauer.julia\dev\Wflow\src\sbm_model.jl:209
[14] top-level scope at REPL[9]:1
The text was updated successfully, but these errors were encountered: