Skip to content

Main content

Water Balance Closure Residual Tool

Calculate water balance closure residual from explicit caller-supplied inputs.

Loading tool…

Description

Subtract outflow and storageChange from inflow for residual.

A water balance tracks additions, withdrawals, storage changes, and a residual over one declared interval. A remainder can reveal inconsistency without identifying whether it came from leakage, timing, or measurement error.

Subtract outflow and storageChange from inflow for residual.

When to use this tool

Use Water Balance Closure Residual when you need one transparent water-volume or storage-accounting component.

How to use the tool and how it works

  1. Enter inflow, outflow, storageChange. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read residual. Use the output convention below.

Subtract outflow and storageChange from inflow for residual.1

Input fieldMeaning and unitsAccepted input
inflowInflowRequired. Finite number.
outflowOutflowRequired. Finite number.
storageChangeStorage ChangeRequired. Finite number.
Output fieldInterpretationReturned shape
residualResidualRequired. Finite number.
json
{
  "input": {
    "inflow": 100,
    "outflow": 70,
    "storageChange": 20
  },
  "output": {
    "residual": 10
  }
}

Limitations and assumptions

  • All quantities share one volume or depth and accounting period; storageChange is closing minus opening, and a residual does not identify leakage, timing error, or measurement bias.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Reconcile all flows and storage observations on a common interval and investigate residuals using independent measurements.

References

  1. Calculation and input contract: hydrology/water-balance-closure-residual — tool.io

Similar or alternative tools