Machine Learning Flood Prediction: HEC-RAS vs Random Forest
Explore a master's thesis on using Random Forest as a surrogate for HEC-RAS 1D and 2D flood modelling in Bavaria, improving real-time forecasting speed.
Master's Thesis Presentation
Machine Learning–Based Flood Prediction
1D and 2D Flooding in the Kulmbach Area and the Isar River
Dhwisha Jatinkumar Saraiya
M.Sc. Environmental Engineering
M.Sc. Mohammad Najim Nasimi
Technical University of Munich
March 2026
Outline
Introduction & Motivation
Research problem and context
Research Questions & Objectives
Key questions this thesis addresses
Study Area
Kulmbach & Isar River, Bavaria
Data & Input Features
Features used in the RF model
HEC-RAS Hydrodynamic Model
1D & 2D simulation setup
Random Forest Model
ML methodology & feature importance
Results & Comparison
HEC-RAS vs RF performance
Conclusion & Outlook
Key findings and future work
Introduction & Motivation
Research Problem
Flood modelling is essential for effective flood risk management and disaster preparedness.
Hydrodynamic models such as HEC-RAS provide accurate simulations but are computationally expensive and time-intensive.
Real-time flood forecasting demands faster predictive approaches that can operate with limited computational resources.
This creates a critical need for Machine Learning–based surrogate models that can replicate hydrodynamic model outputs rapidly and accurately.
Study Areas: Kulmbach (1D) | Isar River (2D)
Research Questions & Objectives
Research Questions
Can a Random Forest model accurately predict 1D flood inundation depth in the Kulmbach area as a surrogate for HEC-RAS?
Can the RF model be extended to predict 2D inundation patterns along the Isar River?
How does the RF model's prediction accuracy and computational efficiency compare to HEC-RAS simulations?
Research Objectives
Develop and calibrate a HEC-RAS 1D/2D hydrodynamic model for the study areas.
Generate a training dataset from HEC-RAS simulation outputs.
Train and validate a Random Forest regression model for flood depth prediction.
Compare RF predictions against HEC-RAS results spatially and statistically.
Evaluate the potential of ML as a real-time flood forecasting tool.
Study Area
Kulmbach Area (1D Model)
Isar River (2D Model)
Both areas are located in Bavaria, Germany — subject to significant flood risk from intense rainfall and snowmelt events.
Data & Input Features
Features used in the Random Forest model — derived from spatial and hydrological datasets
Digital Elevation Model (DEM)
Elevation, slope, terrain derivatives
Manning's Roughness (n)
Derived from land use: Urban ≈ 0.10, Agriculture ≈ 0.04, Forest ≈ 0.12, Water ≈ 0.035
Discharge (Q)
Upstream boundary condition & flow input
Water Surface Elevation
From HEC-RAS simulation outputs
Hydraulic Radius
Cross-section geometry parameter
HEC-RAS Simulation Outputs
Used as training labels (inundation depth)
Land use and distance to river are NOT used as direct model features — Manning's n (derived from land use) is used as a proxy.
DEM, land use maps, gauge station discharge data, HEC-RAS outputs.
Methodology Overview
Data Collection
DEM, discharge data, land use maps
HEC-RAS Modelling
1D (Kulmbach) & 2D (Isar) simulation, calibration & validation
Training Data Generation
Extract features & labels from HEC-RAS outputs
Random Forest Model
Train RF regressor, hyperparameter tuning, cross-validation
Evaluation & Comparison
Compare RF vs HEC-RAS: RMSE, R², MAE, spatial maps
1D Model
Kulmbach Area
2D Model
Isar River
HEC-RAS Hydrodynamic Model
1D Model: Kulmbach
HEC-RAS 1D
White Main & Roter Main
Cross-sections defined along channel
Urban ≈ 0.10
Agriculture ≈ 0.04
Forest ≈ 0.12
Water ≈ 0.035
Upstream discharge, downstream water level
Nash-Sutcliffe Efficiency (NSE), RMSE
Water surface elevation & inundation depth per cross-section
2D Model: Isar River
HEC-RAS 2D
Isar River (Bavaria)
2D computational mesh over floodplain
Same Manning's n values derived from land use
Upstream hydrograph, downstream normal depth
2D inundation depth maps, velocity fields
Manning's n is used as an INPUT FEATURE to the RF model — it is NOT predicted by the model. Values are derived from land use classification.
Literature Review
State of the Art & Research Motivation
ML as Surrogate for Hydrodynamic Models
Random Forest, ANN, and XGBoost have been used as surrogate models for HEC-RAS
Demonstrated significant speedup with comparable accuracy
Random Forest in Flood Prediction
RF handles non-linear relationships well
Robust to overfitting with ensemble approach
Used successfully for flood depth and extent prediction
1D vs 2D Flood Modelling
fast, suitable for river channels
capture lateral floodplain dynamics
ML surrogates can replace both types
Research Gap
Limited studies directly compare 1D and 2D RF surrogates
Few studies validate RF against HEC-RAS across multiple return periods
This thesis addresses these gaps for Bavarian study areas
Random Forest Model — Feature Importance
Random Forest Regressor (scikit-learn)
Inundation Depth (meters)
DEM elevation, slope, Manning's n, discharge (Q), hydraulic radius, water surface elevation
80/20 train-test split, k-fold cross-validation
n_estimators, max_depth, min_samples_split optimized via grid search
Observed & Interpolated Inundation Depth
Methodology for generating spatially distributed inundation depth from HEC-RAS point outputs
HEC-RAS Point Outputs
Spatial Interpolation
Observed Inundation Depth Map
This interpolated depth raster serves as the 'observed' reference for comparing RF predictions against HEC-RAS results.
Results: HEC-RAS vs Random Forest — 1D (Kulmbach)
HEC-RAS 1D
HEC-RAS Simulated Depth (m)
High physical accuracy
Computation time: hours
Requires full hydraulic setup
Random Forest Prediction
RF Predicted Depth (m)
Near-instant prediction
Trained on HEC-RAS outputs
Generalizes across flow scenarios
0.12
0.94
0.08
Note: HEC-RAS serves as the reference benchmark. RF model is evaluated against HEC-RAS outputs.
Results: HEC-RAS vs Random Forest — 2D (Isar River)
HEC-RAS 2D
HEC-RAS 2D Simulated Depth (m)
Full 2D mesh simulation · Captures lateral floodplain spread
Random Forest 2D Prediction
RF 2D Predicted Depth (m)
Pixel-wise RF prediction using spatial features · Near-instant output
0.18
0.91
0.13
87%
Difference map analysis: RF model shows good agreement in main channel; minor deviations at floodplain boundaries.
Model Validation & Performance
1D Model (Kulmbach) Performance
0.92
0.15 m
0.11 m
0.89
2D Model (Isar River) Performance
0.88
0.21 m
0.16 m
0.85
R²
RMSE
MAE
Nash-Sutcliffe Eff.
Extent F1-Score
Cross-validation (k=5) used to prevent overfitting. Model tested on unseen HEC-RAS simulation scenarios.
Conclusion & Outlook
Key Conclusions
HEC-RAS 1D and 2D models successfully developed and calibrated for Kulmbach and Isar River
Random Forest trained on HEC-RAS outputs demonstrated strong predictive capability (R²>0.88)
RF provides near-instant flood depth predictions vs. hours of HEC-RAS computation
Manning's n (derived from land use) is an effective and important RF input feature
RF captures main inundation patterns well; minor deviations at complex channel boundaries
Future Outlook
Extend to larger spatial domains and additional Bavarian river systems
Incorporate real-time discharge data for operational flood forecasting
Test deep learning alternatives (CNN, LSTM) for spatial flood prediction
Integrate uncertainty quantification into depth predictions
Combine with early warning systems for practical flood management applications
Machine Learning offers a computationally efficient, accurate complement to traditional hydrodynamic modelling for real-time flood forecasting.
References
Brunner, G. W.
(2016). HEC-RAS River Analysis System: Hydraulic Reference Manual. US Army Corps of Engineers, Hydrologic Engineering Center.
Breiman, L.
(2001). Random Forests. Machine Learning, 45(1), 5–32.
Kabir, S., Patidar, S., Xia, X., Liang, Q., Neal, J., & Pender, G.
(2020). A deep convolutional neural network model for rapid prediction of fluvial flood inundation. Journal of Hydrology, 590, 125481.
Bermúdez, M., Neal, J. C., Bates, P. D., Coxon, G., Freer, J. E., Cea, L., & Puertas, J.
(2017). Quantifying uncertainty in a HEC-RAS modelling study. Advances in Water Resources, 109, 134–148.
Tehrany, M. S., Pradhan, B., & Jebur, M. N.
(2014). Flood susceptibility mapping using a novel ensemble weights-of-evidence and support vector machine models. Science of the Total Environment, 478, 76–93.
Mosavi, A., Ozturk, P., & Chau, K. W.
(2018). Flood prediction using machine learning models: Literature review. Water, 10(11), 1536.
Pedregosa, F., et al.
(2011). Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
Chow, V. T.
(1959). Open-Channel Hydraulics. McGraw-Hill, New York.
Bates, P. D., Horritt, M. S., & Fewtrell, T. J.
(2010). A simple inertial formulation of the shallow water equations for efficient two-dimensional flood inundation modelling. Journal of Hydrology, 387(1–2), 33–45.
Nguyen, P., et al.
(2021). A long short-term memory (LSTM)-based model for flood prediction. Journal of Hydrometeorology, 22(2), 345–358.
Full bibliography with DOI links available in the written thesis document.
Thank You
Questions & Discussion
Dhwisha Jatinkumar Saraiya
M.Sc. Environmental Engineering
Technical University of Munich
M.Sc. Mohammad Najim Nasimi
dhwisha.saraiya@tum.de
Machine Learning–Based Flood Prediction | 1D & 2D Flooding in the Kulmbach Area and the Isar River
- machine-learning
- flood-prediction
- hec-ras
- random-forest
- environmental-engineering
- hydrology
- data-science
- bavaria