diff --git a/server/test/sbm_config.toml b/server/test/sbm_config.toml index 59d1d0ff3..c4bd53cc0 100644 --- a/server/test/sbm_config.toml +++ b/server/test/sbm_config.toml @@ -85,6 +85,13 @@ vegetation__specific-leaf_storage = "Sl" vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" +river_bank_water__elevation = "RiverZ" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -105,14 +112,6 @@ netcdf.variable.name = "KsatVer" scale = 1.0 offset = 0.0 -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_elevation = "RiverZ" -bankfull_depth = "RiverDepth" - [input.lateral.river.reservoir] area = "ResSimpleArea" areas = "wflow_reservoirareas" diff --git a/src/routing/surface_kinwave.jl b/src/routing/surface_kinwave.jl index 7160117aa..05d12c8f9 100644 --- a/src/routing/surface_kinwave.jl +++ b/src/routing/surface_kinwave.jl @@ -91,7 +91,7 @@ function RiverFlowParameters(dataset, config, indices, river_length, river_width mannings_n = ncread( dataset, config, - "lateral.river.mannings_n"; + "river_water_flow__manning_n_parameter"; sel = indices, defaults = 0.036, type = Float, @@ -99,22 +99,15 @@ function RiverFlowParameters(dataset, config, indices, river_length, river_width bankfull_depth = ncread( dataset, config, - "lateral.river.bankfull_depth"; - alias = "lateral.river.h_bankfull", + "river_bank_water__depth"; sel = indices, defaults = 1.0, type = Float, ) - if haskey(config.input.lateral.river, "h_bankfull") - @warn string( - "The `h_bankfull` key in `[input.lateral.river]` is now called ", - "`bankfull_depth`. Please update your TOML file.", - ) - end slope = ncread( dataset, config, - "lateral.river.slope"; + "river__slope"; optional = false, sel = indices, type = Float, diff --git a/src/routing/surface_local_inertial.jl b/src/routing/surface_local_inertial.jl index 3050a9a11..a9591436c 100644 --- a/src/routing/surface_local_inertial.jl +++ b/src/routing/surface_local_inertial.jl @@ -56,7 +56,7 @@ function LocalInertialRiverFlowParameters( bankfull_elevation_2d = ncread( dataset, config, - "lateral.river.bankfull_elevation"; + "river_bank_water__elevation"; optional = false, type = Float, fill = 0, @@ -64,7 +64,7 @@ function LocalInertialRiverFlowParameters( bankfull_depth_2d = ncread( dataset, config, - "lateral.river.bankfull_depth"; + "river_bank_water__depth"; optional = false, type = Float, fill = 0, @@ -76,7 +76,7 @@ function LocalInertialRiverFlowParameters( mannings_n = ncread( dataset, config, - "lateral.river.mannings_n"; + "river_water_flow__manning_n_parameter"; sel = indices, defaults = 0.036, type = Float, diff --git a/src/sbm_gwf_model.jl b/src/sbm_gwf_model.jl index 31d037e5f..ddd351b49 100644 --- a/src/sbm_gwf_model.jl +++ b/src/sbm_gwf_model.jl @@ -60,7 +60,7 @@ function initialize_sbm_gwf_model(config::Config) river_width_2d = ncread( dataset, config, - "lateral.river.width"; + "river__width"; optional = false, type = Float, fill = 0, @@ -69,7 +69,7 @@ function initialize_sbm_gwf_model(config::Config) river_length_2d = ncread( dataset, config, - "lateral.river.length"; + "river__length"; optional = false, type = Float, fill = 0, diff --git a/src/sbm_model.jl b/src/sbm_model.jl index c6a7dae6d..e74fe5004 100644 --- a/src/sbm_model.jl +++ b/src/sbm_model.jl @@ -58,7 +58,7 @@ function initialize_sbm_model(config::Config) river_width_2d = ncread( dataset, config, - "lateral.river.width"; + "river__width"; optional = false, type = Float, fill = 0, @@ -67,7 +67,7 @@ function initialize_sbm_model(config::Config) river_length_2d = ncread( dataset, config, - "lateral.river.length"; + "river__length"; optional = false, type = Float, fill = 0, diff --git a/test/run_sbm_gwf.jl b/test/run_sbm_gwf.jl index 81038ed5a..2b15910ae 100644 --- a/test/run_sbm_gwf.jl +++ b/test/run_sbm_gwf.jl @@ -83,8 +83,8 @@ tomlpath = joinpath(@__DIR__, "sbm_gwf_config.toml") config = Wflow.Config(tomlpath) config.model.river_routing = "local-inertial" -config.input.lateral.river.bankfull_elevation = "bankfull_elevation" -config.input.lateral.river.bankfull_depth = "bankfull_depth" +config.input.river_bank_water__elevation = "bankfull_elevation" +config.input.river_bank_water__depth = "bankfull_depth" model = Wflow.initialize_sbm_gwf_model(config) Wflow.run_timestep!(model) @@ -108,8 +108,8 @@ config = Wflow.Config(tomlpath) config.model.river_routing = "local-inertial" config.model.land_routing = "local-inertial" -config.input.lateral.river.bankfull_elevation = "bankfull_elevation" -config.input.lateral.river.bankfull_depth = "bankfull_depth" +config.input.river_bank_water__elevation = "bankfull_elevation" +config.input.river_bank_water__depth = "bankfull_depth" config.input.lateral.land.elevation = "wflow_dem" pop!(Dict(config.state.lateral.land.variables), "q") diff --git a/test/sbm_config.toml b/test/sbm_config.toml index 59d1d0ff3..c4bd53cc0 100644 --- a/test/sbm_config.toml +++ b/test/sbm_config.toml @@ -85,6 +85,13 @@ vegetation__specific-leaf_storage = "Sl" vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" +river_bank_water__elevation = "RiverZ" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -105,14 +112,6 @@ netcdf.variable.name = "KsatVer" scale = 1.0 offset = 0.0 -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_elevation = "RiverZ" -bankfull_depth = "RiverDepth" - [input.lateral.river.reservoir] area = "ResSimpleArea" areas = "wflow_reservoirareas" diff --git a/test/sbm_gw.toml b/test/sbm_gw.toml index 01215fa83..a74cdeb57 100644 --- a/test/sbm_gw.toml +++ b/test/sbm_gw.toml @@ -80,6 +80,11 @@ vegetation__specific-leaf_storage = "Sl" vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -95,12 +100,6 @@ potential_evaporation = "pet" precipitation = "precip" temperature = "temp" -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" - [input.lateral.river.reservoir] area = "ResSimpleArea" areas = "wflow_reservoirareas" diff --git a/test/sbm_gwf_config.toml b/test/sbm_gwf_config.toml index 08906e109..7385f4525 100644 --- a/test/sbm_gwf_config.toml +++ b/test/sbm_gwf_config.toml @@ -60,6 +60,11 @@ vegetation_root__depth = "rootingdepth" vegetation_canopy__gap_fraction = "canopygapfraction" vegetation_water__storage_capacity = "cmax" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_river" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -71,12 +76,6 @@ forcing = [ potential_evaporation = "PET" precipitation = "P" -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_river" -slope = "RiverSlope" -width = "wflow_riverwidth" - [input.lateral.land] mannings_n = "N" slope = "Slope" diff --git a/test/sbm_gwf_piave_demand_config.toml b/test/sbm_gwf_piave_demand_config.toml index 10f839449..9915c9581 100644 --- a/test/sbm_gwf_piave_demand_config.toml +++ b/test/sbm_gwf_piave_demand_config.toml @@ -63,6 +63,12 @@ vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" vegetation__crop_factor = "crop_factor" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" + forcing = [ "vertical.atmospheric_forcing.precipitation", "vertical.atmospheric_forcing.temperature", @@ -168,13 +174,6 @@ irrigation_trigger = "irrigation_trigger" irrigation_areas = "nonpaddy_irrigation_areas" irrigation_trigger = "irrigation_trigger" -[input.lateral.river] -length = "wflow_riverlength" -n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_depth = "RiverDepth" - [input.lateral.subsurface] constant_head = "constant_head" conductivity_profile = "exponential" diff --git a/test/sbm_piave_config.toml b/test/sbm_piave_config.toml index e8ce145ce..a5a32e7a4 100644 --- a/test/sbm_piave_config.toml +++ b/test/sbm_piave_config.toml @@ -60,6 +60,12 @@ vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" vegetation__crop_factor = "crop_factor" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" + forcing = [ "vertical.atmospheric_forcing.precipitation", "vertical.atmospheric_forcing.temperature", @@ -118,13 +124,6 @@ q = "q_land" h = "h_land" h_av = "h_av_land" -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_depth = "RiverDepth" - [input.lateral.subsurface] ksathorfrac = "KsatHorFrac" diff --git a/test/sbm_piave_demand_config.toml b/test/sbm_piave_demand_config.toml index c7ad4df53..b7bded0dc 100644 --- a/test/sbm_piave_demand_config.toml +++ b/test/sbm_piave_demand_config.toml @@ -61,6 +61,12 @@ vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" vegetation__crop_factor = "crop_factor" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" + forcing = [ "vertical.atmospheric_forcing.precipitation", "vertical.atmospheric_forcing.temperature", @@ -162,13 +168,6 @@ irrigation_trigger = "irrigation_trigger" irrigation_areas = "nonpaddy_irrigation_areas" irrigation_trigger = "irrigation_trigger" -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_depth = "RiverDepth" - [input.lateral.subsurface] ksathorfrac = "KsatHorFrac" diff --git a/test/sbm_simple.toml b/test/sbm_simple.toml index 27c9fbacb..36f25c080 100644 --- a/test/sbm_simple.toml +++ b/test/sbm_simple.toml @@ -45,6 +45,11 @@ vegetation__specific-leaf_storage = "Sl" vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -67,12 +72,6 @@ potential_evaporation = "pet" precipitation = "precip" temperature = "temp" -[input.lateral.river] -length = "wflow_riverlength" -n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" - [input.lateral.river.reservoir] area = "ResSimpleArea" areas = "wflow_reservoirareas" diff --git a/test/sbm_swf_config.toml b/test/sbm_swf_config.toml index ff9be80c7..c5a0b41c9 100644 --- a/test/sbm_swf_config.toml +++ b/test/sbm_swf_config.toml @@ -81,6 +81,13 @@ vegetation__specific-leaf_storage = "Sl" vegetation_woody-part__storage_capacity = "Swood" vegetation_root__depth = "RootingDepth" +river__length = "wflow_riverlength" +river_water_flow__manning_n_parameter = "N_River" +river__slope = "RiverSlope" +river__width = "wflow_riverwidth" +river_bank_water__depth = "RiverDepth" +river_bank_water__elevation = "RiverZ" + # specify the internal IDs of the parameters which vary over time # the external name mapping needs to be below together with the other mappings forcing = [ @@ -96,14 +103,6 @@ potential_evaporation = "pet" precipitation = "precip" temperature = "temp" -[input.lateral.river] -length = "wflow_riverlength" -mannings_n = "N_River" -slope = "RiverSlope" -width = "wflow_riverwidth" -bankfull_elevation = "RiverZ" -bankfull_depth = "RiverDepth" - [input.lateral.river.reservoir] area = "ResSimpleArea" areas = "wflow_reservoirareas"