Technology

AI flood forecasting: what ML can and cannot do

How machine-learning flood models work, where they beat conventional models, and where a forecaster should still be careful.

When a phone alert says a river near you may flood, there is a fair chance that a neural network helped produce it. AI flood forecasting has moved from research papers to public warning services in a few years, and it has also attracted a lot of hype. Engineers and district officials reasonably want to know what these models actually do, what the evidence says, and whether they can be trusted on the day a river is rising. This article answers those questions in plain terms: how flood forecasting using AI works, what it has been shown to do well, and what it cannot do.

What does AI flood forecasting actually mean?

In almost every serious application, "AI" for flood forecasting means a machine-learning model trained to predict river discharge or level from rainfall, temperature and other inputs. It is a statistical model, not a thinking system. It is shown many years of weather and measured river flow, adjusts millions of internal weights until its predictions match the record, and is then asked to predict flow for conditions it has not seen.

The workhorse is the LSTM (long short-term memory) network, a kind of recurrent neural network. A recurrent network reads a time series step by step and carries a memory forward. An LSTM controls that memory with learned "gates", so it can hold information for weeks or months, such as winter snow that melts in spring. Kratzert and colleagues showed in 2018 that an LSTM could simulate daily runoff in 241 catchments of the CAMELS dataset (a large collection of US catchments with weather and flow records) with skill comparable to a well-calibrated conventional model. The mean Nash–Sutcliffe efficiency (NSE, explained below) was 0.63 for the LSTM against 0.58 for the benchmark [1].

It helps to separate three jobs that are often blurred together:

  • Simulation reproduces past flow from past weather. It is how models are tested.
  • Forecasting predicts future flow, using forecast weather as input.
  • Warning is a decision to tell people to act. It needs a forecast, a threshold, a message and a channel. A model is only the first part.

For the wider picture of how models fit together, see hydrological models explained and how a flood early warning system works.

How is an ML model different from a conventional hydrological model?

A conventional conceptual model writes down equations for stores of water (snow, soil, groundwater) and fluxes between them, then calibrates a handful of parameters for each catchment. A physically based model goes further and solves the governing equations on a grid. A machine-learning model skips the equations and learns the mapping from inputs to flow directly from data.

Three practical differences follow.

  1. One model for many catchments. A conceptual model is usually calibrated catchment by catchment. An LSTM can be trained on hundreds of catchments at once, given static attributes (area, slope, soil, climate) that tell it which catchment it is looking at. Kratzert and co-authors trained a single network on 531 CAMELS basins and found it outperformed regionally calibrated models and even individually calibrated ones, with a mean NSE of 0.67 for the entity-aware variant on the 447 basins modelled by all methods, against 0.17 for one regional benchmark and 0.44 for another [2].
  2. It needs a lot of data, and only some of it is local. Training uses many catchments, so the model can predict a basin it was never calibrated on, as long as that basin resembles the training set.
  3. It does not conserve mass by construction. A conceptual model cannot create water from nothing; a neural network can, unless it is specially constrained. The 2018 study describes the LSTM as having to learn mass balance and process relationships from data, rather than having them built in [1].

Interestingly, the networks sometimes learn process-like behaviour on their own. In one snow-influenced catchment, a single internal cell built up when temperatures fell below freezing and drained in spring, resembling a snowpack. The authors call this analysis preliminary and it rests on one cell in one catchment [1]. It is encouraging, not proof that the model "understands" hydrology.

What can machine learning do well?

Predict ungauged basins

Most of India's rivers have no long discharge record at the place you care about. Conventional models need such a record for calibration. A model trained across many basins can transfer what it learned, which is why Nearing and colleagues set out to build one for flood prediction in watersheds without gauges. Their 2024 paper in Nature reports that the AI model's reliability at up to a five-day lead time in ungauged watersheds is similar to or better than the reliability of zero-day nowcasts from the Copernicus Emergency Management Service's Global Flood Awareness System (GloFAS), a leading global system. It also reports that skill for five-year return-period floods is similar to or better than current skill for one-year events. The model is part of an operational service giving free public forecasts in over 80 countries [3].

The model is a global one. As the paper describes it, it runs two LSTMs in sequence, one reading 365 days of past weather and one reading a seven-day weather forecast, and was trained and tested out-of-sample by cross-validation across 5,680 streamflow gauges from the Global Runoff Data Centre [3]. In India, the same group's operational system has been running since 2018, using stage data from the Central Water Commission (CWC), and its inundation model computes flood extent and depth [4].

In our own work on Indian basins, we found the same pattern at national scale. We tested eight deep-learning models across 144 watersheds in the Indian subcontinent. The best model, a recurrent network that uses recent observed streamflow as an input, reached a median NSE of 0.71 on test basins, with 0.849 in tropical monsoon regions but only 0.586 in semi-arid ones. Because that model depends on lagged streamflow, it cannot serve a truly ungauged basin, so we built a second architecture that matches its skill without that input [5]. The lesson: ML skill differs a great deal by climate, and "ungauged" has to be engineered for, not assumed.

Handle large datasets and many catchments at once

An agency forecasting at hundreds of locations cannot hand-calibrate hundreds of models every year. A single trained network can produce a forecast at every point where it has the inputs, and can be retrained when new data arrive. This is a real operating advantage, separate from accuracy.

Do surprisingly well on extremes (with caveats)

A common worry is that a model trained on the past cannot predict a flood bigger than anything in its training record. Frame and colleagues tested this directly. They compared an LSTM with a conceptual model (SAC-SMA) and with the US National Water Model on events of increasing return period. The conceptual model deteriorated faster with event size. When the LSTM was trained only on events with return periods of five years or less, it still beat the conceptual model on average in every higher return-period bin [6]. That is genuinely encouraging.

But the same study found that errors grew for every model as events became rarer, and that the process-based National Water Model was slightly better than the LSTM in the 25–50 and 50–100 year bins, though its calibration period differed. The paper also carries a corrigendum, which the journal asks readers to consult [6]. "Does well on extremes" therefore means "degrades more gently than a calibrated conceptual model in this US dataset", not "is reliable for the flood of the century".

What can ML not do?

It cannot make good forecasts from bad inputs

A flood forecast is limited by its weather input. For a river catchment in the hills, a forecast rainfall field that is displaced by a few kilometres can turn a safe forecast into a missed flood. ML does not fix that. In the global model described above, the forecast LSTM reads weather forecasts, so its lead time is bounded by what the weather forecast can offer [3]. For short-lead rain forecasting, see nowcasting, and for reading uncertainty, ensemble forecasts.

It does not yet cover every kind of flood

The operational system built by the same group describes its focus as riverine floods in large, gauged rivers [4]. This matters in the Himalaya, where small, steep catchments respond in minutes to hours. A daily model driven by daily rainfall cannot see a cloudburst that peaks in one hour. See flash floods vs river floods for why warning time is so different, and time of concentration.

It can be wrong in ways that are hard to see

The usual yardstick, NSE, compares a model's squared errors with those of simply predicting the average flow. A score of 1 is perfect; 0 means no better than the mean. NSE is dominated by large values, yet it can still hide a missed peak.

Illustrative example. Suppose five hourly discharges (m³/s) are observed and simulated:

Observed:   10   14   30   22   12     mean = 17.6
Simulated:  11   13   24   21   13

Sum of squared deviations from the mean:
  (10-17.6)² + (14-17.6)² + (30-17.6)² + (22-17.6)² + (12-17.6)²
  = 57.76 + 12.96 + 153.76 + 19.36 + 31.36 = 275.2

Sum of squared errors:
  1² + 1² + 6² + 1² + 1² = 40

NSE = 1 - 40 / 275.2 = 0.855

An NSE of 0.86 looks excellent, yet the model under-predicted the peak by 6 m³/s, 20 % of the observed value. For a flood warning, that peak is the whole point. Even in the 2018 study, the LSTM underestimated peak flows more than the benchmark did [1].

A good score can hide a missed peak
012.52537.550Hour 1Hour 2Hour 3Hour 4Hour 5m³/s
Illustrative hydrograph used in the worked example above. The simulation scores an NSE of 0.86 yet underestimates the flood peak by 6 m³/s.

This is why flood forecasters also check peak error, timing error and event-based scores such as the fraction of threshold crossings correctly forecast. Metrics that suit a model-comparison paper are not the same as metrics that suit a warning service.

It does not explain itself

A warning officer asked "why did it say 4 m?" is poorly served by "the network said so". Conceptual models can at least be inspected for which store is full. Research on interpreting neural-network states is active, but the interpretation in the 2018 study, for example, was one cell in one catchment [1]. Nearing and co-authors argue in a 2021 commentary that the hydrology community's preference for models built on a particular kind of "process understanding" is subjective rather than evidence-based, and that the field should measure where such understanding really adds value [7]. That is a call for evidence, not a claim that physics no longer matters.

It does not conserve mass or respect physics unless you make it

Frame and colleagues tested a mass-conserving version of the LSTM and found that adding the constraint reduced skill for extreme events [6]. This is a reminder that "physically consistent" and "more accurate" are not always the same thing, and that each should be tested instead of assumed.

It cannot replace measurements

Every number above came from a model trained on measured streamflow. The Nature paper's authors conclude that more widely available hydrological data would further improve global access to reliable flood warnings [3]. A model trained on a gauge with a drifting zero or a stale rating curve learns the error. Quality control of the data is not optional; see data quality control for hydromet time series and rating curves and their uncertainty.

In practice, the best protection against a model failing quietly is an observation that disagrees with it. A river sensor that reports rising level and its rate of rise (see rate-of-rise alerts) every few minutes does not care what the forecast said.

Is an ML forecast better than a conventional one?

It depends on the question, the catchment and the data. A fair summary of the evidence cited here:

QuestionWhat the evidence says
Daily simulation in well-gauged catchmentsLSTMs matched or beat calibrated conceptual models in the US CAMELS studies [1][2]
Prediction at sites with no gaugeA global model matched or beat a leading global system's nowcasts at up to five days in the Nature study [3]
Rare, large eventsLSTM degraded more gently than a conceptual model in a US test, but error rose for all models and a process-based model was slightly better in some bins [6]
Indian basinsMedian NSE 0.71 on test basins, from 0.849 (tropical monsoon) to 0.586 (semi-arid) for the best model [5]
Flash floods and urban floodsOutside the stated focus of the operational system, which is large, gauged rivers [4]; small steep catchments need different data and time resolution
Mass balance and physicsMust be imposed; a mass-conserving variant lost skill on extremes in one test [6]

Notice what the table does not say: that any ML model is "better" everywhere. The strongest results all come with the same setup: lots of training data, many catchments, daily or coarser time steps, and rivers large enough that weather forecasts are skilful at the lead time of interest.

Where do ML and physics work best together?

The most sensible reading of the evidence is not "ML versus physics" but a division of labour:

  • Use ML where the data are rich and the question is a river flood with hours to days of lead time, especially for ungauged or poorly gauged basins.
  • Keep process-based and hydraulic models for inundation mapping, structure operation and scenarios, where changing the physics (a new embankment, a gate rule) must change the answer. A purely statistical model has no way to know about a structure that did not exist in its training years.
  • Keep observations in the loop. Local sensors tell you when the model is wrong. The better a station network, the more a forecast can be checked and corrected.
  • Report uncertainty. A forecast of "3.8 m" invites false confidence; a range invites a decision. See measurement uncertainty in plain language.

There is a human side too. A model that raises too many warnings teaches people to ignore them; see alarm fatigue. A warning must also be issued by the authorised agency. In India the CWC provides flood forecasts and warnings [4], and a model, however good, is an input to that process, not a substitute for it.

A short checklist for officials evaluating an ML flood forecast

You do not need to be a data scientist to ask useful questions:

  1. What was it tested on? Basins like yours, in climates like yours, or only elsewhere?
  2. Was it tested on events it had not seen, and on rare events specifically?
  3. How does it do on peaks and timing, not just overall scores such as NSE?
  4. What weather forecast drives it, and what lead time does that forecast support?
  5. What does it do when a sensor fails or an input is missing?
  6. Does it give a range or only a single value?
  7. Who checks it against observations, and how often is it retrained?

Key points

  • "AI flood forecasting" means a statistical model, most often an LSTM, trained on weather and measured river flow. It learns patterns; it does not solve equations.
  • Evidence from large studies shows ML can match or beat calibrated conventional models in daily simulation and can transfer to ungauged basins [1][2][3].
  • ML degrades more gently on extreme events than a conceptual model in at least one large test, but all models get worse as events get rarer [6].
  • Skill depends on the weather input, the climate and the data. The operational systems described focus on large, gauged rivers [4]; flash floods in small steep catchments are a different problem.
  • A high NSE can hide a missed peak; check peaks, timing and threshold hits, and keep real-time observations in the loop.

Where ClimMaTech fits

Whatever model is running, a forecast is only as good as the measurements that train and check it. At ClimMaTech we build the observation side: Tarang records river level with radar, PRAVAAH adds surface-velocity discharge, and DoorDrishti adds an AI camera for edge analysis of what the river is doing now. Our flood warning solution page describes how such observations connect to alerts and sirens, whichever forecast model an agency uses upstream.

References

  1. F. Kratzert, D. Klotz, C. Brenner, K. Schulz, M. Herrnegger, Rainfall–runoff modelling using Long Short-Term Memory (LSTM) networks, Hydrology and Earth System Sciences 22, 6005–6022, 2018. doi:10.5194/hess-22-6005-2018
  2. F. Kratzert, D. Klotz, G. Shalev, G. Klambauer, S. Hochreiter, G. Nearing, Towards learning universal, regional, and local hydrological behaviors via machine learning applied to large-sample datasets, Hydrology and Earth System Sciences 23, 5089–5110, 2019. doi:10.5194/hess-23-5089-2019
  3. G. Nearing et al., Global prediction of extreme floods in ungauged watersheds, Nature 627, 559–563, 2024. doi:10.1038/s41586-024-07145-1
  4. S. Nevo et al., Flood forecasting with machine learning models in an operational framework, Hydrology and Earth System Sciences 26, 4013–4032, 2022. doi:10.5194/hess-26-4013-2022
  5. S. Barbhuiya, V. Gupta, From gauged to ungauged: Large-scale deep learning rainfall-runoff modelling for reliable streamflow estimation in India's diverse basins, Environmental Modelling & Software 194, 106696, 2025. doi:10.1016/j.envsoft.2025.106696
  6. J. M. Frame et al., Deep learning rainfall–runoff predictions of extreme events, Hydrology and Earth System Sciences 26, 3377–3392, 2022 (a corrigendum has been published). doi:10.5194/hess-26-3377-2022
  7. G. S. Nearing et al., What role does hydrological science play in the age of machine learning?, Water Resources Research 57(3), e2020WR028091, 2021. doi:10.1029/2020WR028091
flood forecastingmachine learningdeep learninglstmrainfall-runoffungauged basinsearly warninghydrology
Siddik Barbhuiya
Written by
Researcher