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.
Accurate forecasting of river discharge and floods is very challenging. River dynamics are affected by storage, meteorological forcing, and flow propagation at different spatial and temporal scales. Forecasting thus requires a framework that considers the upstream-to-downstream flow through river networks across grid cells and catchments. This modeling is known in hydrology as distributed modeling and routing. Existing deep learning approaches either ignore this topology, operate on lumped catchments, or route predicted physical quantities through a separate graph or physical routing model. We instead introduce feature-space routing: a topology-aware state-space operator embedded directly in the forecasting dynamics. At every forecast step, the operator gathers latent states from upstream grid cells and causally updates the downstream state according to the known river network. This preserves the physical connectivity of the river system while allowing the propagated state itself to be learned end-to-end and allows the model to predict river discharge considering both local dynamics and neighboring upstream contributions. To address uncertainty and provide probabilistic forecasts, we minimize the fair continuous ranked probability score (fCRPS) as a training objective. Our experiments on the European Flood Awareness System (EFAS) and observational data for river discharge forecasting demonstrate that encoding the physical structure of river networks explicitly in the feature space substantially improves the forecasting skill, particularly in an ungauged setting. Our approach achieves state-of-the-art results on both reanalysis and observational data and is able to forecast maps of river discharge at 1 arcminute and 6-hourly resolution up to 10 days lead time.
Mohamad Hakam Shams Eddin, Maria Luisa Taccari, Yikui Zhang +3
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
Numerical weather prediction has long been constrained by the computational bottlenecks inherent in data assimilation and numerical modeling. While machine learning has accelerated forecasting, existing models largely serve as "emulators of reanalysis products," thereby retaining their systematic biases and operational latencies. Here, we present FuXiWeather2, a unified end-to-end neural framework for assimilation and forecasting. We align training objectives directly with a combination of real-world observations and reanalysis data, enabling the framework to effectively rectify inherent errors within reanalysis products. To address the distribution shift between NWP-derived background inputs during training and self-generated backgrounds during deployment, we introduce a recursive unrolling training method to enhance the precision and stability of analysis generation. Furthermore, our model is trained on a hybrid dataset of raw and simulated observations to mitigate the impact of observational distribution inconsistency. FuXiWeather2 generates high-resolution (0.25∘) global analysis fields and 10-day forecasts within minutes. The analysis fields surpass the NCEP-GFS across most variables and demonstrate superior accuracy over both ERA5 and the ECMWF-HRES system in lower-tropospheric and surface variables. These high-quality analysis fields drive deterministic forecasts that exceed the skill of the HRES system in 91% of evaluated metrics. Additionally, its outstanding performance in typhoon track prediction underscores its practical value for rapid response to extreme weather events. The FuXiWeather2 analysis dataset is available at https://doi.org/10.5281/zenodo.18872728.
Xiaoze Xu, Xiuyu Sun, Songling Zhu +5
Shanghai Academy of Artificial Intelligence for Science, Shanghai, & 200232, China. · Artificial Intelligence Innovation and Incubation Institute, Fudan University, Shanghai & 200433, China. · FuXi Intelligent Computing Technology Co., Ltd., Shanghai & 200233, China.
Watershed networks exhibit convergent topologies in which multiple tributaries merge into downstream channels,integrating diverse upstream hydrological processes. In ungauged basins, the absence of direct observations increases uncertainty and limits the ability to anticipate extreme events. This study evaluates whether an encoder-only Transformer provides an advantage over an LSTM for upstream streamflow inference under limited hydrologic information, using retrospective simulations from the NOAA National Water Model (NWM). Across both upstream-only and combined configurations, the LSTM showed stronger overall performance than the Transformer model across the two configurations. Incorporating downstream information further boosted performance for all models, increasing median NNSE by more than 60%. Rather than treating this as a leaderboard-style comparison, we interpret the experiments as a test of architectural inductive bias for hydrologic sequence inference. The results indicate that recurrent memory remains better aligned with this upstream reconstruction task than an encoder-only Transformer, while downstream hydrologic context provides a strong auxiliary constraint that substantially improves prediction skill across architectures
Taye Akinrele, James Halgren, Noorbakhsh Amiri Golilarz +2
Dept. of Computer Science, The University of Alabama, Tuscaloosa, USA · Alabama Water Institute, USA