Next Article in Journal
A Methodological Tool to Assess Erosion Susceptibility of High Coastal Sectors: Case Studies from Campania Region (Southern Italy)
Previous Article in Journal
Effects of Ammonium and COD on Fe and Mn Release from RBF Sediment Based on Column Experiment
Order Article Reprints
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Early Forecasting Hydrological and Agricultural Droughts in the Bouregreg Basin Using a Machine Learning Approach

Hassan II University, Casablanca 20000, Morocco
River Basin Agency of Bouregreg and Chaouia, Benslimane 13000, Morocco
Author to whom correspondence should be addressed.
Water 2023, 15(1), 122;
Received: 1 December 2022 / Revised: 17 December 2022 / Accepted: 26 December 2022 / Published: 29 December 2022
(This article belongs to the Section Water Resources Management, Policy and Governance)


Water supply for drinking and agricultural purposes in semi-arid regions is confronted with severe drought risks, which impact socioeconomic development. However, early forecasting of drought indices is crucial in water resource management to implement mitigation measures against its consequences. In this study, we attempt to develop an integrated approach to forecast the agricultural and hydrological drought in a semi-arid zone to ensure sustainable agropastoral activities at the watershed scale and drinking water supply at the reservoir scale. To that end, we used machine learning algorithms to forecast the annual SPEI and we embedded it into the hydrological drought by implementing a correlation between the reservoir’s annual inflow and the annual SPEI. The results showed that starting from December we can forecast the annual SPEI and so the annual reservoir inflow with an NSE ranges from 0.62 to 0.99 during the validation process. The proposed approach allows the decision makers not only to manage agricultural drought in order to ensure pastoral activities “sustainability at watershed scale” but also to manage hydrological drought at a reservoir scale.

1. Introduction

