Random forest-based reservoir inflow prediction for Mula reservoir, Maharashtra, India
Abstract
Accurate reservoir inflow prediction is essential for effective reservoir operation and sustainable water resource management. This study developed a Random Forest (RF) model for monthly reservoir inflow prediction at Mula Reservoir, Maharashtra, India, using 432 monthly observations from June 1984 to May 2020. The model incorporated lagged reservoir inflow, rainfall, pan evaporation, reservoir-surface evaporation, and seasonally transformed month variables. Lag-correlation analysis identified relevant antecedent conditions, and a two-month lag period was selected for model development. An 80:20 chronological split was used for training and independent testing. The model achieved RMSE, R2 and NSE values of 37.66 MCM, 0.89 and 0.89 for training, and 32.81 MCM, 0.85 and 0.85 for testing, respectively. Month sine and cosine variables jointly contributed approximately 55% of feature importance, followed by one-month lagged inflow. The model effectively captured seasonal and antecedent characteristics and has potential to support reservoir operation, irrigation planning and water resource management.
Full Text
Tables and figures are in the full-text PDF.
Introduction
Reservoirs play an important role in water-resource management by supporting irrigation, domestic and industrial water supply, hydropower generation, and flood and drought management. Reliable reservoir inflow forecasts are therefore essential for effective storage planning, water allocation, and reservoir operation (Solomatine et al., 2008; Wang et al., 2009; Yang et al., 2017) [1,2,3] . In monsoon-dependent regions, inflow can vary considerably with seasonal rainfall and other hydro-meteorological conditions, making accurate forecasting particularly important (Mohammadi, 2021; Jahanbani et al., 2024) [5,4] . Reservoir inflow forecasting has traditionally relied on physically based hydrological models, conceptual approaches, and statistical techniques. Although these methods remain valuable, their performance may be influenced by model assumptions, parameterization, data requirements, and the complexity of hydrological processes (Solomatine et al., 2008; Maier et al., 2010) [1,6] . Data-driven and machine-learning (ML) methods have consequently gained attention because they can learn complex and nonlinear relationships directly from historical observations (Wang et al., 2009; Mosavi et al., 2018; Xu et al., 2021) [2,7,8] . Their application in hydrology has expanded with the increasing availability of hydro-meteorological data and advances in computational methods (Shen, 2018; Mohammadi, 2021) [9,5] . Several ML techniques, including neural networks, support vector machines, ensemble methods, and deep-learning models, have been applied to rainfall-runoff and streamflow forecasting (Kratzert et al., 2018; Zounemat-Kermani et al., 2021; Jahanbani et al., 2024) [10,11,4] . Among these, Random Forest (RF) is attractive because of its ability to represent nonlinear relationships, handle multiple predictors, and provide estimates of predictor importance. The RF algorithm was introduced by Breiman (2001) [12] , and its theoretical properties and applications have been discussed extensively by Biau et al. (2016) [13] . RF and related ensemble approaches have been successfully applied to streamflow simulation, rainfall-runoff modelling, and flood prediction (Schoppa et al., 2020; Tikhamarine et al., 2020) [14,15] . ML-based reservoir inflow forecasting has also shown promising results. Yang et al. (2017) [3] demonstrated the usefulness of ML models for monthly reservoir inflow forecasting, while subsequent studies incorporated climate information, satellite-derived variables, and antecedent hydrological conditions to improve forecasting performance (Tian et al., 2022; Ibrahim et al., 2023) [17,16] . Recent studies have also emphasized the value of model interpretability and the continued development of ML and deep-learning approaches for long-term hydrological forecasting (Sushanth et al., 2023; Ghenaati et al., 2025) [19,18] . In particular, previous studies have shown that lagged inflow and meteorological variables can provide useful information about catchment memory and current hydrological conditions (Kratzert et al., 2018; Kratzert et al., 2019; Tikhamarine et al., 2020) [10,20,15] . The Mula Reservoir in Maharashtra is an important multipurpose reservoir serving irrigation, domestic, and industrial water requirements in the region. Previous research has examined its operation and water-allocation characteristics within the Upper Godavari Basin (Srivastava et al., 2009; Paliwal et al., 2020) [22,21] . Its [23,8,4] . A casespecific assessment of seasonal and antecedent variables is consequently important for developing reliable and interpretable reservoir inflow models. Accordingly, this study develops a Random Forest model for monthly reservoir inflow prediction at Mula Reservoir, Maharashtra, India, using long-term hydrological and meteorological observations. The study aims to evaluate the applicability of RF for monthly reservoir inflow prediction and its potential to support reservoir operation and water-resource management.
Materials and Methods
Study area
The Mula reservoir is a major multipurpose reservoir constructed across the Mula River, a tributary of the Godavari River, in Ahmednagar district, Maharashtra, India. The reservoir plays a vital role in supplying water for irrigation, domestic consumption, and industrial activities within the command area. It is one of the principal irrigation projects in western Maharashtra and supports agricultural production across a predominantly semi-arid region. The catchment experiences a tropical monsoon climate, characterized by three distinct seasons: summer (March-May), southwest monsoon (June-September), and winter (October-February). Large portion of the annual rainfall occurs during the southwest monsoon, resulting in highly seasonal inflow patterns. Consequently, reservoir inflows exhibit considerable interannual variability influenced by rainfall distribution, antecedent catchment conditions, and evaporation losses. These characteristics make the Mula reservoir an appropriate case study for evaluating machine learning-based inflow forecasting models.
Data collection
Monthly hydrological and meteorological data were collected for the Mula reservoir from the Water Resources Department, Government of Maharashtra. The dataset comprised continuous monthly observations from June 1984 to May 2020, resulting in 432 monthly records namely, monthly reservoir inflow in Million Cubic Metres (MCM), monthly rainfall in mm per month, monthly pan evaporation in mm per month, monthly evaporation from the reservoir surface in Million Cubic Metres (MCM). The data analysis and preprocessing, model development, data parameter optimization, and model performance evaluation was carried out using Python programming language of version 3.10. The analysis was performed in the Jupyter Notebook environment, which provides an interactive platform for data preprocessing, model implementation, visualization, and result interpretation.
Descriptive statistical analysis
The analysis was conducted for key parameters influencing reservoir inflow, rainfall, evaporation losses, and evaporation loss from reservoir. Statistical measures such as mean, median, mode, standard deviation, variance, minimum, maximum, range, skewness, and kurtosis were computed to evaluate the central tendency, dispersion, and distributional properties of the dataset. The correlation analysis of the selected variables for the prediction of reservoir inflow was performed to understand the driving variables affecting reservoir inflow. In the correlation analysis Pearson Correlation Coefficient was used to determine the degree of linear association between variables.
Random Forest (RF) model
Random Forest is an ensemble learning technique that constructs multiple decision trees using bootstrap sampling and random feature selection as shown in figure 1. It is developed by Breiman (Breiman, 2001) [12] , RF is a powerful ensemble learning ML algorithm that can be constructed using multiple decision trees. The final prediction is obtained by averaging the outputs of individual trees. The RF model is capable of capturing complex non-linear relationships and reducing overfitting through aggregation. The selected hyperparameter values were determined through preliminary experiments conducted using the training data.
Feature engineering
The modelling workflow included data preparation, lag-correlation analysis, feature engineering, chronological train-test splitting, RF fitting, prediction and performance evaluation. The monthly reservoir inflow was modelled as;
where Iₜ is the monthly reservoir inflow during month t (MCM), and Xₜ represents the vector of predictor variables available for predicting month t Lag-correlation analysis was performed for the preceding three months to identify relevant antecedent conditions. Considering the observed relationships and the importance of recent antecedent conditions, a two-month lag period was selected. Accordingly, lag-1 and lag-2 values of inflow, rainfall, pan evaporation and reservoir-sur-face evaporation were used as predictors. The month number was transformed into sine and cosine variables to represent seasonal cyclicity. The final predictor matrix contained eleven variables: year, Month_sin, Month_cos, and lag-1 and lag-2 values of inflow, rainfall, pan evaporation and reservoir-surface evaporation. The response variable was current-month reservoir inflow. Thus, Îₜ = f (Yearₜ, Month_cosₜ, Month_sinₜ, Iₜ -1 , Iₜ -2 , Rₜ -1 , Rₜ -2 , Eₜ -1 , Eₜ -2 , Eʳₜ -1 , Eʳₜ -2 ) Where I t is the predicted inflow. After lag generation, the modelready observations were divided chronologically into 80% training and 20% independent testing datasets. Predictor variables were used in their original numerical units without scaling. Figure 2 shows the flow chart of applied methodology for the study.
Model development
Random Forest combines the predictions of multiple decision trees, enabling the model to capture nonlinear relationships between antecedent hydrometeorological conditions, seasonal variables and current reservoir inflow. Randomness is introduced during tree construction to increase diversity among individual trees, and their predictions are aggregated to obtain the final output. In the present study, 500 trees were used, with bootstrap sampling enabled through the default RandomForestRegressor configuration. The model was executed using n_jobs = -1 to utilize all available processor cores for parallel computation. The other model parameters used in the study are presented in Table 1.
Model performance evaluation
The predictive performance of the developed model was evaluated using several statistical performance metrics that measure the degree of agreement between observed and predicted reservoir inflow values. In the present study, the coefficient of determination (R 2 ), Nash-Sutcliffe Efficiency (NSE), Mean Square Error (MSE), Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) were used to assess and validate the performance of the RF model. Such variability reflects the strong influence of seasonal rainfall patterns and the occurrence of extreme hydrological events within the catchment. Table 3 shows the lag correlation analysis for previous three months were carried out for all variables. Considering the observed lagged relationships and the need to represent recent antecedent hydrometeorological conditions without introducing an unnecessarily long predictor window, a two-month antecedent period was selected for model development. Lag-correlation analysis was conducted for one-to three-month antecedent periods to examine the relationship between hydrometeorological conditions and current-month reservoir inflow. Rainfall and reservoir inflow showed the strongest relationships at a one-month lag, while some evaporation variables exhibited stronger relationships at longer lags. Random Forest models with different antecedent windows were subsequently evaluated. Based on the lag-correlation results and model performance, a two-month antecedent window was selected for the final model. The Pearson correlation matrix among the hydrometeorological variables is presented in Table 4. The moderate positive correlation between monthly rainfall and reservoir inflow indicates the important role of rainfall in generating reservoir inflow. However, the correlation is not very high because not all rainfall becomes runoff. Part of the rainfall is lost through interception, infiltration, soil moisture storage, and groundwater recharge. In addition, rainfall varies across the catchment, and monthly averages may not capture the timing and intensity of individual storms. Groundwater (baseflow) can also continue to contribute to reservoir inflow even during months with little rainfall.
Results and Discussion
Descriptive statistical analysis
Random Forest model
The Random Forest model was developed to predict monthly reservoir inflow using a feature engineered set of eleven predictor variables. The model achieved an RMSE of 37.66 MCM and R 2 and NSE values of 0.89 on the training dataset, indicating that it explained about 89% of the variability in monthly reservoir inflow. On the testing dataset, the model produced an RMSE of 32.81 MCM with R 2 and NSE values of 0.85, demonstrating good prediction accuracy and strong generalization ability. The relatively small difference between the training and testing results suggests that the model did not overfit the data. Overall, the RF model effectively captured the nonlinear relationships between the selected input variables demonstrating good predictive performance for monthly reservoir inflow prediction. Figure 3 presents the temporal variation in observed and predicted reservoir inflow during the testing period. The predicted values generally followed the observed seasonal pattern, indicating that the model captured the major fluctuations in monthly inflow. Figure 4 presents the relationship between observed and predicted inflow values. Most points were distributed around the 1:1 line, with a testing R 2 of 0.85, indicating that the model explained approximately 85% of the variability in the independent testing dataset. The sensitivity of the RF model to the antecedent lag period was also examined. Extending the predictor window from two to three months reduced model performance. For the three-month lag specification, the model achieved an RMSE of 41.73 MCM, MAE of 20.55 MCM, R 2 of 0.758, and NSE of 0.758 on the testing dataset, compared with 32.81 MCM, 17.83 MCM, 0.85, and 0.85, respectively, for the twomonth specification. The higher prediction errors and lower efficiency for the three-month specification indicate that extending the antecedent window did not improve prediction performance for the Mula Reservoir dataset. The relative importance of the predictor variables in the developed RF model was evaluated to identify the variables that contributed most to monthly reservoir inflow prediction. The results showed that the seasonal variables were the most influential predictors. Month_sin and Month_cos had importance values of 0.291 and 0.259, respectively, and together accounted for approximately 55.0% of the total feature importance. This indicates the strong seasonal pattern in reservoir inflow. The one-month lagged inflow was the third most important predictor for reservoir inflow, with an importance value of 0.227, highlighting the influence of recent antecedent inflow conditions on current-month inflow. Among the meteorological variables, twomonth lagged reservoir evaporation (0.049) and one-month lagged rainfall (0.039) showed relatively higher importance. The remaining lagged variables had comparatively lower individual contributions. Overall, the feature importance analysis indicates that seasonality and recent antecedent inflow conditions were the dominant predictors of monthly reservoir inflow in the developed RF model. Table 6 shows the relative feature importance of predicting variables in the RF model.
Conclusion
The Random Forest model effectively predicted monthly reservoir inflow at Mula Reservoir using antecedent hydrological, meteorological, and seasonal variables. The model achieved R 2 and NSE of 0.85 with an RMSE of 32.81 MCM on the independent testing dataset, indicating good predictive performance and generalization. Feature importance analysis showed that seasonality and previous-month inflow were the dominant predictors. The results are based on a single reser-voir and a historical monthly dataset; therefore, further evaluation across different reservoirs, forecast periods, and predictor configurations is required to assess broader applicability. Overall, the developed model provides a useful approach for supporting reservoir operation and sustainable water resource management.
References
- Solomatine DP, Ostfeld A. Data-driven modelling: Some past experiences and new approaches. Journal of Hydroinformatics. 2008;10:3-22.
- Wang WC, Chau KW, Cheng CT, Qiu L. A comparison of performance of several artificial intelligence methods for forecasting monthly discharge time series. Journal of Hydrology. 2009;374:294-306.
- Yang T, Asanjan AA, Welles E, Gao X, Sorooshian S, Liu X, Li X. Developing reservoir monthly inflow forecasts using artificial intelligence and climate phenomenon information. Water Resources Research. 2017;53:2786-812.
- Jahanbani H, Ahmed K, Gu B. Data-driven artificial intelligencebased streamflow forecasting, a review of methods, applications, and tools. Journal of the American Water Resources Association. 2024;60:1095-1119.
- Mohammadi B. A review on the applications of machine learning for runoff modeling. Sustainable Water Resources Management. 2021;7:98.
- Maier HR, Jain A, Dandy GC, Sudheer KP. Methods used for the development of neural networks for the prediction of water resource variables in river systems: Current status and future directions. Environmental Modelling & Software. 2010;25:891-909.
- Mosavi A, Ozturk P, Chau KW. Flood prediction using machine learning models: Literature review. Water. 2018;10.
- Xu T, Liang F. Machine learning for hydrologic sciences: An introductory overview. WIREs Water. 2021;8.
- Shen C. A transdisciplinary review of deep learning research and its relevance for water resources scientists. Water Resources Research. 2018;54:8558-93.
- Kratzert F, Klotz D, Brenner C, Schulz K, Herrnegger M. Rainfall-runoff modelling using Long Short-Term Memory (LSTM) networks. Hydrology and Earth System Sciences. 2018;22:6005-22.
- Zounemat-Kermani M, Batelaan O, Fadaee M, Hinkelmann R. Ensemble machine learning paradigms in hydrology: A review. Journal of Hydrology. 2021;598.
- Breiman L. Random forests. Machine Learning. 2001;45:5-32.
- Biau G, Scornet E. A random forest guided tour. TEST. 2016;25:197-227.
- Schoppa L, Disse M, Bachmair S. Evaluating the performance of random forest for large-scale flood discharge simulation. Journal of Hydrology. 2020;590.
- Tikhamarine Y, Souag-Gamane D, Ahmed AN, Sammen SS, Kisi O, Huang YF, El-Shafie A. Rainfall-runoff modelling using improved machine learning methods: Harris hawks optimizer vs. particle swarm optimization. Journal of Hydrology. 2020;589.
- Ibrahim KSMH, Huang YF, Ahmed AN, Koo CH, El-Shafie A. Forecasting multi-step-ahead reservoir monthly and daily inflow using machine learning models based on different scenarios. Applied Intelligence. 2023;53:10893-916.
- Tian D, He X, Srivastava P, Kalin L. A hybrid framework for forecasting monthly reservoir inflow based on machine learning techniques with dynamic climate forecasts, satellite-based data, and climate phenomenon information. Stochastic Environmental Research and Risk Assessment. 2022;36:2353-75.
- Ghenaati B, Nikoo MR, Zamani MG. Long-term forecasting of monthly reservoir inflow using deep and machine-learning-based algorithms. Engineering Applications of Artificial Intelligence. 2025;161.
- Sushanth K, Mishra A, Mukhopadhyay P, Singh R. Near-real-time forecasting of reservoir inflows using explainable machine learning and short-term weather forecasts. Stochastic Environmental Research and Risk Assessment. 2023;37:3945-65.
- Kratzert F, Klotz D, Herrnegger M, Sampson AK, Hochreiter S, Nearing GS. Toward improved predictions in ungauged basins: Exploiting the power of machine learning. Water Resources Research. 2019;55:11344-54.
- Paliwal V, Ghare AD, Mirajkar AB, Bokde N, Feijóo Lorenzo AE. Computer modeling for the operation optimization of Mula Reservoir, Upper Godavari Basin, India, using the Jaya Algorithm. Sustainability. 2020;12:84.
- Srivastava DK, Awchi TA. Storage-yield evaluation and operation of Mula Reservoir, India. Journal of Water Resources Planning and Management. 2009;135:414-25.
- Nearing GS, Kratzert F, Sampson AK, Pelissier CS, Klotz D, Frame JM, Prieto C, Gupta HV. What role does hydrological science play in the age of machine learning? Water Resources Research. 2021;57.
- Nash JE, Sutcliffe JV. River flow forecasting through conceptual models part I-A discussion of principles. Journal of Hydrology. 1970;10:282-90.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
