
When the Rain Forecast Is Wrong: Building MONSOON OS on AWS
How we connected forecast uncertainty, terrain physics, drainage capacity, live reports and human-approved agents to turn Delhi NCR rainfall into road-level action.
On 9 July 2026, Delhi NCR did not have a rainfall-information problem. It had a decision problem.
One weather model could suggest manageable rain while another suggested an extreme event. A city operator still had to answer the questions that actually mattered: Which underpass will fill first? Which drain is already overloaded? What changes if the forecast is wrong? Where should two available pumps go?
We built MONSOON OS to connect those decisions in one system. Its promise is simple: forecast the consequences of rain, and know when the forecast itself might be wrong.
Why another weather dashboard was not enough
Most weather products stop at rainfall. Urban flooding starts after rainfall touches a specific landscape: elevation, buildings, roads, underpasses, land cover, drains and catchments. Two neighbourhoods receiving the same rain can experience completely different outcomes.
A single forecast number also hides uncertainty. During our 9 July replay, models disagreed between roughly 33 mm and 199 mm at one grid point. An average alone would create false confidence.
MONSOON OS therefore combines four layers of intelligence:
- Forecast reliability: blend GFS and ECMWF and estimate the probability that the forecast will miss by more than 12 mm.
- Physical consequences: calculate runoff, drainage, ponding and downstream spill from real terrain and land cover.
- Live evidence: incorporate anonymous blocked-drain and waterlogging reports.
- Human-approved response: rank pump deployments and let an agent draft, but never execute, operational plans.
Teaching the system to say “I may be wrong”
We created a 49-point grid over Delhi and Gurugram and collected archived GFS and ECMWF forecasts for the 2024–2026 monsoon seasons. Each training record contains model rainfall, disagreement, recent observed rain, forecast lead time and the final ERA5 rainfall observation.
We used a strict time split: 2024 and 2025 for development, with 2026 kept unseen for the final test. The system contains a convex weighted model blend, a calibrated logistic-regression bust detector and a separate probability model for rainfall above 25 mm.
On the unseen 2026 season, the bust detector reached a PR-AUC of 0.448, compared with 0.332 from model disagreement alone and 0.074 from random prediction. Its Brier skill was 26.4% over climatology.
The blend does not dramatically beat ECMWF on rainfall amount. That is not our claim. The contribution is the reliability layer: the system can tell an operator when planning around a single forecast is dangerous.
From millimetres of rain to roads that may flood
Our original prototype used a fixed hotspot list. We replaced it with a physics-aware model built from:
- Copernicus GLO-30 elevation from the AWS Registry of Open Data
- ESA WorldCover land cover from the AWS Registry of Open Data
- OpenStreetMap roads, drains and underpasses
- GMDA drains, watersheds, natural-flow lines and surveyed waterlogging locations
- Delhi Irrigation and Flood Control trunk-drain information
The offline builder conditions the terrain, identifies depressions, calculates contributing catchments and builds upstream-to-downstream spill connections. Land cover controls how much rainfall becomes runoff. Each depression receives catchment runoff, loses the water its drains can remove, fills according to its stage-volume curve and spills excess water downstream.
Where published drain dimensions exist, we parse circular, rectangular and multi-barrel sections and estimate full-flow capacity using Manning’s equation. Where capacity is unknown, the product says so. Unknown data is not silently converted into certainty.
Roads intersecting depressions above approximately 15 cm become candidate waterlogging spots. Each spot explains its estimated depth, volume, catchment, nearby drainage, underpass status and assumptions.
Low, expected and high are operationally different worlds
MONSOON OS runs the flood engine at the low end, blended expectation and high end of the model range. If the bust detector reports poor reliability, the interface recommends planning for the high scenario.
For the 9 July replay, the system identifies approximately 3,021 road-level spots in the low scenario, 4,081 in the expected scenario and 4,918 in the high scenario. These are screening results, not claims that every marker was a confirmed flood.
A blocked drain changes the map
A field user can report a blocked drain without providing a name, phone number or email address. The report is matched to the nearest mapped drain, its capacity is removed from the affected catchments and the scenario is recalculated. Reports expire automatically after 48 hours.
This transforms citizen input from a passive icon into an operational model update.
The AWS architecture
We deployed MONSOON OS as a serverless application in ap-southeast-2.
- AWS Lambda runs the public API, live forecast ingestion, flood scenarios, reports, dispatch and agent tools.
- Amazon API Gateway exposes a throttled HTTP API to the dashboard.
- Amazon DynamoDB stores forecasts, reports and agent proposals; TTL removes temporary reports.
- Amazon S3 stores trained models and larger geospatial assets delivered through short-lived links.
- Amazon EventBridge schedules live ingestion and monitoring every three hours.
- Amazon Bedrock, using Amazon Nova Lite through the Converse API, powers the tool-calling assistant.
- AWS Amplify Hosting publishes the Leaflet operations dashboard.
- AWS SAM and CloudFormation define and deploy the complete backend.
The heavy GIS work is intentionally offline. Lambda loads compact depression and connectivity tables, so runtime work is limited to runoff, drainage, storage and spill calculations. This is what made a real terrain model practical within a serverless hackathon architecture.
An agent that proposes, never commands
Using the open-source Strands Agents SDK with Bedrock, our monitoring agent can retrieve the live forecast, inspect bust probability, run flood scenarios, read reports and prepare a pump plan.
The model is not allowed to invent operational numbers. Values come from application tools. The agent must state when reliability is low, and every recommendation is stored for a person to approve or dismiss.
Our design principle was straightforward: AI can compress evidence and prepare a decision, but accountability stays with the operator.
Validation without pretending we have perfect ground truth
The physics model was not trained on known flood locations. We checked it independently against GMDA survey points and public news reports.
At a uniform 50 mm rainfall scenario, 15 of 24 GMDA waterlogging locations were within 250 metres of a predicted hotspot, versus a 42.86% random-road baseline. Nineteen of 24 were within 500 metres.
We also show the limitations: 30 m terrain blurs narrow underpasses and drain inverts; full-flow drain estimates do not represent silt or backwater; daily rain cannot fully describe short cloudbursts; and travel time is currently distance-based. MONSOON OS is decision support, not a certified hydraulic model.
What we learned
The biggest lesson was that uncertainty is not a footnote. It should change the action the system recommends.
A second lesson was architectural: precompute what is geospatially expensive, keep runtime operations compact and use managed AWS services for the live path. That separation let a small team connect environmental data, machine learning, hydrology and agentic workflows without running permanent servers.
Finally, responsible environmental AI must expose its assumptions. A map can look authoritative even when its inputs are incomplete. Our interface therefore distinguishes recorded values, estimated values, unknown capacity, model predictions and field observations.
Try MONSOON OS
Built for Environmental Hacks 2026 by Ishansh Sharma, Akansh Gupta and Himani.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article