CaMa‐PyTorch (v1.0): A New Catchment‐Based Macro‐Scale Floodplain Model Written in PyTorch
Zenghui Liu, Qiyu Li, Qingliang Li, Zhongwang Wei, Cheng Zhang, Hua Yuan, Yunfeng Lv, Jingquan Ren,
Key points
From the paper's conclusion- Here, we present CaMa‐PyTorch (v1.0), a Python reimplementation of CaMa‐Flood v4.23 within PyTorch.
Abstract
Accurate simulation of river discharge underpins hydrological research, climate‐impact assessment, and flood forecasting. CaMa‐Flood, a widely used global river‐routing model, applies physically based principles to represent water transport through river networks. However, its legacy Fortran implementation restricts compatibility with modern AI frameworks and prevents efficient GPU utilization. Here, we present CaMa‐PyTorch (v1.0), a Python reimplementation of CaMa‐Flood v4.23 within PyTorch. A custom indexing scheme reproduces the flexible array operations of the Fortran model while preserving its river network logic and core algorithms. We evaluated numerical fidelity through modular tests and a continuous simulation over the continental United States at 0.0833° resolution from 2005 through 2010. Daily streamflow observations from the Global Runoff Data Centre (GRDC) provided an external benchmark, and model behavior was assessed using hydrograph comparisons, residual analyses, spatial diagnostics, and standard performance metrics. Across these evaluations, CaMa‐PyTorch closely reproduced the temporal and spatial discharge patterns generated by the Fortran implementation. Its tensor architecture also supports parallel computation and GPU execution. As a proof‐of‐concept for machine learning interoperability, a long short‐term memory (LSTM) network was used to postprocess simulated discharge and improved predictive performance. This experiment demonstrates output level coupling with a PyTorch data‐driven module but does not constitute a fully differentiable modeling system. CaMa‐PyTorch therefore provides a numerically faithful and computationally flexible basis for large scale river modeling and future research on more closely integrated physical and data‐driven approaches.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Continental‐Scale Dynamic Flood Routing via Graph Fourier Neural OperatorGeophysical Research Letters · 2026
- KNOU-Flood: Advancing global streamflow forecasting with lead-aware probabilistic machine learningarXiv · 2026
- Literature Review of Hybrid Neural–Physics Flood-Relevant Streamflow Forecasting with Cross-Event and Cross-Basin GeneralizationInternational Journal of Information Technology and Computer Science Applications · 2026
- HydroDiffusion: Diffusion‐Based Probabilistic Streamflow Forecasting With a State Space BackboneWater Resources Research · 2026
- Knowledge‐Guided Machine Learning for Operational Flood ForecastingWater Resources Research · 2025
- RiverScan: Learning to Accumulate on River NetworksarXiv · 2026