Inspiration
In the first hours of an oil spill, responders have to decide where the oil will go, which shoreline it hits first, and where to put a limited supply of boom. Today most agencies hire consultants or wait for specialist modellers, which is expensive and slow when every hour counts. We wanted a tool that answers those first questions in seconds, on real forecast data, so agencies can do it themselves.
What it does
OilFlood is a map of the Gulf of Mexico in the browser, run from one panel.
- Past spills: replay real Gulf spills like Deepwater Horizon (9 spills from 1979 to 2023, from NOAA IncidentNews). Spills from 2001 on are re-simulated on the HYCOM ocean reanalysis for their actual dates and compared with the real response.
- New spill: type coordinates and an amount in tons or barrels, or click the map to pick the spot. OilFlood forecasts where the oil goes over the next 72 hours on live NOAA RTOFS ocean currents and NCEP GFS winds, which refresh 4 times a day. It shows the slick as a black polygon, plus the oil budget (evaporated, dispersed, on the surface, stranded).
- Probabilities: each forecast runs 20 times with slightly different wind, current and spreading, so you see the odds that each stretch of coast gets oiled and the earliest, likely and latest arrival times.
- Action plan: shorelines are ranked by the chance of oil and by NOAA's Environmental Sensitivity Index. The plan shows where to put boom first and by when, playing out as pending, en route, then deployed or too late. It also gives go/no-go windows for dispersants, burning and skimming based on the real Gulf protocols. All of it becomes a timed action document you can export as Markdown, CSV or a printable page.
How we built it
- Backend: Python with FastAPI. OpenDrift's OpenOil model is the baseline, next to our own particle model with evaporation, dispersion, emulsification and stranding.
- Live data: a systemd timer pulls NOAA RTOFS 1/12° currents and NCEP GFS 0.25° winds 4 times a day.
- Historical data: HYCOM-TSIS Gulf reanalysis (2001–2024) and HYCOM GOFS 3.1.
- AI model: a gradient-boosting drift correction trained on 14,089 hourly positions from 42 NOAA Global Drifter Program drifters. It's experimental and off by default because our backtest showed no gain on oil.
- Frontend: TypeScript, MapLibre and deck.gl, built with Vite and served through a Cloudflare tunnel.
Challenges we ran into
- The newest public HYCOM forecast was 5 days old and didn't reach 72 hours ahead, so we switched live currents to NOAA RTOFS and kept HYCOM as a fallback.
- At about 4 km resolution the ocean models treat Galveston Bay as land, so oil released inside the bay strands right away.
- Our ML correction improved drifter tracks but not oil forecasts. We only found that out because we backtested it honestly, so we turned it off by default.
- Spills before 2001 have no ocean reanalysis, so those show the record and the response log only.
Accomplishments that we're proud of
- A live 72-hour forecast for any point in the Gulf, built on real NOAA data, in about 20 seconds.
- Our own physics model, compared side by side with OpenOil on the same inputs.
- A trained ML model with a proper hold-out test, and a backtest that says where it fails.
- A database of 9 spills with 280 dated responder actions, each with a source link.
- An action plan built on real NOAA ESI shoreline data (2,686 coastal cells from Texas to the Florida Keys).
What we learned
- The physics of oil drift: wind drift, spreading, evaporation, emulsification.
- How to score a forecast honestly against a baseline.
- That an ML model can improve what it was trained on and still not improve what you actually care about.
- How responders really work: sensitivity rankings, dispersant and burn windows, boom lead times.
What's next for OilFlood
- Add more modular functionality: plug-in models, more oil and release types such as leaking wells and pipelines, and more regions beyond the Gulf.
- Make it a free tool that any agency, port or community can use without hiring a consultant.
- Test it with real responders.
Built With
- cloudflare
- deck.gl
- fastapi
- gfs
- hycom
- machine-learning
- maplibre
- noaa
- opendrift
- python
- rtofs
- scikit-learn
- typescript
- vite