A YEAR AT THE VALLEY WATER STATION

Riverclock

Write a release rule. Let the seasons test it.

Design one policy for the whole year

Set the release at empty, half-full and full storage. Between these points the rule interpolates. Each month, inflow arrives, then your rule releases water: the first 4 units support the river, the rest serve the town. Extra release is counted as avoidable excess.

Keep town shortage, excess release and spill below their limits, sustain river flow, and leave a reserve for next year. You can inspect one month at a time. Editing a rule starts the year again.

Storage45 /100

January · before simulation

Your release curve

The starting rule is conservative when storage falls. Run it and inspect the dry months.

The annual brief

Monthly water ledger

Each row balances: start + inflow = end + release + spill. Values are rounded for display.

MonthInflowReleaseTown gapEnd
Model, editable source and license

Control-curve interpolation is adapted from Pywr under GPL-3.0. Original synthetic monthly reservoir accounting and scenarios; no evaporation, groundwater or real operating constraints. Educational use, not water-management advice. Copyright Pywr contributors and Riverclock adaptations2026. No warranty. You may copy and modify under GPL-3.0.

Complete corresponding editable source is bundled, with no build step or dependencies: hydrology.js, game.js, style.css, build/source notes. Serve this flat folder with any static web server.

Full GPL license · Pywr source