Water resource planning and management in semi-arid regions are confronting several constraints, such as frequent drought phenomena. This natural hazard can impact several ecosystems, such as climatic, hydrological, agricultural, and ecological systems, that can impact socioeconomic activities [1,2]. Indeed, drought is generally caused by hydro-climatic anomalies that result in water shortage in some (or all) processes involved in the hydrological cycle. Various climate variables and their combination can influence droughts, such as an increase in evaporation in the atmosphere, and evaporative atmosphere demand, which lead to water stress [3]. Consequently, as defined by [4], drought is a process in which the hydrological cycle reaches its limit that stresses the related ecosystems. In recent years, droughts have impacted many regions of the world. For example, drought events in Syria [5] and Pakistan [6], the Millennium Drought in Australia (2001–2009) [7], and drought events in the USA, namely: Texas and the Central Great P(2012) and California (2012–2015) [8]. Consequently, the evaluation and prediction of this natural hazard are crucial in water resource management.
For decades, various indices have been developed and applied to evaluate drought risk, such as the standardized precipitation index (SPI), which relies on long-term rainfall records to quantify water scarcity during different time scales [9]. In contrast, the Standardized Precipitation Evapotranspiration Index (SPEI) measures the impact of an increase in temperature on drought by including an evapotranspiration component in the calculation [10]. This approach has been broadly applied to assess and monitor drought episodes in several regions of the world [3,11,12,13,14]. Besides, the use of spatial techniques is helpful in quantifying and classifying drought severity by location [15,16,17].
However, early prediction of the drought index is challenging in water resource planning and management processes, as it allows the decision makers to mitigate the impacts and ensure the sustainability of the related socioeconomic activities. Machine learning algorithms are promising methods for modeling complex hydrological phenomena [18,19,20]. Drought prediction is a field in which machine learning can present good results, as it requires less time and minimal inputs, and it is relatively less complex than physical or dynamic models [21,22]. For instance, Ref. [23] applied Long Short Term memory to predict SPEI in Australia. Thus, the authors found that the developed models were accurate, with a coefficient of correlation of about 0.99 [24]. They compared the Gaussian Process regression with two ML models and showed its potential accuracy to forecast the SPEI in Iran. Similarly, the Heuristic algorithms, namely: hybrid Adaptive Neuro-Fuzzy Inference System (ANFIS) combined with particle swarm optimization (PSO and genetic algorithm (GA), have been investigated and demonstrated to be accurate approaches to predict drought index SPI [25]. Also, Tree-Based ML models were applied to drought risk assessment and monitoring processes using satellite datasets for different climatic regions [26,27]. The authors found that Random Forest models presented high accuracy compared to Boosted Regression and Tree models with R2 = 0.93. Moreover, it has been reported that the artificial Neural Network (ANN) and Deep Neural Network (DNN) are outstanding approaches in ML models in water resource studies [28,29,30]. In [31], the researchers concluded that the DNN model outperformed the support vector machine and ANN optimized with GA with an accuracy of about 95% in predicting and assessing drought risk. Table 1 presents the most recent and relevant references published in the literature for predicting drought. Interestingly, the application of data driven techniques showed high accuracy for forecasting drought index in several regions in the world and for different climates.
The water department in Morocco relies on water surfaces to supply water for agricultural, drinking, and industrial purposes through several dam reservoirs, as the groundwater is under continuous overexploitation. The Bouregreg is a typical basin in the country, as it supplies drinking water for the main coastal cities, especially Rabat and Casablanca. However, the water availability in this zone is confronted with several constraints, like frequent drought as an impact of climate change [36] and environmental issues [37]. The drought phenomenon in the Bouregreg Basin is threatening both water availability at the reservoir scale for drinking purposes and the sustainability of the socioeconomic activities related to agropastoral activities at the watershed scale. Consequently, forecasting hydrological and agricultural drought risk is valuable to manage water resources in this area. In this study, the ANN algorithm is used to predict the severity of drought at the end of the hydrological year (month of August) through SPEI. Thus, the timescale used is one month (SPEI-1). Eleven models (ANN_Sep to ANN_Jul) starting from the month of September to the month of July were trained and validated using the data of precipitation and temperature of twelve stations to predict the annual drought (in August). Then, the relation between the SPEI and the water inflow rate into the reservoir was established to predict hydrological drought risk.

2. Materials and Methods

2.1. Study Area

The study area is the Bouregreg Basin, which is located between Rabat-Salé-Kenitra, Casablanca-Settat, and Beni-Mellal-Khénifra provinces, Morocco. This basin covers 9975 km2 and consists of 4 watersheds; 4 main rivers compose the hydrographic network and they are named Bouregreg River (264 km), Grou River (249 km), Korifla River (139 km), and Mechraa River (132 km). Climatically, the area is a Mediterranean semi-arid region with an annual average of precipitation of about 400 mm in its North West part and 760 mm in the mountainous part. As for the temperature, it varies between 35 °C and 45 °C during the summer and ranges from 5 °C to 15 °C during winter periods [38]. The reservoir of the SMBA dam, which controls this basin, presents a normal capacity of 975 hm3; it supplies drinking water to urban and rural areas in the coastal area between Sale and Casablanca cities, where the mean inflow rate is about 680 hm3·r−1. Meanwhile, at the watershed scale, pastoral and agricultural activities are the main socioeconomic activities related to water availability.

2.2. Datasets

2.2.1. Precipitation and Temperature

The studied basin is monitored by nine rainfall monitoring stations, as presented in Figure 1. In this study, monthly datasets related to rainfall recorded from the period from 1971 to 2021 were provided by the River Basin Agency of Bouregreg and Chaouia (ABHBC). Table 2 presents the statistical characteristics of these data, such as mean, minimum, maximum, and standard deviation (STD). From this Table, it can be observed that high variability of rainfall is noticed in the high standard deviation for all stations, which can lead either to flood events or drought disasters. The temperature data were recorded at six climatological stations (Figure 1) where three of them are managed by the Bouregreg and Chaouia Hydraulic Basin Agency (ABHBC) and the other three are operated by the National General Direction of Meteorology. Table 3 presents the statistical characteristics of the temperature datasets used in this study.

2.2.2. Runoff Data

The annual inflow data were measured in the SMBA dam for the period from 1985 to 2021 and provided by the Bouregreg and Chaouia Hydraulic Basin Agency (ABHBC). Table 4 presents the statistical characteristics of the whole dataset related to the inflow rate recorded at the SMBA dam reservoir. From this Table, it was observed that high variability in the water inflow rate was noticed in the high value of the standard deviation, which indicates recording drought and flood events.

2.3. Methodology

2.3.1. Standard Precipitation Evapotranspiration Index (SPEI)

The SPEI is one of the recently developed drought indexes [10]; it shows a growing consensus about its use because it uses rainfall and temperature data rather than only rainfall, as in the case of the Standard Precipitation Index (SPI). It uses the difference between precipitation and evapotranspiration to represent the regional drought. The SPEI uses a simple water balance calculation, and the potential evapotranspiration (PET) is based on the Thornthwaite (1948) model. It has the potential to track agricultural drought more efficiently.
D i = P i P E T i
where: Di: Deficit in mm, Pi: Precipitation in mm, and PETi: Potential evapotranspiration in mm for the month i.
The calculated Di values are aggregated to a 1-month time scale, Log-logistic distribution is used to model the D series, and the probability density function of a 3-parameter Log-logistic distributed variable x is expressed as:
f x = β α x γ α β 1 × 1 + x γ α β 2
where, α, β, and γ are the parameters of the Log-logistic distribution, and they are obtained using the L-moment procedure (Ahmad et al., 1988), following Singh et al. (1993):
β = 2 ω 1 ω 0 6 ω 1 ω 0 6 ω 2
α = ω 0 2 ω 1 × β Γ 1 + 1 β Γ 1 1 β
γ = ω 0 α Γ 1 + 1 β Γ 1 1 β
where Γ is the gamma function.
In the Vicente-Serrano et al. [10] study, the probability weighted moments (PWMs) method was used to calculate α, β, and γ parameters, based on the plotting-position approach (Hosking, 1990), where the PWMs of order s are calculated as:
ω s = 1 / N i = 0 N 1 F i S × D i  
where: i is the range of observations, Fi = (i − 0.35)/N is a frequency estimator calculated following the approach of Hosking (1990).
The SPEI value is obtained as the standardized value following the classical approximation of Abramowitz and Stegun (1965) [39] given as:
SPEI   =   W   c 0 +   c 1 W   +   c 2 W 2   1 +   d 1 W   +   d 2 W 2 +   d 3 W 3
where c0, c1, c2, d1, d2 and d3 are constant: c0 = 2.5155, c1 = 0.8028, c2 = 0.0103, d1 = 1.4328, d2 = 0.1892 and d3 = 0.0013, W is calculated using:
W = 2   ln Pr
For   Pr 0.5
where Pr is the probability of exceedance of a given D value, the cumulative distribution of D being F(D). When Pr > 0.5, it is replaced with the non-exceedance probability (F(D) = 1 − Pr) and the sign of the calculated SPEI is reversed.

2.3.2. Artificial Neural Network (ANN)

In the present study, we applied the ANN model to predict drought. ANN has presented potential accuracy compared to other machine learning algorithms, such as the Support vector machine (SVM), Random Forest (RF), and Linear regression (LR) in several studies as it can map complex and nonlinear systems [40,41].
This subsection provides a short description of this approach. Meanwhile, further details on the ML-based models can be found in [42,43,44,45,46,47]. ANN models are constructed by three layer types, namely: the input layer, hidden layers (HL), and the output layer [48]. They are interconnected through neurons, which are characterized by weight and bias. The weighted input variables summed with the bias of the layer are transformed from the jth layer to the j + 1th layer by a transfer function (f), and so on, until the output [48]. The training phase is repeated by changing the weights and the biases of the layers until good prediction accuracy (root mean square error) is achieved. To simplify this method, let us take a simple model with one HL. The outputs ( Y k ) are given by the following equation [49]:
Y k = f k i = 1 m W j k × f j ( i = 1 n X i W i j ) + W 0
where n is the input variable numbers, m is the neurons in the HL, p is the neurons of the output layer, and k is between 1 and p, W 0 is the bias,   W j k and   W i j are the weights between the jth neuron and the kth output neuron and between the ith neuron and jth neuron, respectively, whereas f k and f j are the transfer functions of the neurons k and j of the output and hidden layers, respectively. Figure 2 presents the architecture of an ANN model with three hidden layers.
The input data are used to calculate the SPEI at a 1-month time scale in all the stations. The results are used first to characterize the drought in the basin and second to develop models that can predict the annual SPEI so the data is decomposed into two parts: training and validation datasets. Eleven ANN models were developed, trained, and validated; each model predicts the annual SPEI from a corresponding month, from September to July. Furthermore, the annual SPEI is linked to the annual water inflow rate in the SMBA reservoir to predict and evaluate hydrological drought at the reservoir scale (Figure 3).

2.3.3. Performances of the Models

In this study, we used three statistical metrics to assess the applied ML model performances, namely: the Nash–Sutcliffe model efficiency coefficient (NSE) [50], root mean square error (RMSE), and correlation coefficient (R). Accordingly, an NSE value of 1 indicates a perfect-fit model, greater than 0.75 is a very good fit, between 0.64 and 0.74 is a good fit, between 0.5 and 0.64 is a satisfactory fit, and less than 0.5 is an unsatisfactory fit [51]. However, these performance statistics are defined as:
R = i = 0 n O i ¯ O P i P / ( i = 0 n ( O i ¯ O i ) 2 ) ) ( i = 0 n ( P i P ) 2 ) )
NSE = 1 P i O i 2 ¯ O O i 2
RMSE = i = 0 n ( P i O i ) 2 / n  
where Pi and Oi are the predicted and the actual SPEIs, respectively, ¯ O represents the average values of the actual SPEI index, and n is the number of observations.

