Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(swf-pcp): add precipitation package for CHF and OLF models #2160

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

langevin-usgs
Copy link
Contributor

@langevin-usgs langevin-usgs commented Jan 23, 2025

Add a precipitation package to the channel flow and overland flow surface water models. The new package allows specification of a precipitation rate in length units per time and multiples that value by the maximum area (for a channel) and by the cell area for the overland model to come up with a volumetric flow rate. Precipitation rates must be zero or greater or the program terminates with an error.

Checklist of items for pull request

  • Replaced section above with description of pull request
  • Added new test or modified an existing test
  • Ran ruff on new and modified python scripts in .doc, autotests, doc, distribution, pymake, and utils subdirectories.
  • Formatted new and modified Fortran source files with fprettify
  • Added doxygen comments to new and modified procedures
  • Updated meson files, makefiles, and Visual Studio project files for new source files
  • Updated definition files
  • Updated input and output guide
  • Removed checklist items not relevant to this pull request

For additional information see instructions for contributing and instructions for developing.

@jdhughes-usgs
Copy link
Contributor

@langevin-usgs does it multiply the recharge by the maximum surface area and take et out based on the calculate surface area?

@langevin-usgs
Copy link
Contributor Author

langevin-usgs commented Jan 23, 2025

@langevin-usgs does it multiply the recharge by the maximum surface area and take et out based on the calculate surface area?

For the channel model, it does use the water surface area (which is dependent on stage) to calculate a volumetric flow rate. For the overland flow model, it just uses the cell area. My current thought is to only allow positive precipitation rates in the package, and require evapotranspiration to be represented using a separate evap package, which I'm working on next. The evap package will also use the calculated water surface area to calculate the volumetric flow rate. Let me know if you have suggestions for this behavior.

@emorway-usgs
Copy link
Contributor

If a cell in an OLF model also hosts a CHF reach, and both are using the precip package to apply water, is the surface area associated with the CHF deducted from the OLF surface area to avoid double counting of the precip?

@langevin-usgs
Copy link
Contributor Author

If a cell in an OLF model also hosts a CHF reach, and both are using the precip package to apply water, is the surface area associated with the CHF deducted from the OLF surface area to avoid double counting of the precip?

@emorway-usgs, the next commit on this PR will apply rainfall over the max area of the channel (not the water surface area, which is dependent on water depth) so that the value is unchanging. In the situation you mention, the user would have to adjust for possible double counting in the input data if channel reaches are large, though channel to overland flow connections are not available yet so this may evolve. These may be issues to think about for the atmospheric forcing module.

ensure cross sections are defined by at least 2 points
ensure precip is greater than or equal to zero
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.

3 participants