Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a real-time flood digital twin of a UK river that runs entirely in the browser, GPU and on-device AI included

Description and use

Don Watch is a fully client‑side flood‑simulation tool that uses WebGPU for rendering and WebLLM for on‑device AI inference. It operates offline, caches all assets, and offers real‑time decision support for the River Don flood events.

Problem

Create a serious flood-response tool that runs entirely in a browser tab without a server, providing real-time simulation and decision support for the River Don flood events.

Outcome

Don Watch delivers a real‑time, decision‑support flood simulation that runs entirely in the browser, leveraging WebGPU for rendering and WebLLM for local AI inference. It operates offline, caches data locally, and provides transparent, deterministic hydrology calculations with AI‑generated briefs.

Workflow

  • 1. Load static assets (terrain, river geometry, gauge data) via Next.js static export.
  • 2. Render terrain and water with three.js WebGPURenderer, using a breadth‑first flood surface algorithm.
  • 3. Run an on‑device LLM (1‑2B parameters) via WebLLM to generate plain‑language briefs and risk rankings.
  • 4. Coordinate five agents (ingest, forecast, risk, comms, orchestrator) to process gauge, rainfall, and forecast data.
  • 5. Stream live reasoning feed and delegation graph to the UI.
  • 6. Cache all assets and model in OPFS via service worker for offline use.
  • 7. Allow network cut‑off button to test offline functionality.

Evidence

It rebuilds the Don valley from open LIDAR elevation, drapes the real river over it, and replays the November 2019 Sheffield flood hour by hour from the Environment Agency's own gauge records.

Source

The model, an open model in the 1-to-2-billion range, loads straight into the browser through WebLLM and runs on the visitor's own GPU.

Source

It ships as a Next.js static export and installs as a progressive web app. A service worker caches the shell, the data and the model, so once it has run it runs with the network cut, on a locked‑down laptop or in a field office with no signal.

Source

  • Record date: 2026-09-21T13:00:33.833Z