Code and trained models for: From Forecast to Alert: Designing an AI-Driven Flood Early Warning System for the White Volta Basin Using Open Satellite Data
Description
Source code and trained machine learning models supporting the manuscript "From Forecast to Alert: An AI-Driven Flood Early Warning System for Ghana's White Volta Basin" submitted to Natural Hazards and Earth System Sciences (NHESS).
This repository contains the complete computational pipeline for designing an end-to-end AI-driven flood early warning system (FEWS) for the White Volta Basin, Ghana, using entirely open-access satellite and reanalysis data (1985--2024). The workflow covers data preprocessing, model training and leave-one-year-out (LOYO) cross-validation for three machine learning algorithms (Random Forest, XGBoost, LSTM), four-tier alert threshold calibration based on flood return periods, and Sentinel-1 SAR inundation mapping for independent validation of five historical flood events.
Contents:
code/preprocessing/ - Scripts for downloading and aligning ERA5, GloFAS, soil moisture, CHIRPS rainfall, Bagre Dam storage, and SRTM DEM data, plus the full feature engineering pipeline.
code/models/ - Training scripts for RF, XGBoost, and LSTM ensemble models, and threshold design scripts (original and LOYO-revised).
code/validation/ - Google Earth Engine scripts for Sentinel-1 flood extent mapping, alert validation analysis, and operational architecture specification.
models/ - Trained model weights for all three algorithms.
Study area: White Volta Basin, Northern Ghana. Key gauge: Nawuni (9.95 N, 1.08 W). Catchment area: approximately 92,950 sq km.
All input datasets are freely available from the Copernicus Climate Data Store, Google Earth Engine, and the Global Runoff Data Centre. Download scripts with exact API parameters are included for full reproducibility.