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

fix for diffusive to run with synthetic and topo on NHD #779

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

kumdonoaa
Copy link
Contributor

routing_scheme_map in AbtractNetwork.py was updated to run diffusive when using channel topobathy data was turned off in the config yaml file. Now when "run_hybrid_routing" and "use_natl_xsections" are True and False, respectively, t-route run MC+diffusive both with synthetic xsec data provided by RouteLink file.

Additions

Removals

Changes

Testing

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

Copy link
Contributor

@shorvath-noaa shorvath-noaa left a comment

Choose a reason for hiding this comment

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

It looks like these changes should be in the class MCwithDiffusiveNatlXSectionNonRefactored rather than MCwithDiffusive. The former is meant to be MC with Diffusive using natural cross-sections, while the latter is MC with Diffusive using synthetic cross-sections.

Comment on lines 478 to 479
MCwithDiffusive: [[True, False, False],[True, True, False]],
MCwithDiffusiveNatlXSectionNonRefactored: [[True, True, False]],
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused here, it looks like you added a [True, True, False] option (line 478), but that already exists as MCwithDiffusiveNatlXSectionNonRefactored (line 479)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is true but MCwithDiffusive was mainly written for using topo data while 'use_topobathy'=False. So, when 'use_topobathy'=False, MCwithDiffusive throws errors in many cases (e.g., L221). So I guess then the fix can be that we keep _routing_scheme_map as before, but keep the changes I made in AbstractNetwork.py. Or, we can move L216~L237 to somewhere under class MCwithDiffusiveNatlXSectionNonRefactored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, RouteLink file doesn't have column name 'mainstem', we cannot use def _fill_in_missing_topo_data of AbstractRouting.py for NHD. Furthermore, topobathy data isn't available anymore for NHD. So, unless communities try to make their own topodata for NHD, 'MConly' and 'MCwithDiffusive (with use_topobathy=False) are only options to choose for NHD.

@kumdonoaa kumdonoaa merged commit 5bef634 into NOAA-OWP:master Jun 14, 2024
4 checks passed
@kumdonoaa kumdonoaa deleted the diffusive_synthetic_topobathy branch June 14, 2024 18:21
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