3. Results

3.1. Analysis of the Drought Events and Characteristics during 1970–2021

The SPEI was calculated and its normal distribution was fitted and presented in Figure 4. From this Figure, it was observed that 68.3% of the calculated SPEI in all the stations is between −1 and 1, indicating a closer to normal, while 15.9% presented severe to extreme drought. Furthermore, the calculated SPEI shows that several drought events have occurred in the basin, the period of which varies between two and seven years. The seasonal decomposition using an additive model shows clearly a trend and a season in the time series. More importantly, Figure 5 shows the seasonality in the data fluctuation. However, it is still very weak, causing the SPEI to fluctuate by 0.02 over the course of a year. Besides, the residual shows high variability.
The Bouregreg Basin has been subjected to critical drought events that have heavily influenced the socioeconomic development in the region by impacting the drinking water supply and agropastoral productivity. As an effect of climate change, the basin can lose an important water yield and, as a result, threaten the sociohydrologic systems [52]. Therefore, early forecasting could be managing drought risks. In this study, we aim to forecast drought using SPEI and ANN.

3.2. Data Analysis

The selection of suitable variables is a master key in the development of machine learning models, to guarantee good prediction accuracy and the generalization ability of the models. In this study, the input variables to predict the annual SPEI corresponding to August (of the hydrological and agricultural year) are the corresponding month, SPEI, temperature data: min, max, and mean, and the corresponding station. A correlation analysis of the dataset was carried out in order to explore the potential relationship between the input variables. Figure 6 presents the matrix correlation of the variables for all the stations in the studied basin. It was observed that, except for the mean temperature with the max temperature, all other variables are not highly intercorrelated. Such results prove that the selected variables are not redundant in the prediction of SPEI.

3.3. Training Process of the Machine Learning Models

In this step, 11 ANN ML models were trained, tuned, and evaluated to improve the prediction accuracy. The tuning process includes changing the hyper-parameters and transfer functions of the models. However, Table 5 presents the adopted parameters in this study.
Table 6 presents the ANN model performances during the training phase. This Table clearly shows that all models have a high potential accuracy in predicting the annual SPEI, justified by the fact that the NSE ranges from 0.64 to 0.99, the R2 ranges from 0.65 to 0.99, and the RMSE ranges from 0.06 to 0.59. It was observed that ANN_Nov to ANN_Jul outperformed the ANN_Sep and ANN_Oct models during the training phase.

3.4. Validation of the ML Models

This step was carried out to evaluate whether the trained ML models are generalizable in order to predict the annual SPEI for the dataset unseen during the training phase. To that end, we simulated the annual SPEI with 20% of the original dataset and evaluated the model performances. Table 7 presents the models’ performances during the validation phase. It was observed that, except for ANN_Sep, ANN_Oct, and ANN_Nov, all other models presented good accuracy during the validation phase, with an NSE ranging from 0.62 to 0.99, an R2 ranging from 0.62 to 0.99, and an RMSE ranging from 0.07 to 0.58. Such accuracy predictions were found by [34] in predicting the standardized runoff index (SRI) in Algeria.
Figure 7 shows that starting from December, we have a linearity distribution in the correlation between the Validation SPEI dataset and Simulation results using the ANN models.
To determine the models that best predict the annual SPEI, boxplots were developed for the errors (residuals) estimated as the difference between the calculated and simulated values (Figure 8). The presented positive and negative estimation errors indicate underestimation and overestimation, respectively. Globally, from this Figure, the model errors are normally distributed as the median line is closer to zero. However, ANN_Apr, ANN_May, ANN_Jun, and ANN_Jul are the best models for predicting the annual SPEI as it has the lowest error ranges. Thus, the ANN_Mar and ANN_Feb models performed well. Similarly, the models ANN_Dec and ANN_Jan showed fairly acceptable results that can be qualified as acceptable since 75% of the error was between −0.25 and 0.25 and evenly distributed over 0.
Additionally, Figure 9 illustrates the comparison of the observed, and predicted August from September a), from December (b), and from April (c). From this Figure, it was observed that it is not possible to predict SPEI from September (Figure 9a), as there are significant discrepancies between observed and predicted SPEI provided by ANN_Sep model. Meanwhile, from December, the ANN_Dec model is fairly accurate to predict SPEI. Therefore, this model can be useful for predicting agricultural drought early.

