Accurate flood forecasts several days ahead are critical for flood control, water‑resource management, and emergency response. Achieving high‑resolution forecasts over a continental domain requires both local hydrological detail and spatial context ranging from river basins to synoptic weather systems.
We introduce Hapi, a U‑Net Swin Transformer that leverages fine three‑dimensional patches and hierarchical shifted‑window attention to predict discharge, surface runoff, snow water equivalent, and soil wetness across the contiguous United States.
The model produces $24$–$72$‑hour forecasts at $0.05^{\circ}$ resolution using reconstructed weather and land‑surface inputs from ERA5‑Land. During training, learned Laplacian task weights dynamically adjust each variable’s contribution to the loss.
On 2024 test data, Hapi outperformed an operational physics‑based model and a state‑of‑the‑art AI baseline in flood detection. Independent validation against 3,881 USGS gauges and a Hurricane Helene case study confirmed its superiority over the physics model in reproducing daily discharge.
Controlled experiments showed that learned task weighting strengthens rare‑flood detection, which is especially sensitive to changes in precipitation inputs.
A full four‑variable, 72‑hour forecast runs in an average inference time of $0.11$ seconds on a single A100 GPU.
Review: Hapi combines fine‑grained spatial features with multi‑task weighting to deliver high‑resolution, fast, and more robust hydrological forecasts, especially for rare extreme events, offering a new paradigm for large‑scale flood monitoring.