Surfacewater infiltration#843
Conversation
vers-w
left a comment
There was a problem hiding this comment.
Nice work and very useful new feature!
Besides the comments below I was wondering if re-infiltration of overland flow affects the water mass balance error significantly? If I remember correctly, this was a concern when working on this in another branch. Also, I think the changelog has not been updated yet?
| end | ||
| ``` | ||
|
|
||
| #### Infiltration from surface water |
There was a problem hiding this comment.
Maybe good to put already in the title that this is about overland flow? To clearly separate this from river infiltration.
| #### Infiltration from surface water | |
| #### Land surface water infiltration |
| infiltrate. During infiltration, the amount of infiltrated water originating from overland | ||
| flow is tracked using a simple ratio | ||
| (`available_from_overland_flow/total_potential_infiltration`). After the infiltration |
There was a problem hiding this comment.
I would suggest to describe this part in a bit more detail (maybe also include the ratio as an equation). Also it seems the terms available_from_overland_flow and total_potential_infiltration are not used in the code?
| surface water infiltration. For local inertial flow, the infiltration is applied by updating | ||
| the boundary conditions which are then used in the water depth update function. | ||
| """ | ||
| function correct_overland_flow_level!( |
There was a problem hiding this comment.
I would suggest to do this as part of the update of boundary conditions of the local inertial overland flow model. Now the function name is inconsistent with the function task. If you still need to use this function for this routing type (as it is used for the kinematic wave routing) you can for example return nothing.
| # Potential infiltration originating from surface water [mm Δt⁻¹] | ||
| potential_infiltration_surfacewater::Vector{Float64} = fill(0.0, n) | ||
| # Total water available for infiltration [mm Δt⁻¹] | ||
| potential_infiltration::Vector{Float64} = fill(0.0, n) |
There was a problem hiding this comment.
I think it would be a bit cleaner to add potential_infiltration to the soil boundary conditions. Also because if infiltration of surface water is not allowed, this term is equal to water_flux_surface.
|
|
||
| ```toml | ||
| [model] | ||
| reinfiltration_surfacewater__flag = true |
There was a problem hiding this comment.
A bit more in line with the standard names for overland flow:
| reinfiltration_surfacewater__flag = true | |
| land_surface_water_reinfiltration__flag = true |
| @. v.net_runoff = v.runoff - ae_openw_l | ||
|
|
||
| # correct overland flow water levels in case of reinfiltration | ||
| correct_overland_flow_level!(soil_model, overland_flow, domain, config) |
There was a problem hiding this comment.
Would suggest to move this function to the routing part (surface_routing! functions), and only run it if reinfiltration is allowed at this level for clarity.
| land_v.storage[i] = | ||
| max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i]) |
There was a problem hiding this comment.
To avoid setting storage at zero and not keeping track of the error below.
| land_v.storage[i] = | |
| max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i]) | |
| land_v.storage[i] -= land_bc.infiltration_volume[i]) |
| land_v.storage[i] = 0.0 # set storage to zero | ||
| end | ||
| # Apply surface water infiltration correction if available | ||
| if land_bc.infiltration_volume[i] > 0.0 |
There was a problem hiding this comment.
I think this should be moved above the error computation?
| land_v.storage[i] = | ||
| max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i]) |
There was a problem hiding this comment.
See also previous comment for river location.
| land_v.storage[i] = | |
| max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i]) | |
| land_v.storage[i] -= land_bc.infiltration_volume[i]) |
| river_fraction = 0.2 | ||
| surface_flow_width = 10.0 | ||
| alpha = 2.0 | ||
| beta = 0.5 |
There was a problem hiding this comment.
Why not use 0.6 here for beta?
Issue addressed
Fixes #
Explanation
Explain how you addressed the bug/feature request, what choices you made and why.
Checklist
masterAdditional Notes (optional)
Add any additional notes or information that may be helpful.