
Where Rain Stops Being Rain
Weather models tell you how much rain is coming. Nobody tells you where that rain stops being rain and starts being a flood on your street. We built SURGE to answer the exact question Mumbai couldn't in 2005: which street floods next, how deep it gets, and where to safely send the water.
On 26th July 2005, Mumbai received 944 millimetres of rain in twenty-four hours.
419 people died. Nearly 100,000 homes were submerged, 30,000 vehicles were destroyed, and the city lost 1.7 billion dollars.
Here is the heartbreaking truth: it was not a surprise storm.
The weather office knew it was pouring. Anyone looking out of a window knew. People died because nobody could answer one specific question in time: which street floods next?
Twenty years later, weather apps still give you the exact same useless information. They tell you there is an 80% chance of rain across a ten-kilometer circle. They do not tell a night-shift nurse that the subway two kilometers ahead is three feet deep. They do not tell an ambulance driver which turn has turned into a canal.
Weather forecasts tell you what falls from the sky. They do not tell you where rain stops being rain and starts being a flood on your street.
That is the gap we set out to close.

We built SURGE. It is live on AWS at 3.109.121.81 , open-source at github.com/1shikapandey/Project-Surge , and it couples live Doppler radar, terrain elevation, and underground storm drains into street-level flood nowcasts.
We started with three pilot cities: Mumbai, Delhi, and Chennai. Here is what we learned when our code met the reality of Indian monsoons.
1. The radar thought it was a lovely sunny morning
On day three of building, our screen proudly showed Mumbai under clear, spotless blue skies.
Outside, an auto-rickshaw was floating past the Hindmata underpass with water up to its headlights.
Our server was not down. It had pulled a fresh Doppler radar image from the India Meteorological Department right on schedule. The problem was our own naivety: IMD publishes 8-bit indexed GIF images every ten minutes, and our code was doing exact hex color matching.
Between updates, the radar palette had shifted by two shades of green. Because our equality check failed, our parser silently swallowed thousands of storm pixels and decided the city was completely dry.
plaintext
// The line that swallowed a monsoonif (r === band.r && g === band.g && b === band.b) return band;
A crash gets fixed in ten minutes. A parser that silently discards an entire storm costs you hours while real streets drown outside.
We fixed it by building an adaptive tolerance engine that checks the mathematical distance between colors in the palette. We also wrote a debug tool that painted every recognized rain pixel in bright cyan. The moment the cyan mask hugged the real cloud edges on our screen, the data was finally real.
2. Weather is a forecast; flooding is fluid dynamics
A forecast looks twelve hours ahead across ten kilometers. A nowcast looks two hours ahead at an individual intersection.
That two-hour window is where lives are saved. In an Indian metro, an underpass does not take half a day to drown; it takes twenty-five minutes.
We quickly realized that rain volume alone is meaningless:
- 65 mm of rain on the grass of Sanjay Gandhi National Park absorbs into the soil and does nothing.
- 25 mm of rain on the asphalt of Milan Subway leaves cars floating.
Flooding is not a weather problem. It is what happens when surface runoff collides with gravity, concrete, and choked pipes.
We mapped the underground storm drains along actual road centerlines, calculated pipe discharge using Manning's hydraulic equation, and coupled it with ISRO CartoDEM terrain elevation. When runoff exceeds pipe capacity, the drain surcharges, water heads up the manhole shaft, and the drain begins fountaining backward onto the asphalt.
Then real physics taught us another lesson: the ocean pushes back.
Our model originally predicted that coastal roads in Mumbai and Chennai would stay dry during a 35 mm/hr shower. In real life, they were flooded. Why?
Astronomical high tide.
When the Arabian Sea rises above four meters, it drowns the river outfalls. Sluice gates slam shut to keep the sea out. Gravity drainage drops to zero, and the storm pipes choke. The water on the street has nowhere to go because the ocean is blocking the exit.
The moment we added live ocean tide curves and outfall backpressure into our equations, the simulation finally matched real municipal flood records.
3. From July deluge to April drought

