Juniata single-catchment sample + deprecate ddr_match (corrected physics by default) - #36
Merged
Conversation
… quickstart Mirror of DeepGroundwater/ddr#193 on the byte-identical 8.9 MB bundle (USGS 01567000, 8,657 km², 213 MERIT reaches): icechunk Q' + obs, attributes NetCDF, COO adjacency zarrs, one-row gage CSV, plus the attribute-statistics JSON (committed here because ddrs never recomputes statistics). Full config + README; two commands run plan and train-and-test on CPU in ~21 s, no external stores. Cross-implementation results on the same bundle: summed-Q' baseline NSE 0.695 / KGE 0.819 (matches DDR-Python to rounding); routed NSE 0.790 / KGE 0.881 vs DDR's 0.784 / 0.877 (residual is the window-sampling RNG stream only; ddrs 4-seed spread NSE 0.790-0.800). tests/juniata_bundle.rs asserts the bundle contract through the real readers and never skips (the bundle is committed). .gitignore gains !examples/juniata/ddrs.yaml so the example config survives the global ddrs.yaml ignore; the example workspace examples/juniata/.ddrs/ stays ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ault DDR ported ddrs's corrected physics (trapezoid-exact celerity beta, Cunge-matched X, own-reach gauge readout) in DeepGroundwater/ddr#192 as a clean break, so both implementations now share one formulation. default_ddr_match() flips to false; an explicit ddr_match: true still parses (legacy pre-#192 path, needed for old-result reproduction and for use_cuda_graphs whose captured kernel hardcodes the 5/3 celerity) but emits a deprecation WARN. validate_ddr_match's error is reworded for the new default. BREAKING: configs relying on the implicit legacy default now run corrected physics; use_cuda_graphs: true without an explicit ddr_match: true fails config load. config/merit_training.yaml flips to use_cuda_graphs: false accordingly. Invariant 1 re-anchored: the V1 sandbox fixture is regenerated from post-#192 DDR master and compare_ddr_sandbox reports ABSOLUTE MATCH on the corrected physics (max abs 1.5e-5 m³/s, max rel ~2e-7 — the f32 floor), which doubles as a bit-exactness proof of DDR's #192 port. The 2026-06-06 desktop-only-reference caveat is obsolete: any DDR checkout at or past #192 is a valid reference. Tests: ddr_match_flag.rs asserts the new default and that the legacy path still loads; leakance_off_parity's committed hydrograph fixture pins ddr_match: true (it was captured from the legacy chain — recapture when the legacy path is removed). Full suite green under the new default. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Two tightly coupled changes:
1.
examples/juniata/— the ddrs mirror of DeepGroundwater/ddr#193. A self-contained quickstart on the Juniata River at Newport, PA (USGS 01567000, 8,657 km², 213 MERIT reaches), running on the byte-identical 8.9 MB bundle committed in the ddr repo: icechunk Q' + obs stores, attributes NetCDF, COO adjacency zarrs, one-row gage CSV, plus the attribute-statistics JSON (committed here because ddrs never recomputes statistics). Two commands, no HPC/S3/CUDA:2.
ddr_matchdeprecation. DDR ported ddrs's corrected physics (trapezoid-exact celerity β, Cunge-matched X, own-reach gauge readout) in DeepGroundwater/ddr#192 as a clean break, so the flag's default flips tofalse(corrected). Explicitddr_match: truestill parses with a deprecation WARN (needed to reproduce pre-#192 results and foruse_cuda_graphs, whose captured kernel hardcodes the legacy 5/3 celerity). BREAKING:use_cuda_graphs: truewithout an explicitddr_match: truenow fails config load;config/merit_training.yamlflips touse_cuda_graphs: false.Cross-implementation validation (same bundle, both directions)
The routed residual is only the window-sampling RNG stream (torch global RNG vs ChaCha12; ddrs 4-seed spread NSE 0.790–0.800). Invariant 1 re-anchored: the V1 sandbox fixture is regenerated from post-#192 DDR master and
compare_ddr_sandboxreports ABSOLUTE MATCH on the corrected physics (max abs 1.5e-5 m³/s, max rel ~2e-7 — the f32 floor), which doubles as a bit-exactness proof of DDR's #192 port. The 2026-06-06 desktop-only-reference caveat is obsolete.Test plan
cargo test --no-fail-fastgreen under the new default (one legacy-physics fixture test now pinsddr_match: true;ddr_match_flag.rsasserts the new default; newjuniata_bundle.rscontract tests never skip)compare_ddr_sandbox= ABSOLUTE MATCH against the regenerated post-#192 fixtureplanreproduces the baseline andrun --workflow train-and-test --backend cpureproduces NSE 0.790 / KGE 0.881 from the committed files alone🤖 Generated with Claude Code