3.5. Hydrological Drought Prediction

To manage water drinking supply from the SMBA reservoir, the information on the annual inflow is crucial since the basin controlled by the SMBA dam is characterized by high inflow variability that is dependent on precipitation. Consequently, linking between hydrological and agricultural droughts is valuable to prioritize mitigation measures against drought at watershed and reservoir scales. To predict the annual inflow in the SMBA reservoir, a logarithmic fitting between inflow data and the mean annual SPEI of the nine stations was carried out using the historical data. The correlation presented very good results with an R2 of 0.88.
Figure 10a shows that the correlation predicts very well the annual inflow using the annual SPEI, indicating that the response of the hydrological drought to the agricultural drought is exponential. Besides, Figure 10b illustrates a comparison between calculated and observed SMBA reservoir inflow values for the period from 1979 to 2021. It obviously shows that there is an agreement between the observed and calculated water inflow rate.
Drought hazards can lead to a substantial economic loss, especially for countries whose economies rely on the agriculture sector [53,54]. Besides, this natural hazard is a threat to water scarcity for drinking purposes in the semi-arid environment, where most countries rely on reservoirs for water surface mobilization [55]. As for food security, the agricultural drought impacts food security, especially in sub-Saharan countries [56]. Compared to traditional methods based on the evaluation of the instant drought using SPI, SPEI, or NDVI, the early prediction of the annual SPEI is valuable to assess the appropriate measures in time for mitigating the drought consequences and socioeconomic impacts. To reach this overarching goal, ML models represent an innovative approach in hydrological sciences [30,57,58]. In this study, the ANN model provided fairly acceptable performances for predicting hydrological and agricultural draughts with NSE, about 0.62 from December to 0.99 in July. These results allow the decision maker to predict early the drought impacts (from December) and, therefore, to plan appropriate measures to reduce the socioeconomic impacts. However, using SPEI to evaluate agricultural and hydrological droughts, respectively, is not enough in the situation where agriculture relies on irrigation. In this instance, embedding socioeconomic activities to evaluate drought risk is primordial and, therefore, can be suggested for future works.
Despite being an accurate method to predict hydrological and agricultural annual drought, this approach is unable to predict drought in river networks, which are water source supplies of several ecoservices, such as the environmental flow, water withdrawal for livestock production, and recreational purposes, the combination of the hydrological model with the prediction of SPEI could be valuable to overcome such limitations, and therefore it is suggested for future works.

4. Conclusions

Recently, climate change effects combined with socioeconomic activities have led to water scarcity in several regions, particularly semi-arid environments. The drought prediction at the basin scale, like precipitation, is nonlinear and highly dynamic, especially in semi-arid regions. In this study, 11 ANN models with 4 hidden layers, Softmax as a function activation, and a learning rate of 0.01, were applied and evaluated to predict the annual SPEI starting from September to July. The main conclusions of the present study are as follows:
  • Developed ANN models presented good prediction accuracy in forecasting drought using SPEI, with an NSE ranging from 0.62 to 0.99, an R2 ranging from 0.62 to 0.99, and an RMSE ranging from 0.07 to 0.58. Thus, the generalization ability through the validation process demonstrated the stability of the applied models in predicting the annual SPEI;
  • From December, the models are fairly accurate in predicting the annual SPEI at the end of the hydrological year;
  • Hydrological drought is exponentially linked to agricultural drought.
Overall, the study results provide new insight into the early forecast of the agricultural and hydrological drought risks. Implementing this approach in water resource planning and management could be a fruitful tool to manage the drought impacts not only at the watershed scale but also at the reservoir scale for drinking water supply purposes.

Author Contributions

Conceptualization, A.N. and A.T.; methodology, A.N.; software, A.N. and M.E.M.; validation, A.N. and A.T.; formal analysis, A.N. and A.E.B.; investigation, A.N.; resources, A.N.; data curation, M.A.E.; writing—original draft preparation, A.N.; writing—review and editing, A.N. and A.E.B.; visualization, A.N.; supervision, A.T. and A.E.B.; project administration, A.T. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.

Data Availability Statement

All data used in this study is available on simple request.


This work is supported by the River Basin Agency of Bouregreg and Chaouia (ABHBC) by providing the required datasets. So, the authors thank the ABHBC teams for their help and assistance during the achievement of this study.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Maughan, N.; Camenisch, C.; Brázdil, R.; White, S. Societal impacts of historical droughts in a warming world. Reg. Environ. Chang. 2022, 22, 74. [Google Scholar] [CrossRef]
  2. Mohammed, S.; Alsafadi, K.; Enaruvbe, G.O.; Bashir, B.; Elbeltagi, A.; Széles, A.; Alsalman, A.; Harsanyi, E. Assessing the impacts of agricultural drought (SPI/SPEI) on maize and wheat yields across Hungary. Sci. Rep. 2022, 12, 8838. [Google Scholar] [CrossRef] [PubMed]
  3. Manzano, A.; Clemente, M.A.; Morata, A.; Luna, M.Y.; Beguería, S.; Vicente-Serrano, S.M.; Martín, M.L. Analysis of the atmospheric circulation pattern effects over SPEI drought index in Spain. Atmos. Res. 2019, 230, 104630. [Google Scholar] [CrossRef]
  4. Wilhite, D.A.; Svoboda, M.D.; Hayes, M.J. Understanding the complex impacts of drought: A key to enhancing drought mitigation and preparedness. Water Resour. Manag. 2007, 21, 763–774. [Google Scholar] [CrossRef][Green Version]
  5. Mohammed, S.; Alsafadi, K.; Al-Awadhi, T.; Sherief, Y.; Harsanyie, E.; El Kenawy, A.M. Space and time variability of meteorological drought in Syria. Acta Geophys. 2020, 68, 1877–1898. [Google Scholar] [CrossRef]
  6. Ahmed, K.; Shahid, S.; Harun, S.B.; Wang, X.-J. Characterization of seasonal droughts in Balochistan Province, Pakistan. Stoch. Environ. Res. Risk Assess. 2016, 30, 747–762. [Google Scholar] [CrossRef]
  7. Van Dijk, A.I.J.M.; Beck, H.E.; Crosbie, R.S.; de Jeu, R.A.M.; Liu, Y.Y.; Podger, G.M.; Timbal, B.; Viney, N.R. The Millennium Drought in southeast Australia (2001–2009): Natural and human causes and implications for water resources, ecosystems, economy, and society. Water Resour. Res. 2013, 49, 1040–1057. [Google Scholar] [CrossRef]
  8. Hao, Z.; Singh, V.P.; Xia, Y. Seasonal Drought Prediction: Advances, Challenges, and Future Prospects. Rev. Geophys. 2018, 56, 108–141. [Google Scholar] [CrossRef][Green Version]
  9. McKee, T.B.; Doesken, N.J.; Kleist, J. The relationship of drough frequency and duration to time scale. In Proceedings of the Eighth Conference on Applied Climatology, Anaheim, CA, USA, 17–22 January 1993; pp. 17–22. [Google Scholar] [CrossRef]
  10. Vicente-Serrano, S.M.; Beguería, S.; López-Moreno, J.I. A Multiscalar Drought Index Sensitive to Global Warming: The Standardized Precipitation Evapotranspiration Index. J. Clim. 2010, 23, 1696–1718. [Google Scholar] [CrossRef]
  11. Morsy, M.; Moursy, F.I.; Sayad, T.; Shaban, S. Climatological Study of SPEI Drought Index Using Observed and CRU Gridded Dataset over Ethiopia. Pure Appl. Geophys. 2022, 179, 3055–3073. [Google Scholar] [CrossRef]
  12. Hou, M.; Yao, N.; Li, Y.; Liu, F.; Biswas, A.; Pulatov, A.; Hassan, I. Better Drought Index between SPEI and SMDI and the Key Parameters in Denoting Drought Impacts on Spring Wheat Yields in Qinghai, China. Agronomy 2022, 12, 1552. [Google Scholar] [CrossRef]
  13. Tirivarombo, S.; Osupile, D.; Eliasson, P. Drought monitoring and analysis: Standardised Precipitation Evapotranspiration Index (SPEI) and Standardised Precipitation Index (SPI). Phys. Chem. Earth. 2018, 106, 1–10. [Google Scholar] [CrossRef]
  14. Elbeltagi, A.; AlThobiani, F.; Kamruzzaman, M.; Shaid, S.; Roy, D.K.; Deb, L.; Islam, M.; Kundu, P.K.; Rahman, M. Estimating the Standardized Precipitation Evapotranspiration Index Using Data-Driven Techniques: A Regional Study of Bangladesh. Water 2022, 14, 1764. [Google Scholar] [CrossRef]
  15. Nejadrekabi, M.; Eslamian, S.; Zareian, M.J. Spatial statistics techniques for SPEI and NDVI drought indices: A case study of Khuzestan Province. Int. J. Environ. Sci. Technol. 2022, 19, 6573–6594. [Google Scholar] [CrossRef]
  16. Liu, C.; Yang, C.; Yang, Q.; Wang, J. Spatiotemporal drought analysis by the standardized precipitation index (SPI) and standardized precipitation evapotranspiration index (SPEI) in Sichuan Province, China. Sci. Rep. 2021, 11, 1280. [Google Scholar] [CrossRef]
  17. Jamro, S.; Dars, G.H.; Ansari, K.; Krakauer, N.Y. Spatio-Temporal Variability of Drought in Pakistan Using Standardized Precipitation Evapotranspiration Index. Appl. Sci. 2019, 9, 4588. [Google Scholar] [CrossRef][Green Version]
  18. Mehraein, M.; Mohanavelu, A.; Naganna, S.R.; Kulls, C.; Kisi, O. Monthly Streamflow Prediction by Metaheuristic Regression Approaches Considering Satellite Precipitation Data. Water 2022, 14, 3636. [Google Scholar] [CrossRef]
  19. Ezzaouini, M.A.; Mahé, G.; Kacimi, I.; El Bilali, A.; Zerouali, A.; Nafii, A. Predicting Daily Suspended Sediment Load Using Machine Learning and NARX Hydro-Climatic Inputs in Semi-Arid Environment. Water 2022, 14, 862. [Google Scholar] [CrossRef]
  20. El Bilali, A.; Moukhliss, M.; Taleb, A.; Nafii, A.; Alabjah, B.; Brouziyne, Y.; Mazigh, N.; Teznine, K.; Mhamed, M. Predicting daily pore water pressure in embankment dam: Empowering Machine Learning-based modeling. Environ. Sci. Pollut. Res. 2022, 29, 47382–47398. [Google Scholar] [CrossRef]
  21. Elbeltagi, A.; Kumari, N.; Dharpure, J.; Mokhtar, A.; Alsafadi, K.; Kumar, M.; Mehdinejadiani, B.; Etedali, H.R.; Brouziyne, Y.; Islam, A.T.; et al. Prediction of Combined Terrestrial Evapotranspiration Index (CTEI) over Large River Basin Based on Machine Learning Approaches. Water 2021, 13, 547. [Google Scholar] [CrossRef]
  22. Shamshirband, S.; Hashemi, S.; Salimi, H.; Samadianfard, S.; Asadi, E.; Shadkani, S.; Kargar, K.; Mosavi, A.; Nabipour, N.; Chau, K.W. Predicting Standardized Streamflow index for hydrological drought using machine learning models. Eng. Appl. Comput. Fluid Mech. 2020, 14, 339–350. [Google Scholar] [CrossRef]
  23. Dikshit, A.; Pradhan, B.; Huete, A. An improved SPEI drought forecasting approach using the long short-term memory neural network. J. Environ. Manag. 2021, 283, 111979. [Google Scholar] [CrossRef] [PubMed]
  24. Ghasemi, P.; Karbasi, M.; Nouri, A.Z.; Tabrizi, M.S.; Azamathulla, H.M. Application of Gaussian process regression to forecast multi-step ahead SPEI drought index. Alex. Eng. J. 2021, 60, 5375–5392. [Google Scholar] [CrossRef]
  25. Kisi, O.; Gorgij, A.D.; Zounemat-Kermani, M.; Mahdavi-Meymand, A.; Kim, S. Drought forecasting using novel heuristic methods in a semi-arid environment. J. Hydrol. 2019, 578, 124053. [Google Scholar] [CrossRef]
  26. Park, S.; Im, J.; Jang, E.; Rhee, J. Drought assessment and monitoring through blending of multi-sensor indices using machine learning approaches for different climate regions. Agric. For. Meteorol. 2016, 216, 157–169. [Google Scholar] [CrossRef]
  27. Mokhtar, A.; Jalali, M.; He, H.; Al-Ansari, N.; Elbeltagi, A.; Alsafadi, K.; Abdo, H.G.; Sammen, S.S.; Gyasi-Agyei, Y.; Rodrigo-Comino, J. Estimation of SPEI Meteorological Drought Using Machine Learning Algorithms. IEEE Access 2021, 9, 65503–65523. [Google Scholar] [CrossRef]
  28. El Bilali, A.; Lamane, H.; Taleb, A.; Nafii, A. A framework based on multivariate distribution-based virtual sample generation and DNN for predicting water quality with small data. J. Clean. Prod. 2022, 368, 133227. [Google Scholar] [CrossRef]
  29. El Bilali, A.; Abdeslam, T.; Mazigh, N.; Moukhliss, M. Prediction of chemical water quality used for drinking purposes based on artificial neural networks. Moroc. J. Chem. 2020, 3, 665–672. [Google Scholar]
  30. Rajaee, T.; Ebrahimi, H.; Nourani, V. A review of the artificial intelligence methods in groundwater level modeling. J. Hydrol. 2019, 572, 336–351. [Google Scholar] [CrossRef]
  31. Kaur, A.; Sood, S.K. Deep learning based drought assessment and prediction framework. Ecol. Informatics 2020, 57, 101067. [Google Scholar] [CrossRef]
  32. Mohammed, S.; Elbeltagi, A.; Bashir, B.; Alsafadi, K.; Alsilibe, F.; Alsalman, A.; Zeraatpisheh, M.; Széles, A.; Harsányi, E. A comparative analysis of data mining techniques for agricultural and hydrological drought prediction in the eastern Mediterranean. Comput. Electron. Agric. 2022, 197, 106925. [Google Scholar] [CrossRef]
  33. Dost, R.; Kasiviswanathan, K. Quantification of Water Resource Sustainability in Response to Drought Risk Assessment for Afghanistan River Basins. Nat. Resour. Res. 2022; in press. [Google Scholar] [CrossRef]
  34. Achite, M.; Jehanzaib, M.; Elshaboury, N.; Kim, T.-W. Evaluation of Machine Learning Techniques for Hydrological Drought Modeling: A Case Study of the Wadi Ouahrane Basin in Algeria. Water 2022, 14, 431. [Google Scholar] [CrossRef]
  35. Almikaeel, W.; Čubanová, L.; Šoltész, A. Hydrological Drought Forecasting Using Machine Learning—Gidra River Case Study. Water 2022, 14, 387. [Google Scholar] [CrossRef]
  36. Brouziyne, Y.; Belaqziz, S.; BenaabidateAboubdillah, L.; Aboubdillah, A.; El Bilali, A.; Elbeltagi, A.; Tzoraki, O.; Chehbouni, A. Modeling long term response of environmental flow attributes to future climate change in a North African watershed (Bouregreg watershed, Morocco). Ecohydrol. Hydrobiol. 2021, 22, 155–167. [Google Scholar] [CrossRef]
  37. El Bilali, A.; Taleb, A.; El Idrissi, B.; Brouziyne, Y.; Mazigh, N. Comparison of a data-based model and a soil erosion model coupled with multiple linear regression for the prediction of reservoir sedimentation in a semi-arid environment. Euro-Mediterranean J. Environ. Integr. 2020, 5, 64. [Google Scholar] [CrossRef]
  38. El Bilali, A.; Taleb, A. Prediction of irrigation water quality parameters using machine learning models in a semi-arid environment. J. Saudi Soc. Agric. Sci. 2020, 19, 439–451. [Google Scholar] [CrossRef]
  39. Abramowitz, M.; Stegun, I. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables; U.S. Government Printing Office: Washington, DC, USA, 1964.
  40. Yin, J.; Zhao, P.; Zhang, Y.; Han, Y.; Wang, S. A Data Augmentation Method for War Trauma Using the War Trauma Severity Score and Deep Neural Networks. Electronics 2021, 10, 2657. [Google Scholar] [CrossRef]
  41. Liu, P.; Wang, J.; Sangaiah, A.K.; Xie, Y.; Yin, X. Analysis and Prediction of Water Quality Using LSTM Deep Neural Networks in IoT Environment. Sustainability 2019, 11, 2058. [Google Scholar] [CrossRef][Green Version]
  42. Aggarwal, C.C. Data Mining; Springer: Cham, Switzerland, 2015. [Google Scholar] [CrossRef]
  43. Bishop, C.M. Pattern Recognition and Machine Learning; Springer: New York, NY, USA, 2006. [Google Scholar]
  44. Bonaccorso, G. Machine Learning Algorithms: Popular Algorithms for Data Science and Machine Learning; Packt Publishing Ltd.: Birmingham, UK, 2018. [Google Scholar]
  45. Freund, Y.; Schapire, R.E. A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting. J. Comput. Syst. Sci. 1997, 55, 119–139. [Google Scholar] [CrossRef][Green Version]
  46. Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer Science & Business Media: Berlin, Germany, 2009. [Google Scholar]
  47. Kubat, M. An Introduction to Machine Learning; Springer: Cham, Switzerland, 2017. [Google Scholar] [CrossRef]
  48. Dawson, C.; Wilby, R. Une approche de la modélisation pluie-deblt par ies réseaux neuronaux artificiels. Hydrol. Sci. J. 1998, 43, 47–66. [Google Scholar] [CrossRef]
  49. Schalkoff, R. Artificial Neural Networks; McGraw-Hill Higher Education: New York, NY, USA, 1997. [Google Scholar]
  50. Nash, J.; Sutcliffe, J. River flow forecasting through conceptual models part I—A discussion of principles. J. Hydrol. 1970, 10, 282–290. [Google Scholar] [CrossRef]
  51. Moriasi, D.N.; Arnold, J.G.; van Liew, M.W.; Bingner, R.L.; Harmel, R.D.; Veith, T.L. Model evaluation guidelines for systematic quantification of accuracy in watershed simulations. Trans. ASABE 2007, 50, 885–900. [Google Scholar] [CrossRef]
  52. Brouziyne, Y.; Abouabdillah, A.; Chehbouni, A.; Hanich, L.; Bergaoui, K.; McDonnell, R.; Benaabidate, L. Assessing Hydrological Vulnerability to Future Droughts in a Mediterranean Watershed: Combined Indices-Based and Distributed Modeling Approaches. Water 2020, 12, 2333. [Google Scholar] [CrossRef]
  53. Banerjee, O.; Bark, R.; Connor, J.; Crossman, N.D. An ecosystem services approach to estimating economic losses associated with drought. Ecol. Econ. 2013, 91, 19–27. [Google Scholar] [CrossRef]
  54. Musolino, D.A.; Massarutto, A.; de Carli, A. Does drought always cause economic losses in agriculture? An empirical investigation on the distributive effects of drought events in some areas of Southern Europe. Sci. Total. Environ. 2018, 633, 1560–1570. [Google Scholar] [CrossRef]
  55. Abedin, A.; Habiba, U.; Shaw, R. Community Perception and Adaptation to Safe Drinking Water Scarcity: Salinity, Arsenic, and Drought Risks in Coastal Bangladesh. Int. J. Disaster Risk Sci. 2014, 5, 110–124. [Google Scholar] [CrossRef][Green Version]
  56. Ahmed, S.M. Impacts of drought, food security policy and climate change on performance of irrigation schemes in Sub-saharan Africa: The case of Sudan. Agric. Water Manag. 2020, 232, 106064. [Google Scholar] [CrossRef]
  57. El Bilali, A.; Abdeslam, T.; Ayoub, N.; Lamane, H.; Ezzaouini, M.A.; Elbeltagi, A. An interpretable machine learning approach based on DNN, SVR, Extra Tree, and XGBoost models for predicting daily pan evaporation. J. Environ. Manag. 2023, 327, 116890. [Google Scholar] [CrossRef]
  58. Yadav, A.; Joshi, D.; Kumar, V.; Mohapatra, H.; Iwendi, C.; Gadekallu, T.R. Capability and Robustness of Novel Hybridized Artificial Intelligence Technique for Sediment Yield Modeling in Godavari River, India. Water 2022, 14, 1917. [Google Scholar] [CrossRef]
