Skip to content

add interflow - #62

Merged
peterlafollette merged 12 commits into
NOAA-OWP:masterfrom
peterlafollette:PTL_add_lateral_flow
Jun 13, 2026
Merged

add interflow#62
peterlafollette merged 12 commits into
NOAA-OWP:masterfrom
peterlafollette:PTL_add_lateral_flow

Conversation

@peterlafollette

@peterlafollette peterlafollette commented May 25, 2026

Copy link
Copy Markdown
Contributor

This PR adds the capacity for interflow, such that water stored in the vadose zone (LGAR domain) can contribute directly to streamflow. A WF contributes to streamflow if its capillary head is above a new specified parameter, lateral_flow_psi_threshold, and another new parameter lateral_flow_factor modifies lateral flow contributions to streamflow. Interflow is proportional to the hydraulic conductivity of a wetting front. Interflow is enabled only when both parameters are specified. Flux caching is disabled during timesteps where lateral flow is active and eligible fronts are present. The lateral_flow_factor parameter should be interpreted as a lumped effective lateral conductance term that can include anisotropy, hydraulic gradient, drainage length, and catchment connectivity effects.

Additions

Removals

Changes

Testing

  1. Stable for more than 20,000 core hours (of simulations using NOM + CASAM + troute or PET + CASAM + troute) using PSO - generated parameter sets and various forcing datasets

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@peterlafollette peterlafollette changed the title Ptl add interflow add interflow May 25, 2026
@peterlafollette
peterlafollette requested a review from ajkhattak June 8, 2026 18:38

@ajkhattak ajkhattak 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.

Peter, thanks for adding the lateral flow process to CASAM. From a technical standpoint, it looks solid overall. There are a few sections that I wasn't able to fully follow, so let's tag up to briefly discuss them.

One suggestion I have is to use more descriptive variable names and add documentation/comments for the new functions you've implemented. This would make the code easier to understand and maintain.

Thanks!

Comment thread configs/README.md Outdated
Comment thread configs/README.md Outdated
Comment thread configs/README.md Outdated
Comment thread configs/README.md Outdated
Comment thread configs/README.md Outdated
Comment thread src/lgar.cxx Outdated
Comment thread src/lgar.cxx
Comment thread src/lgar.cxx
Comment thread src/lgar.cxx Outdated
Comment thread src/lgar.cxx
Peter La Follette added 7 commits June 10, 2026 16:54
when interflow is on, it sometimes would be intense enough to make theta want to go below theta_r and foist the mass balance error into AET. Now lateral fluxes will be reduced such that they will not imply to an impossible target soil profile.
…er interflow extraction will not greatly exceed the threshold for interflow generation
updated conceptual reservoir parameters to be more descriptive, for example the parameter a is now a_con_res. Further updated parameters and fluxes having to do with lateral subsurface flow to have interflow in the name. Legacy parameter names are still accepted. Also added more commenting in the code about log mode.
@peterlafollette

Copy link
Copy Markdown
Contributor Author

Replied to / resolved all comments and met about them -- most salient changes are updated clearer naming conventions, better guard to prevent interflow from extracting too much water for any given time step, more commenting in code, and updated readme documentation.

@peterlafollette
peterlafollette merged commit 5b5ae8d into NOAA-OWP:master Jun 13, 2026
4 checks passed
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