Skip to content

Commit

Permalink
Change overland flow parameters to standard names
Browse files Browse the repository at this point in the history
  • Loading branch information
vers-w committed Dec 11, 2024
1 parent d02e72f commit dcf33a1
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 43 deletions.
7 changes: 3 additions & 4 deletions server/test/sbm_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"
river_bank_water__elevation = "RiverZ"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

# 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 = [
Expand Down Expand Up @@ -125,10 +128,6 @@ targetminfrac = "ResTargetMinFrac"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[model]
kin_wave_iteration = true
masswasting = true
Expand Down
2 changes: 1 addition & 1 deletion src/routing/surface_kinwave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function KinWaveOverlandFlow(dataset, config, indices; slope, flow_length, flow_
mannings_n = ncread(
dataset,
config,
"lateral.land.mannings_n";
"land_surface_water_flow__manning_n_parameter";
sel = indices,
defaults = 0.072,
type = Float,
Expand Down
4 changes: 2 additions & 2 deletions src/routing/surface_local_inertial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,15 @@ function LocalInertialOverlandFlowParameters(
mannings_n = ncread(
dataset,
config,
"lateral.land.mannings_n";
"land_surface_water_flow__manning_n_parameter";
sel = indices,
defaults = 0.072,
type = Float,
)
elevation_2d = ncread(
dataset,
config,
"lateral.land.elevation";
"land_surface_water_flow__ground_elevation";
optional = false,
type = Float,
fill = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/sbm_gwf_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function initialize_sbm_gwf_model(config::Config)
land_slope = ncread(
dataset,
config,
"lateral.land.slope";
"land_surface__slope";
optional = false,
sel = indices,
type = Float,
Expand Down
2 changes: 1 addition & 1 deletion src/sbm_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function initialize_sbm_model(config::Config)
land_slope = ncread(
dataset,
config,
"lateral.land.slope";
"land_surface__slope";
optional = false,
sel = indices,
type = Float,
Expand Down
2 changes: 1 addition & 1 deletion test/run_sbm_gwf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ config.model.land_routing = "local-inertial"

config.input.river_bank_water__elevation = "bankfull_elevation"
config.input.river_bank_water__depth = "bankfull_depth"
config.input.lateral.land.elevation = "wflow_dem"
config.input.land_surface_water_flow__ground_elevation = "wflow_dem"

pop!(Dict(config.state.lateral.land.variables), "q")
config.state.lateral.land.variables.h_av = "h_av_land"
Expand Down
7 changes: 3 additions & 4 deletions test/sbm_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"
river_bank_water__elevation = "RiverZ"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

# 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 = [
Expand Down Expand Up @@ -125,10 +128,6 @@ targetminfrac = "ResTargetMinFrac"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[model]
kin_wave_iteration = true
masswasting = true
Expand Down
7 changes: 3 additions & 4 deletions test/sbm_gw.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ river_water_flow__manning_n_parameter = "N_River"
river__slope = "RiverSlope"
river__width = "wflow_riverwidth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

# 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 = [
Expand All @@ -110,10 +113,6 @@ maxvolume = "ResMaxVolume"
targetfullfrac = "ResTargetFullFrac"
targetminfrac = "ResTargetMinFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[model]
kin_wave_iteration = true
masswasting = true
Expand Down
7 changes: 3 additions & 4 deletions test/sbm_gwf_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ river_water_flow__manning_n_parameter = "N_river"
river__slope = "RiverSlope"
river__width = "wflow_riverwidth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

# 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 = [
Expand All @@ -76,10 +79,6 @@ forcing = [
potential_evaporation = "PET"
precipitation = "P"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[input.lateral.subsurface]
conductivity = "k"
constant_head = "constant_head"
Expand Down
7 changes: 3 additions & 4 deletions test/sbm_gwf_piave_demand_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ river__slope = "RiverSlope"
river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

forcing = [
"vertical.atmospheric_forcing.precipitation",
"vertical.atmospheric_forcing.temperature",
Expand Down Expand Up @@ -184,10 +187,6 @@ river_bottom = "zb_river"
specific_yield = "specific_yield"
gwf_f = "gwf_f"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[output]
path = "output-piave-gwf.nc"

Expand Down
7 changes: 3 additions & 4 deletions test/sbm_piave_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ river__slope = "RiverSlope"
river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

forcing = [
"vertical.atmospheric_forcing.precipitation",
"vertical.atmospheric_forcing.temperature",
Expand Down Expand Up @@ -127,10 +130,6 @@ h_av = "h_av_land"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[output]
path = "output-piave.nc"

Expand Down
7 changes: 3 additions & 4 deletions test/sbm_piave_demand_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ river__slope = "RiverSlope"
river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

forcing = [
"vertical.atmospheric_forcing.precipitation",
"vertical.atmospheric_forcing.temperature",
Expand Down Expand Up @@ -171,10 +174,6 @@ irrigation_trigger = "irrigation_trigger"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"

[output]
path = "output-piave-demand.nc"

Expand Down
7 changes: 3 additions & 4 deletions test/sbm_simple.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ river_water_flow__manning_n_parameter = "N_River"
river__slope = "RiverSlope"
river__width = "wflow_riverwidth"

land_surface_water_flow__manning_n_parameter = "N"
land_surface__slope = "Slope"

# 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 = [
Expand Down Expand Up @@ -85,10 +88,6 @@ targetminfrac = "ResTargetMinFrac"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
n = "N"
slope = "Slope"

[model]
thicknesslayers = [100, 300, 800]
type = "sbm"
Expand Down
9 changes: 4 additions & 5 deletions test/sbm_swf_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ river__width = "wflow_riverwidth"
river_bank_water__depth = "RiverDepth"
river_bank_water__elevation = "RiverZ"

land_surface_water_flow__manning_n_parameter = "N"
land_surface_water_flow__ground_elevation = "FloodplainZ"
land_surface__slope = "Slope"

# 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 = [
Expand Down Expand Up @@ -116,11 +120,6 @@ targetminfrac = "ResTargetMinFrac"
[input.lateral.subsurface]
ksathorfrac = "KsatHorFrac"

[input.lateral.land]
mannings_n = "N"
slope = "Slope"
elevation = "FloodplainZ"

[model]
kin_wave_iteration = true
masswasting = true
Expand Down

0 comments on commit dcf33a1

Please sign in to comment.