Open BSchilperoort opened 6 days ago
Thanks for reporting this. This is indeed very unfortunate at this stage, but it is related to the changes we are making w.r.t. v1.0 (hence the changes in toml). If you want to run the model, I would advise to download the toml file that matches version of wflow. In terms of the download link, that would look like:
toml_url = "https://raw.githubusercontent.com/Deltares/Wflow.jl/v0.8.1/test/sbm_config.toml"
This should enable you to start the simulation.
Hi Joost, thanks for the reply. I have the example running now.
Wflow version checks
[x] I have checked that this issue has not already been reported.
[x] I have checked that this bug exists on the latest version of Wflow.
Reproducible Example
Current behaviour
Wflow returns the error "type SBM has no field soil"
Full error trace
```jl [ Info: Wflow version v0.8.0 [ Info: Initialize model variables for model type sbm. [ Info: Cyclic parameters are provided by data/input/staticmaps-moselle.nc. [ Info: Forcing parameters are provided by data/input/forcing-moselle.nc. [ Info: Set vertical.atmospheric_forcing.precipitation using netCDF variable precip as forcing parameter. [ Info: Set vertical.atmospheric_forcing.temperature using netCDF variable temp as forcing parameter. [ Info: Set vertical.atmospheric_forcing.potential_evaporation using netCDF variable pet as forcing parameter. [ Info: Set vertical.vegetation_parameter_set.leaf_area_index using netCDF variable LAI as cyclic parameter, with 12 timesteps. ┌ Info: General model settings │ reservoirs = true │ lakes = false │ snow = true │ masswasting = true └ glacier = false [ Info: Set subcatchment using netCDF variable wflow_subcatch. [ Info: Set river_location using netCDF variable wflow_river. [ Info: Set lateral.river.width using netCDF variable wflow_riverwidth. [ Info: Set lateral.river.length using netCDF variable wflow_riverlength. [ Info: Set vertical.cfmax using default value 3.75653. [ Info: Set vertical.tt using default value 0.0. [ Info: Set vertical.tti using default value 1.0. [ Info: Set vertical.ttm using default value 0.0. [ Info: Set vertical.whc using default value 0.1. [ Info: Set vertical.w_soil using default value 0.1125. [ Info: Set vertical.cf_soil using default value 0.038. [ Info: Set vertical.g_tt using default value 0.0. [ Info: Set vertical.g_cfmax using default value 3.0. [ Info: Set vertical.g_sifrac using default value 0.001. [ Info: Set vertical.glacierfrac using default value 0.0. [ Info: Set vertical.glacierstore using default value 5500.0. [ Info: Set vertical.theta_s using default value 0.6. [ Info: Set vertical.theta_r using default value 0.01. [ Info: Set vertical.kv_0 using default value 3000.0. [ Info: Set vertical.f using default value 0.001. [ Info: Set vertical.hb using default value -10.0. [ Info: Set vertical.h1 using default value 0.0. [ Info: Set vertical.h2 using default value -100.0. [ Info: Set vertical.h3_high using default value -400.0. [ Info: Set vertical.h3_low using default value -1000.0. [ Info: Set vertical.h4 using default value -15849.0. [ Info: Set vertical.alpha_h1 using default value 1.0. [ Info: Set vertical.soilthickness using default value 2000.0. [ Info: Set vertical.infiltcappath using default value 10.0. [ Info: Set vertical.infiltcapsoil using default value 100.0. [ Info: Set vertical.maxleakage using default value 0.0. [ Info: Set vertical.c using default value 10.0. [ Info: Set vertical.kvfrac using default value 1.0. [ Info: Set vertical.waterfrac using default value 0.0. [ Info: Set vertical.pathfrac using default value 0.01. [ Info: Set vertical.rootingdepth using default value 750.0. [ Info: Set vertical.rootdistpar using default value -500.0. [ Info: Set vertical.cap_hmax using default value 2000.0. [ Info: Set vertical.cap_n using default value 2.0. [ Info: Set vertical.kc using default value 1.0. [ Info: Set vertical.cmax using default value 1.0. [ Info: Set vertical.eoverr using default value 0.1. [ Info: Set vertical.canopygapfraction using default value 0.1. [ Info: Set lateral.river.reservoir.locs using netCDF variable wflow_reservoirlocs. [ Info: Set lateral.river.reservoir.areas using netCDF variable wflow_reservoirareas. [ Info: Set lateral.river.reservoir.demand using netCDF variable ResDemand. [ Info: Set lateral.river.reservoir.maxrelease using netCDF variable ResMaxRelease. [ Info: Set lateral.river.reservoir.maxvolume using netCDF variable ResMaxVolume. [ Info: Set lateral.river.reservoir.area using netCDF variable ResSimpleArea. [ Info: Set lateral.river.reservoir.targetfullfrac using netCDF variable ResTargetFullFrac. [ Info: Set lateral.river.reservoir.targetminfrac using netCDF variable ResTargetMinFrac. [ Info: Read 2 reservoir locations. [ Info: Set ldd using netCDF variable wflow_ldd. [ Info: Set lateral.land.slope using netCDF variable Slope. [ Info: Set lateral.subsurface.ksathorfrac using netCDF variable KsatHorFrac. ┌ Info: Kinematic wave approach is used for overland flow. └ iterate = true [ Info: Set lateral.land.n using netCDF variable N. ┌ Info: Kinematic wave approach is used for river flow. └ iterate = true [ Info: Set lateral.river.n using netCDF variable N_River. [ Info: Set lateral.river.bankfull_depth using netCDF variable RiverDepth. [ Info: Set lateral.river.slope using netCDF variable RiverSlope. [ Info: Create an output netCDF file data/output/output_moselle.nc for grid data, using compression level 0. ERROR: type SBM has no field soil Stacktrace: [1] getproperty @ ./Base.jl:49 [inlined] [2] BottomRF @ ./reduce.jl:86 [inlined] [3] afoldl @ ./operators.jl:554 [inlined] [4] _foldl_impl @ ./reduce.jl:68 [inlined] [5] foldl_impl @ ./reduce.jl:48 [inlined] [6] mapfoldl_impl @ ./reduce.jl:44 [inlined] [7] mapfoldl @ ./reduce.jl:175 [inlined] [8] foldl @ ./reduce.jl:198 [inlined] [9] param(obj::@NamedTuple{vertical::Wflow.SBM{…}, lateral::@NamedTuple{…}}, fields::NTuple{4, Symbol}) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/io.jl:17 [10] out_map(ncnames_dict::Dict{Tuple{…}, String}, modelmap::@NamedTuple{vertical::Wflow.SBM{…}, lateral::@NamedTuple{…}}) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/io.jl:892 [11] prepare_writer(config::Wflow.Config, modelmap::@NamedTuple{…}, rev_inds::@NamedTuple{…}, x_nc::Vector{…}, y_nc::Vector{…}, nc_static::NCDatasets.NCDataset{…}; extra_dim::@NamedTuple{…}) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/io.jl:937 [12] initialize_sbm_model(config::Wflow.Config) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/sbm_model.jl:322 [13] run(config::Wflow.Config) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/Wflow.jl:189 [14] (::Wflow.var"#284#285"{IOStream, Bool, Wflow.Config})() @ Wflow ~/.julia/packages/Wflow/U4ngY/src/Wflow.jl:168 [15] with_logstate(f::Wflow.var"#284#285"{IOStream, Bool, Wflow.Config}, logstate::Base.CoreLogging.LogState) @ Base.CoreLogging ./logging/logging.jl:522 [16] with_logger @ ./logging/logging.jl:632 [inlined] [17] run(tomlpath::String; silent::Nothing) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/Wflow.jl:164 [18] run(tomlpath::String) @ Wflow ~/.julia/packages/Wflow/U4ngY/src/Wflow.jl:156 [19] top-level scope @ REPL[15]:1 Some type information was truncated. Use `show(err)` to see complete types. ```
Desired behaviour
The model initializes.
Additional Context
No response