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

Expand diffusive domain to include tributaries #740

Merged
merged 20 commits into from
Feb 29, 2024

Conversation

shorvath-noaa
Copy link
Contributor

@shorvath-noaa shorvath-noaa commented Feb 15, 2024

This allows the routing class diffusive object to add all tributaries to the diffusive domain. Because the diffusive module currently cannot handle reservoirs, this will always stop at the segment just below a reservoir. All other contributing segments will be added to the diffusive domain.

This PR also restructures the coastal_domain.yaml file format.

Additions

AbstractRouting.py

  • Add functionality to add all tributaries to diffusive domain. This is done by using the reachable function on the reverse_connections dictionary, starting at each diffusive domain tailwater. Waterbodies are excluded by providing their outlets as the target input to the reachable function.

HYFeaturesNetwork.py

  • Temporary fix added to account for a specific waterbody that has two outlets in the hydrofabric v20.1. This has been added as an issue to the hydrofabric repo.

Removals

Changes

AbstractNetwork.py

  • Add waterbody_dataframe as an input to routing class to ensure the diffusive domain is cut-off at the outlets of waterbodies.

AbstractRouting.py

  • Update using upstream_boundary_mainstem_link to exclude headwaters from mainstem_segs list. Previously, upstream_boundary_mainstem_link was a list of length 1, so that single value was removed. Now, because it can be a longer list, it is iterated through and all values within are removed from mainstem_segs.

Testing

  1. Successfully ran using synthetic cross-sections on all current diffusive domains and their tributaries (~35,000 miles of river).

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

@shorvath-noaa shorvath-noaa marked this pull request as ready for review February 21, 2024 16:19
Copy link
Contributor

Choose a reason for hiding this comment

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

The master branch already has these csv files under LowerColorado_TX_v4 folder. Do we still need to merge these files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the current LowerColorado_TX_v4 test case is using hydrofabric v2.0. These changes update it (geopackage and forcing files) to v2.0.1

Copy link
Contributor

Choose a reason for hiding this comment

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

got it.

@shorvath-noaa shorvath-noaa merged commit ca2a633 into NOAA-OWP:master Feb 29, 2024
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