This is the part of SURGE we are proudest of.
Every monsoon, Mumbai and Delhi flood so badly that daily life grinds to a halt. And yet, in the exact same country, cities like Chennai and Bengaluru make international headlines during summer for running out of drinking water.
This is not bad luck. It is a failure of routing.
The water that floods one neighborhood is treated as waste, left to destroy basements or pumped into the sea, while five kilometers away, families stand in lines for private water tankers.
Most flood systems stop at predicting where water pools. SURGE asks the next logical question: once excess water is identified, where can we safely send it?
We mapped urban storage infrastructure in real time across our pilot cities:
- Sewage Treatment Plants (STPs) with large equalization tanks.
- Urban retention lakes (like Powai Lake in Mumbai and Chetpet Lake in Chennai).
- Managed Aquifer Recharge (MAR) deep boreholes and injection wells.
When SURGE detects a drain choking, it does not just sound an alarm. It calculates the optimal diversion to the nearest under-utilized storage sink:
plaintext
[Surcharging Drain Node]│▼[Routing Engine: Checks Capacity in Real Time]│├──► Urban Retention Lakes (Store surface buffer)├──► STP Equalization Tanks (Buffer treatment)└──► Deep Injection Boreholes (Recharge groundwater)
Every sluice gate recommendation is logged to an immutable SHA-256 audit ledger so no gate is opened without a verifiable paper trail.
In practice, this turns a disaster into future security. A city fighting deluges in July can actively recharge its depleted aquifers for the scorching heatwave coming in April.
4. Routing by scooter, not by sedan

Consumer navigation apps route drivers based on traffic speed.
During an urban deluge, that is dangerous. A flooded underpass with two feet of water has zero cars on it. To a traffic algorithm, an empty road looks like a fast shortcut. Drivers follow the green line straight into an engine-killing pool.
SURGE routes vehicles strictly by mechanical clearance depth:
- Two-wheelers: blocked at 15 cm.
- Sedans and hatchbacks: blocked at 25 cm.
- SUVs: blocked at 40 cm.
- Emergency ambulances: cleared up to 60 cm.
A road with 22 cm of water stays green for a fire engine, turns yellow for an SUV, and shows up as a bright red roadblock for someone commuting home on an Activa.
Starting with three, building for all
We launched SURGE across three pilot metropolitan centers because each represents a distinct hydrological challenge:
- Mumbai: tidal backwater and choked river estuaries.
- Chennai: coastal basins and the acute paradox of summer water scarcity.
- Delhi: heavy concrete imperviousness and Yamuna floodplain overflow.
These three cities are our proving ground, but the platform was built from day one to scale.
Bengaluru drowns on its Outer Ring Road every year. Hyderabad faces flash floods along the Musi river basin. Kolkata wrestles with heritage brick sewers and Hooghly tidal surges.
Because our architecture is decoupled, adding a new city does not require rebuilding the app. It only requires plugging in an IMD radar station code, downloading the ISRO CartoDEM tile, and mapping the municipal drain graph. The AWS serverless pipeline, the hydraulic solver, and the excess water routing engine remain identical.
What it runs on in AWS

The stack is deployed in AWS Mumbai (
ap-south-1 ):- Amazon EC2: Runs the Next.js container on port 80 ( http://3.109.121.81 ), hosting the GIS map, physics solver, and routing engine.
- Amazon S3: Stores decoded radar JSON grids with a 60-day auto-drop lifecycle rule.
- Amazon DynamoDB: Handles citizen hazard reports and AI provenance audit records.
- Amazon EventBridge + Lambda: Triggers the radar fetch every ten minutes, keeping ingestion independent of web traffic.
- Amazon SNS: Broadcasts emergency alerts to authorities when water depth crosses 40 cm.
- Amazon Cognito: Manages officer sign-ins partitioned by city jurisdiction.
- Amazon CloudWatch: Monitors container latency and uptime alarms.
What we learned
- Weather is an input; terrain is the destination. A flood system that only watches the sky is just a rain gauge. You have to couple the clouds with the potholes, the underground pipes, and the ocean.
- Never let an operational AI do arithmetic. Let deterministic code compute the numbers. Use the model to explain those numbers, and verify every digit before a human reads it.
- Floods and droughts are two sides of the same broken pipe. Stopping at damage control is a missed opportunity. When you treat storm runoff as a resource to route into aquifers, today's flood becomes tomorrow's drinking water.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article