Adding DiffRoute benchmark/ integration and tests with SANDBOX.md#116
Merged
taddyb merged 18 commits intoDeepGroundwater:masterfrom Feb 4, 2026
Merged
Adding DiffRoute benchmark/ integration and tests with SANDBOX.md#116taddyb merged 18 commits intoDeepGroundwater:masterfrom
benchmark/ integration and tests with SANDBOX.md#116taddyb merged 18 commits intoDeepGroundwater:masterfrom
Conversation
This file contains hidden or 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.
Issue Addressed
Adds testing infrastructure for DiffRoute integration, validated against RAPID2 reference outputs using the Sandbox test network.
Description
New Test Infrastructure (
tests/benchmarks/)Core Tests (
test_diffroute.py):RivTreeandLTIRouterfrom RAPID Sandbox network topologyPhysical Validation Tests:
Visualization:
test_generate_hydrograph_plot: Creates 4-panel comparison plot (Qext vs routed, outlet comparison, confluence comparison, allreaches)
tmp/dir unless the user uncomments a line. This is what the plot should look like:DiffRoute Adapter (
benchmarks/src/ddr_benchmarks/diffroute_adapter.py)Utilities to convert DDR Engine COO adjacency matrices to DiffRoute-compatible NetworkX graphs:
zarr_group_to_networkx(): Direct zarr Group conversioncoo_to_networkx(): SciPy COO matrix conversionzarr_to_networkx(): Path-based loadingcreate_muskingum_params(): Generate parameter DataFrames with k/x valuesTest Data
RAPID Sandbox network (5 reaches, 10-day simulation):
Qext_Sandbox_19700101_19700110.nc4(lateral inflow)Qout_Sandbox_19700101_19700110.nc4(RAPID2 discharge)Qinit_Sandbox_19700101_19700110.nc4Test Organization Improvements
tests/engine/)tests/conftest.py@requires_cudamarkerType of Change
Checklist