Figure 1. Bouregreg Basin location, in Morocco.
Figure 1. Bouregreg Basin location, in Morocco.
Water 15 00122 g001
Figure 2. Architecture of ANN ML model.
Figure 2. Architecture of ANN ML model.
Water 15 00122 g002
Figure 3. Flowchart of the adopted methodology.
Figure 3. Flowchart of the adopted methodology.
Water 15 00122 g003
Figure 4. Normal distribution of the SPEI data.
Figure 4. Normal distribution of the SPEI data.
Water 15 00122 g004
Figure 5. Seasonal decompositions applied on the standard Precipitation Evapotranspiration Index (SPEI) at Aguibat Ezziar station.
Figure 5. Seasonal decompositions applied on the standard Precipitation Evapotranspiration Index (SPEI) at Aguibat Ezziar station.
Water 15 00122 g005
Figure 6. Correlation matrix of input data.
Figure 6. Correlation matrix of input data.
Water 15 00122 g006
Figure 7. Scatter plots of observed vs. predicted.
Figure 7. Scatter plots of observed vs. predicted.
Water 15 00122 g007
Figure 8. Boxplots showing the error distributions of the SPEIs in the test phase. The horizontal line shows the median errors, lower box shows negative errors, circles indicate outlier error values.
Figure 8. Boxplots showing the error distributions of the SPEIs in the test phase. The horizontal line shows the median errors, lower box shows negative errors, circles indicate outlier error values.
Water 15 00122 g008
Figure 9. Examples of superposed plots comparing calculated and predicted annual SPEI. SPEI prediction of August from September (a), from December (b), and from April (c).
Figure 9. Examples of superposed plots comparing calculated and predicted annual SPEI. SPEI prediction of August from September (a), from December (b), and from April (c).
Water 15 00122 g009aWater 15 00122 g009b
Figure 10. (a) Logarithmic fitting of inflow date with the monthly SPEI using bivariate distribution, (b). Observed and predicted inflow using the logarithmic fitting through semi-logarithm scale.
Figure 10. (a) Logarithmic fitting of inflow date with the monthly SPEI using bivariate distribution, (b). Observed and predicted inflow using the logarithmic fitting through semi-logarithm scale.
Water 15 00122 g010
Table 1. Recent works of drought prediction using machine learning.
Table 1. Recent works of drought prediction using machine learning.
ReferenceModel/MethodDrought IndexPerformancesCountry
[32]Bagging, Random Forest, Random Subspace, Random TreeSPIRadom Tree outperformed other modelsSyria
[33]Spatial and temporal variation of sustainability in response to meteorological droughtsSPI***Afghanistan
[24]Three machine learning, MLP, GRNN, and Gaussian process regression (GPR)SPEIGPR outperformed other modelsIran
[34]ANN, SVM, ANFIS, Decision Tree,SRISVM outperformed other modelsAlgeria
[35]ANN, SVMSHMIBoth models showed accurate resultsSlovakia
Table 2. Statistical characteristics of the monthly precipitation data recorded at nine monitoring rainfall stations.
Table 2. Statistical characteristics of the monthly precipitation data recorded at nine monitoring rainfall stations.
Hydrological StationRiverPeriodMean (mm)Max (mm)Min (mm)Standard Deviation
Aguibat ZiarBouregreg1976–2021269.57250198.9
Ras FathiaGrou1976–2021245.2780.70185.2
S.M. CherifMechraa1972–2021232.3785.70175.5
Ain LoudahKorifla1972–2021225.76710162.8
Lalla ChafiaBouregreg1971–2021225.56890166.1
Sidi AmarTabahart1977–2021225.4657.70180.1
Sidi JabeurGrou1971–2021195.5592.10142.9
Ouljet HaboubGrou1972–2021184.6563.40133.7
Table 3. Statistical characteristics of temperature data of the six climatological stations used.
Table 3. Statistical characteristics of temperature data of the six climatological stations used.
Climatological StationPeriod of ObservationMean (°C)Max (°C)Min (°C)
Ain Loudah1971–202119.638.32
Sidi Jabeur1971–202119.7382
Ouljet Haboub1972–202119.8391
Table 4. Statistical characteristics of the inflow rate dataset of the SMBA dam.
Table 4. Statistical characteristics of the inflow rate dataset of the SMBA dam.
Inflow StationMax
Annual Inflow
Annual Inflow
Annual Inflow
Standard Deviation
SMBA’s Dam2583.967.2541.9530.6
Table 5. Adopted hyper-parameter and functions of the trained models.
Table 5. Adopted hyper-parameter and functions of the trained models.
ANN_Sep, ANN_Oct, ANN_Nov, ANN_Dec, ANN_Jan, ANN_Feb, ANN_Mar, ANN_Apr, ANN_May, ANN_Jun, ANN_Jul6 layers (including input and output layers)
310 neurons in hidden layers (10, 100, 100, 100)
Algorithm: Adam
Function activation: Softmax
Epoch number: 1000
Learning rate: 0.01
Table 6. Machine learning model performances during the training phase.
Table 6. Machine learning model performances during the training phase.
R2RMSENSEPerformance Rank
ANN_Sep0.650.590.64Good fit
ANN_Oct0.730.510.73Good fit
ANN_Nov0.820.410.82Good fit
ANN_Dec0.810.430.81Good fit
ANN_Jan0.870.350.81Very good fit
ANN_Feb0.900.310.87Very good fit
ANN_Mar0.960.190.90Very good fit
ANN_Apr0.960.180.96Very good fit
ANN_May0.980.120.96Very good fit
ANN_Jun0.990.080.98Very good fit
ANN_Jul0.990.060.99Very good fit
Table 7. ANN model performances during the validation phase.
Table 7. ANN model performances during the validation phase.
ANN_Sep0.350.770.32Unsatisfactory fit
ANN_Oct0.360.810.25Unsatisfactory fit
ANN_Nov0.370.810.25Unsatisfactory fit
ANN_Dec0.620.580.62Good fit
ANN_Jan0.750.460.75Very good fit
ANN_Feb0.840.380.83Very good fit
ANN_Mar0.900.30.89Very good fit
ANN_Apr0.940.230.93Very good fit
ANN_May0.980.130.98Very good fit
ANN_Jun0.990.090.99Very good fit
ANN_Jul0.990.070.99Very good fit
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nafii, A.; Taleb, A.; El Mesbahi, M.; Ezzaouini, M.A.; El Bilali, A. Early Forecasting Hydrological and Agricultural Droughts in the Bouregreg Basin Using a Machine Learning Approach. Water 2023, 15, 122.

AMA Style

Nafii A, Taleb A, El Mesbahi M, Ezzaouini MA, El Bilali A. Early Forecasting Hydrological and Agricultural Droughts in the Bouregreg Basin Using a Machine Learning Approach. Water. 2023; 15(1):122.

Chicago/Turabian Style

Nafii, Ayoub, Abdeslam Taleb, Mourad El Mesbahi, Mohamed Abdellah Ezzaouini, and Ali El Bilali. 2023. "Early Forecasting Hydrological and Agricultural Droughts in the Bouregreg Basin Using a Machine Learning Approach" Water 15, no. 1: 122.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop