generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Hybrid channel routing with two options: flux exchanges simultaneously or sequentially #840
Open
kumdonoaa
wants to merge
24
commits into
NOAA-OWP:master
Choose a base branch
from
kumdonoaa:pull_diffusive_mc_reach_2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Until now, the MC and reservoir modules have been running on the same simulation time steps, allowing for the exchange of flow between the two modules at each time step during runtime. However, the diffusive module has been running for the entire simulation period without exchanging flow or depth with the MC and reservoir modules during this time. In other words, the diffusive module can only run after the simultaneous execution of the MC and reservoir modules has been completed.
This PR introduces a functionality that allows the diffusive module to run on the same simulation time steps as the MC and reservoir modules, enabling simultaneous flux exchange between MC and diffusive modules or diffusive and reservoir modules. It achieves this by creating a standalone module for generating hydraulic lookup tables of channel cross sections and a lightweight diffusive kernel that operates from the start to the end of the common simulation time interval.
Update1:
While this functionality enables simultaneous flux exchanges among different routing domains, it increases compute time due to the feedback loop that occurs at each time step between the domains. To address this, a new functionality was added to reduce compute time by running one domain (e.g., the MC domain) completely for the entire simulation period, and then running the other domain (e.g., the Diffusive domain) for the same period. This approach ensures that the results from the Diffusive or MC domain are correctly passed to the downstream domain during runtime, optimizing performance while maintaining accuracy. As a result, the compute time of this new hybrid routing functionality is nearly the same as the current approach of running the MC and reservoir modules together, followed by the diffusive module.
Additions
To activate the hybrid routing, 'parallel_compute_method' = serial-hybrid-routing and 'compute_kernel' = V02-structured-hybrid-routing in the config yaml file
Removals
Changes
Testing
In the legend, 'MC and then diffusive' refers to the use of diffusive.f90 with parallel_compute_method set to 'serial' and compute_kernel set to 'V02-structured', while 'hybrid_routing' represents the use of diffusive_lightweight.f90 with parallel_compute_method set to 'serial-hybrid-routing' and compute_kernel set to 'V02-structured-hybrid-routing' in the configuration YAML file.
Screenshots
Notes
Todos
Checklist
Testing checklist
Target Environment support
Accessibility
Other