You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The supplement of the RUBEM paper (equations S1 to S35, PDF pages 5 to 12) is the normative description of the model, but no test derives its expectations from those equations: the unit tests pin values computed by the code itself and the goldens pin the synthetic run. After the review of the equations against the code (fixes #318, #319, #320, #322; confirmed rules in #331), the model needs tests that fail when an implementation drifts from the formulation.
Proposed solution
A paper marker and a tests/paper package with:
equation tests on a 1x1 clone for the process functions (S3, S5 to S12, S14 to S20, S22, S23, S25 to S29, S31 to S33): expectations computed in float64 from the supplement formulas with explicit tolerances, each test citing the equation and its page;
model-level tests on the synthetic dataset with rewritten lookup tables (a_o = 1, a_i = 1, saturated start) for the rules the model applies inline: S1 (zero floor and water cell), S2, S4 saturation, S13/S28 water-cell guards, S21/S30 impervious constant, S24 threshold, S34 and S35 (accumulation reproduced with accuflux at x = 0);
Description
The supplement of the RUBEM paper (equations S1 to S35, PDF pages 5 to 12) is the normative description of the model, but no test derives its expectations from those equations: the unit tests pin values computed by the code itself and the goldens pin the synthetic run. After the review of the equations against the code (fixes #318, #319, #320, #322; confirmed rules in #331), the model needs tests that fail when an implementation drifts from the formulation.
Proposed solution
A
papermarker and atests/paperpackage with:a_o = 1,a_i = 1, saturated start) for the rules the model applies inline: S1 (zero floor and water cell), S2, S4 saturation, S13/S28 water-cell guards, S21/S30 impervious constant, S24 threshold, S34 and S35 (accumulation reproduced withaccufluxatx = 0);No
xfailis needed: every equation is either implemented as written or covered by a confirmed rule (#331).Alternative solutions
Property-based tests over random inputs were considered; fixed analytic cases keep every derivation readable and citeable.
Additional context
These tests guard the architecture refactors that follow them.