Skip to content

Surfacewater infiltration#843

Open
JoostBuitink wants to merge 25 commits into
masterfrom
surfacewater_infiltration
Open

Surfacewater infiltration#843
JoostBuitink wants to merge 25 commits into
masterfrom
surfacewater_infiltration

Conversation

@JoostBuitink

Copy link
Copy Markdown
Contributor

Issue addressed

Fixes #

Explanation

Explain how you addressed the bug/feature request, what choices you made and why.

Checklist

  • Updated tests or added new tests
  • Branch is up to date with master
  • Tests & pre-commit hooks pass
  • Updated documentation if needed
  • Updated changelog.qmd if needed

Additional Notes (optional)

Add any additional notes or information that may be helpful.

@JoostBuitink JoostBuitink marked this pull request as ready for review April 10, 2026 15:27
@JoostBuitink JoostBuitink requested a review from vers-w April 10, 2026 15:28

@vers-w vers-w left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe good to put already in the title that this is about overland flow? To clearly separate this from river infiltration.

Suggested change
#### Infiltration from surface water
#### Land surface water infiltration

Comment on lines +975 to +977
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Wflow/src/soil/soil.jl
# 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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit more in line with the standard names for overland flow:

Suggested change
reinfiltration_surfacewater__flag = true
land_surface_water_reinfiltration__flag = true

Comment thread Wflow/src/soil/soil.jl
@. 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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1026 to +1027
land_v.storage[i] =
max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid setting storage at zero and not keeping track of the error below.

Suggested change
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be moved above the error computation?

Comment on lines +1081 to +1082
land_v.storage[i] =
max(0.0, land_v.storage[i] - land_bc.infiltration_volume[i])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also previous comment for river location.

Suggested change
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use 0.6 here for beta?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants