AIFL: A Global Daily Streamflow Forecasting Model Using a Deterministic LSTM Pre-trained on ERA5-Land and Fine-tuned on IFS
Authors: Maria Luisa Taccari, Kenza Tazi, Oisín M. Morrison, Andreas Grafberger, Juan Colonese, Corentin Carton de Wiart, Christel Prudhomme, Cinzia Mazzetti, Matthew Chantry, Florian Pappenberger
Organizations: European Centre for Medium-Range Weather Forecasts (ECMWF), Reading, United Kingdom · European Centre for Medium-Range Weather Forecasts (ECMWF), Bonn, Germany
Reliable global streamflow forecasting is essential for flood preparedness and water resource management, yet data-driven models often suffer from a performance gap when transitioning from historical reanalysis to operational forecast products. This paper introduces AIFL (Artificial Intelligence for Floods), a deterministic LSTM-based model designed for global daily streamflow forecasting. Trained on 18,588 basins curated from the Caravan dataset, AIFL utilises a two-stage transfer-learning strategy to bridge the reanalysis-to-forecast domain shift. The model is first pre-trained on 40 years of ERA5-Land reanalysis (1980-2019) to capture robust hydrological processes, then fine-tuned on operational Integrated Forecasting System (IFS) forecasts (2016-2019) to adapt to the specific error structures and biases of operational numerical weather prediction. Ablation experiments confirm that this two-stage approach outperforms both a naive IFS-only baseline and a mixed-forcing single-stage alternative. To our knowledge, this is the first global model trained end-to-end within the Caravan ecosystem. On an independent temporal test set (2021-2024), AIFL achieves high predictive skill with a median modified Kling-Gupta Efficiency (KGE') of 0.66 and a median Nash-Sutcliffe Efficiency (NSE) of 0.53. Benchmarking results show that AIFL achieves comparable accuracy to current state-of-the-art global systems. The model provides a streamlined and operationally robust baseline for the global hydrological community.
Figures & tables
Figure 1: Schematic of the AIFL framework. The model architecture uses separate Multi-Layer Perceptron (MLP) embedding layers for static and dynamic inputs, feeding a shared LSTM core that processes a 170-day hindcast-window to generate 10-day forecasts. The training strategy transitions from ERA5-Land reanalysis pre-training to IFS forecast fine-tuning to resolve domain shifts.
Figure 2: Global spatial distribution of the 18,588 quality-controlled streamflow stations across the three experimental stages: pre-training, fine-tuning, and testing. The inset diagrams provide the frequency distribution of basin surface areas (on a log10 scale) for each subset.
Variable
Description
Unit
SSR
Surface net solar radiation
Wm−2
STR
Surface net thermal radiation
Wm−2
SP
Surface pressure
kPa
T2M
Air temperature at 2 metres
∘C
TP
Total daily precipitation
mmd−1
Table 1: Input features for the AIFL model. The selection is restricted to variables shared across ERA5-Land reanalysis and IFS forecasts in the Caravan MultiMet dataset [ 24 ] to facilitate seamless transferability from pre-training to operational inference.
Figure 3: Global station availability over time (1950–2023). Shaded regions indicate the splits for pre-training and fine-tuning (green), validation (blue), and testing (orange).
Component
Configuration
Recurrent layer
Single-layer LSTM
Hidden state size
1024
Dropout (output)
0.4
Static embedding
3-layer MLP (30, 20, 64) with tanh
Dynamic embedding
3-layer MLP (30, 20, 64) with tanh
Temporal window
180 days
Table 2: Summary of the AIFL model architecture and hyperparameter choices.
Figure 4: Global spatial distribution of the normalised Wasserstein distance ( W1 ) between ERA5-Land reanalysis and 1-day lead time (LT1) IFS daily precipitation, computed for 2,003 basins over a common 4-year period (2016–2019). W1 is the Earth Mover’s Distance between the wet-day ( >1 mm) precipitation distributions, normalised by the mean ERA5-Land wet-day precipitation, yielding a dimensionless measure of relative distributional shift. The right panel shows the cumulative distribution of W1 by continent.
Phase
Input Data Source
Period
Primary Purpose
Pre-training
ERA5-Land Reanalysis
1980 – 2019
Learn universal hydrology
Fine-tuning
IFS Control (LT1)
2016 – 2019
Operational alignment
Validation
IFS Control (LT1)
2020
In-time generalisation
Temporal Test
IFS Control (LT1)
2021 – 2024
Operational performance
Table 3: AIFL experimental design and operational periods across the 18,588-station network.
Figure 5: Hydro-meteorological time series for the Hokitika River, Gorge (New Zealand; 363 km 2 ) during 2022. Top: precipitation ( P ) from ERA5-Land (blue) and IFS Control LT1 (yellow). Bottom: observed discharge ( Q ; black dashed) compared against two AIFL model configurations both forced by the same IFS Control LT1 inputs: the pre-trained model (steel blue) and the fine-tuned model (red). This direct comparison isolates the impact of the model weights, demonstrating how the fine-tuned AIFL learns to correct for the systematic wet bias in IFS precipitation peaks to align streamflow magnitudes with observations.
Figure 6: Global performance metrics for the AIFL model across 2,003 test basins. Grey histograms show the station frequency distribution and red curves the empirical cumulative distribution function (CDF). Green vertical dashed lines denote the ideal target value (1.0) for each metric; median values are annotated in each panel. From left to right: KGE ′ (median 0.66), NSE (0.53), Pearson correlation r (0.81), variability ratio α (0.93), and bias ratio β (1.00).
Figure 7: Global and regional forecast performance (KGE ′ ) for the 2021–2024 test period. The left panels show the global distribution of station-level KGE ′ (top), and detailed regional insets for Europe, North America, South Africa, and Australia/New Zealand (bottom). The right panel shows the cumulative distribution of KGE ′ by continent: North America and Europe achieve the highest median skill, while Africa shows the widest spread and lowest median, consistent with the concentration of arid and intermittent-flow basins in that region.
Figure 8: AIFL performance as a function of IFS forcing lead time calculated across 2,003 test basins. (a) Median KGE ′ , NSE, and Pearson r decrease monotonically from LT1 to LT10. NSE becomes negative beyond LT5, indicating the model performs worse than the mean-flow baseline at longer lead times. (b) Distribution of KGE ′ for each lead time. The same model weights are used throughout; only the input forcing quality changes.
FAR
POD
Precision
Return Period
Dual
Single
Dual
Single
Dual
Single
1.5 yr
0.153
0.580
0.390
0.500
0.847
0.420
2 yr
0.159
0.587
0.308
0.457
0.841
0.413
5 yr
0.143
0.627
0.143
0.353
0.857
0.373
10 yr
0.000
0.706
0.000
0.250
1.000
0.294
20 yr
0.000
0.882
0.000
0.000
1.000
0.118
Table 4: Global event-based verification statistics for AIFL under dual-threshold and single-threshold frameworks for the test set. Dual threshold : observed and simulated exceedances are identified using Gumbel thresholds fitted independently to their respective annual maxima. Single threshold : both observed and simulated exceedances are identified using thresholds fitted to the observed annual maxima only.
Figure 9: Comparative performance metrics between AIFL (navy) and the Google global model (orange) across 1,218 shared stations. Histograms show the frequency of performance scores, while curves show empirical cumulative distribution functions (ECDFs) for KGE ′ , NSE, correlation, variability, and bias.
Figure 10: Diagnostic benchmarking of AIFL against the Google global model across 1,218 shared evaluation stations. (a) Distribution of catchment areas on a logarithmic scale, showing that most shared stations fall in the 1,000–10,000 km 2 range. (b) KGE ′ performance stratified by basin area class ( < 1,000 km 2 , 1,000–10,000 km 2 , > 10,000 km 2 ), with medians and interquartile ranges for both models. (c) Spatial distribution of Δ KGE ′ (AIFL minus Google): blue markers indicate basins where AIFL achieves higher skill, red markers indicate basins where Google performs better. Markers are sorted so that stations with the largest absolute differences are plotted on top.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 11: Storm Henk case study (December 2023 – January 2024) at the Straimont station, Belgium (GRDC ID 6221570; 182km2 ). Top: geographic context showing the station location and upstream catchment boundary. Bottom: observed streamflow (orange dashed line) and ten-day AIFL forecasts issued on successive days (blue lines; colour indicates the forecast issue day relative to the observed peak on 3 January 2024, day 0). Horizontal dashed lines mark 2-, 5- and 20-year return-period thresholds derived from observed (orange) and simulated (green) streamflow climatologies; the systematic offset between the two sets reflects a negative bias in the model’s long-term streamflow distribution.
Max Planck Institute for Biogeochemistry, Germany · European Centre for Medium-Range Weather Forecasts (ECMWF), United Kingdom · Institute of Bio- and Geosciences Agrosphere (IBG-3), Research Centre Jülich, Germany +2