Inspiration
Flood defences are decisions made today about storms that have not happened yet. The people approving them need to understand what a prediction means, how much to trust it, and what a proposed defence would change.
We built FloodTrace around a simple idea: use floods that have already happened to examine decisions about the future. Replay the storm, compare the model with measured river records, then explore what different defences or weather conditions would do.
What it does
FloodTrace combines flood simulation, model checking, building-level forecasts and a plain-English assistant in an interactive 3D workspace.
Our demonstration follows Storm Ciara in the Calder Valley in February 2020. Users can replay the flood, inspect modelled water depths and building exposure, and compare the simulation with Environment Agency gauge records.
They can then explore what a different defence would change or what could happen under forecast rainfall. Scenarios include raising Mytholmroyd's walls by half a metre and increasing rainfall by 20%. An ML model estimates each building's flood probability in about two seconds.
The assistant lets users ask questions in ordinary language. It retrieves figures through tools connected to the underlying records and simulations, and moves the map to illustrate its answers.
How we built it
The physics model combines the Environment Agency's one-metre LiDAR terrain, nineteen rain gauges, mapped watercourses and flood defences. It uses a two-dimensional local-inertial shallow-water scheme, the same family of scheme used by LISFLOOD-FP, running on the GPU through WebGPU. Rain falls across the grid, allowing the model to represent hillside runoff as well as river flooding.
We built the browser interface with Next.js, React and TypeScript, using Three.js and React Three Fiber for the landscape. The replay, gauge charts and scenario comparisons share the same simulation outputs.
To make building-level forecasting faster, we generated a dataset of seventy-one simulated storms and trained an ML surrogate to approximate the physics model. Training, validation and test storms were separated, and we compared it with simpler methods, including looking up similar storms. Forecast rainfall can then be passed through the surrogate without rerunning the full physics simulation each time.
Challenges we ran into
The first challenge was establishing how much to trust the physics. At Hebden Bridge, the simulated peak is about half a metre low and an hour early. Other gauges have larger errors. Fixing the model while checking it against Ciara also means Ciara cannot serve as an independent test.
The ML model introduced a different challenge: a simple nearest-storm lookup performed well on familiar conditions but struggled with storms beyond its experience. We had to examine behaviour outside the training range, rather than choose a model from a single validation score.
Interpreting interventions required care too. Raising walls along one stretch of river barely changed the valley-wide flooded-building count. That raises a question about where the water reaches buildings; it is not a verdict on the real scheme.
Accomplishments that we're proud of
We brought real terrain, historical observations, GPU physics, fast ML inference and a data-connected assistant into one explorable workflow.
The physics replay is scored against ten gauge records, giving us a way to examine its stronger and weaker results. The ML surrogate produces building-level flood probabilities in seconds, making repeated forecast scenarios practical. The assistant connects those results to questions people can ask without knowing how to operate a flood model.
What we learned
Matching a simulator and predicting a real flood are different achievements. An ML model inherits the limitations of the physics that generated its training data, so agreement with that simulator cannot establish real-world accuracy.
We also learned that a good average score can hide important local failures, and that a local intervention needs to be examined locally as well as across the valley. Explaining those limits is part of making a decision tool useful.
What's next for FloodTrace
We want to test the physics against independent historical floods, including Boxing Day 2015, expand the storm dataset and retrain the ML model on the latest physics. We also want to represent rainfall that varies across the catchment and use the speed of the surrogate to explore forecast ensembles and uncertainty.
The longer-term aim is to help the people responsible for flood defences compare and explain their options faster and more easily, with a visible record of how the model performs.
Built With
- flue
- ml
- next.js
- numpy
- python
- react
- recharts
- scikit-learn
- shadcn/ui
- three.js
- typescript
- webgpu
- wgsl
- zustand
Log in or sign up for Devpost to join the conversation.