Repository navigation
SIP310 Implement H2O mass-balance checking - #343
ANAMASGARD wants to merge 1 commit into
Conversation
@ANAMASGARD Can you say more about this? I don't see the failure. |
|
@Alomir sorry for the confusion, and also sorry my previous reply missed your actual question entirely (I answered the wrong thing). You're right that you don't see the failure - because it wasn't a real pre-existing issue. That note was based on a testBalance failure I saw only in my local environment before syncing with master. After merging master, it disappeared completely and all tests pass cleanly in CI. I can't reproduce it anymore either. It was likely a stale local build artifact rather than an actual code issue. I've removed that checkbox from the PR description to avoid further confusion. |
Track soilWater + snow, compare pool change against external water fluxes, log warnings on failure, and expose bcdeltaC/bcdeltaN/bcdeltaW in sipnet.out. Extends testBalance and smoke baselines. Closes PecanProject#310.
0c45e84 to
3ed9827
Compare
FIXES #310
Summary
Implements water mass-balance checking following the same framework as PR #248 (carbon/nitrogen):
soilWater+snoweach timestep (pre-update → post-update → post-clamp)deltaWaterexceeds tolerance (EPS)bcdeltaC,bcdeltaN, andbcdeltaWcolumns tosipnet.outtestBalancewithcheckWater()and updates smoke baselinesDesign notes
ctx.leafWateronly capsimmedEvap; excess interception goes to soil vianetRainsnowMeltexcluded — internal transfer (snow → soil), not external I/OeventEvapon both sides — gross irrigation enters the system (input) and the evaporated portion leaves immediately (output); net soil addition iseventSoilWaterTest plan
make testbuild— builds successfullybcdeltaW = 0.00000in smoke output; zero"Water balance check failed"warningscheckWater()passes in alltestBalancesubtestsmake smoke— passes after baseline update