About

About & methodology

This site is a community-built window onto the Sri Lanka Department of Irrigation's real-time river-gauge feed — re-plotted against the same flood thresholds the Department uses, with a short next-hour forecast layered on top.

Where the data comes from

All readings are pulled from the Department of Irrigation's public ArcGIS feature service. That feed is the source of truth for water-level, rainfall, and threshold data. Each station also has hydrostations metadata (latitude, longitude, basin) which the site uses to group stations by river and order them upstream → downstream.

No database is involved. The feed is fetched on demand and ISR-cached for 60 seconds, so under typical traffic each station triggers at most one upstream call per minute.

What the thresholds mean

Each station has three thresholds published by the Department, shown on every chart as horizontal reference lines:

  • Alert — water level the Department flags as worth attention. People living near the gauge should keep an eye on the river.
  • Minor flood — low-lying areas near the river may start to flood. Local action — moving valuables, checking drains — is appropriate.
  • Major flood — significant flooding expected. Follow Department and Disaster Management Centre instructions.

These thresholds come directly from the feed. The site does not substitute its own values or interpret them — it only re-presents them next to the current reading.

Units (meters vs feet)

The source feed does not include unit metadata. Most stations report in feet, but some highland stations on the Kelani basin (Norwood, for example) report in meters. The site uses a heuristic based on threshold values to detect the unit per station, and only displays a unit suffix when confidence is high.

If a station's unit looks wrong, the safest interpretation is the published threshold values: alert / minor / major are in the same unit as the current reading for that station.

Next-hour forecast

The forecast panel under each station combines three signals:

  • Persistence — what the level has been doing in the last few hours at this station.
  • Upstream momentum — whether stations upstream on the same basin are rising or falling, with travel-time weighting.
  • Rainfall— recent rainfall at the gauge (when available; many downstream gauges don't report rain).

The model is direction-correct in most cases; magnitudes are not calibrated against historical flood events, so treat numbers as indicative, not predictive. The anomaly banner above the chart fires when the level jumps in a way that looks like an inferred upstream release.

How often it updates

The Department's gauges publish at roughly hourly cadence; the site re-fetches at most every 60 seconds (ISR). Each station page is statically prerendered at build time and then revalidated on traffic. Sitemap entries refresh hourly.

MCP server

The same dataset is exposed as an MCP (Model Context Protocol) server at /mcp — point a compatible LLM client at it to ask questions like "is Kelani rising right now?" or "list the top 3 stations closest to major flood".

Not an official warning service

For official flood warnings, follow the Disaster Management Centre and the Department of Irrigation. This site is a re-presentation of public data for situational awareness and is not affiliated with either agency.

Source code is open at github.com/shakee93/sl-water-levels. Patches welcome.