**1. Introduction**

Morocco's rainfall distribution is varied in both spatial and temporal scales. It can reach more than 800 mm at high altitudes, but hardly more than 300 mm on the plains [1]. The Moroccan High Atlas has seen some of the most destructive flood occurrences in history, such as the 1995 Ourika flood, which killed 732 people and cost MAD 80 million in economic damage [2]. The use of flood frequency analysis in dry and semi-arid environments, particularly in developing nations, can be tremendously beneficial for better assessment of, and planning for, flood risk and reducing the disastrous effects of this phenomena [3]. The N'fis watershed was studied because it is located in the High Atlas area, which is prone to flooding [4]. This area is marked in particular by substantial spatiotemporal variability of precipitation and relative irregularity of surface runoff [5].

Many studies have been carried out in the N'fis Wadi watershed. For instance, [6] investigated the relative performance of the Snowmelt Runoff Model (SRM) to simulate streamflow in five sub-catchments of the High Atlas Mountain range; this study found that

**Citation:** Joumar, N.; Markhi, A.; El Messari, J.E.S.; Benaabidate, L. Assessment of Flood Frequency Pattern in a Complex Mountainous Terrain Using the SWAT Model Simulation. *Environ. Sci. Proc.* **2023**, *25*, 102. https://doi.org/10.3390/ ECWS-7-14195

Academic Editor: Silvia Kohnova

Published: 14 March 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

snowmelt contribution to surface runoff in the N'fis watershed was lower compared to neighboring mountainous catchments, and the hydrological model tended to underestimate peak flows due to their absence in the input weather data [7]. On the other hand, the first to develop a water erosion risk map of the watershed via digital processing of various satellite products, this study indicated that more than three quarters of the catchment area located south-east and west of the sub-basin is subject to moderate, high, and very high risk of water erosion. This work was followed by [8], who applied the RUSLE and SEDD models over two periods to analyze the impact of land use change on potential erosion, as well as the suspended sediment yield (SSY); this study revealed that, in general, there was a decrease in the spatial annual average erosion rate (and subsequently the sediment delivery ratio) over the years due to significant changes in land use in the area. Similarly, but using a different approach, [9] used the SWAT model (Soil and Water Assessment Tool) to estimate potential soil erosion and sediment yield in the semi-arid Nfis basin; this study determined soil loss within each hydrological response unit in the watershed and indicated a high yield rate (123 t Ha−<sup>1</sup> for an average annual rainfall of 315 mm yr<sup>−</sup>1).

Additionally, a previous study carried out regarding the Ourika watershed by [3] compared 12 frequency models using the maximum likelihood method and the criteria to guide the selection of the most appropriate model; it showed that the most suitable method was the GEV law. Another study tackled regional flood frequency analysis in the catchments (N'Fis, Rheraya, Ourika, Zat, and R'dat) [10], using the generalized extreme value (GEV) model. However, no studies have compared statistical probability distributions (such us generalized extreme value (GEV), log-Pearson III (LP3), and Gumbel (EV1)) in the N'fis watershed; these constitute an important aspect of flood modeling and forecasting. These statistical probability distributions are generally used to estimate the magnitude and probability of the occurrence of extreme events and to obtain accurate results [11]. The data series required to proceed with FFA generally exceeds 50 years [12]; due to data scarcity, hydrological modeling is required to acquire long-term flood time series. The SWAT model (Soil and Water Assessment Tool) was used, which is a physically based, continuous model. Major model components include weather, hydrology, soil temperature and properties, land use, etc. [13]. This model was chosen for its ability to take into account the different important factors that impact floods, especially in a rural area (which is the case for the N'fis Wadi watershed), and for its proven good performance in different watersheds in Morocco [9,14–16]. The overarching goals of this study were to first, generate a long time series of flow using the SWAT model, and second, apply flood frequency analysis to these data series, compare the three common statistical distributions used in FFA, and investigate the goodness of fit of the three distributions methods selected.

### **2. Materials and Methods**

### *2.1. Study Area*

The Tensift watershed is located in west-central Morocco; it covers a total area of 24,000 km<sup>2</sup> and includes the seven prefectures and provinces, including Marrakech, Al Haouz, and Al Youssoufia (Figure 1). The study area, N'fis, is the largest subbasin of the Tensift watershed, which drains a total area of 1700 km. This complex-terrain watershed is characterized by an elevation that ranges from 641 m to 4080 m, with a mean elevation of 1860 m. The watershed is 96% rural land and only 6% urban [8]. The land use consists mostly of forested areas (44%) and the dominant soil type is zonal brown soils on shale socle, which explains the impermeable nature of the basin (79.3%) [17]. The basin's climate is semi-arid, characterized by hot (max: 46◦C) and dry summers and then cold (min: −7.4 ◦C) humid winters [18]. The annual rainfall ranges from 254.1 mm in low altitude to 796.9 mm in high altitudes.

**Figure 1.** Location of the N'fis watershed and the hydrometeorological stations.

### *2.2. SWAT Model*

The Soil and Water Assessment Tool (SWAT) is a widely used hydrological model that simulates the hydrological processes of a watershed [13]. It is a comprehensive model that integrates various sub-models to simulate the water balance, erosion, sediment transport, nutrient cycling, and crop growth within a watershed. The SWAT uses a semi-distributed approach to simulate the complex interactions between land use, climate, topography, soil properties, and vegetation in a watershed [19].

The mathematical equation of the SWAT is based on the water balance equation [20], which is expressed as:

$$P = \mathbb{Q} + S + E + G + A \tag{1}$$

where *P* is precipitation, *Q* is runoff, *S* is soil water storage, *E* is evapotranspiration, *G* is groundwater flow, and *A* is lateral flow. The SWAT model uses this equation to represent the water balance of the watershed and to simulate various hydrological processes.

The SWAT has been used in a variety of applications, including water resources management, land use planning, and climate change impact assessments [21]. Its flexibility,adaptability, and comprehensiveness make it a valuable tool for studying the interactions between land use, climate, and water resources in watersheds. The dataset used in the SWAT set up are presented in Table 1. The weather data inputs used in this study were daily precipitation and minimum and maximum air temperatures. The SWAT can simulate wind,solar, and humidity data. The SWAT was set up for a period of 16 years, including 2 years warm-up (2000 and 2001) to ensure that the model was initialized, calibration (2002–2012),and 4 years validation (2013–2016).


**Table 1.** Geo-spatial and hydrometeorological datasets.

### *2.3. Model Calibration and Validation*

Among various methods used to perform calibration and uncertainty analysis is the widely used Sequential Uncertainty Fitting 2 (SUFI-2) approach with the SWAT Calibration Uncertainty Procedure (SWAT-CUP) [22,23]. The SUFI-2 is a semi-automated approach that is used to perform parameterization, sensitivity analysis, uncertainty analysis, calibration, and validation of hydrologic parameters [24]. Sensitivity analysis, in particular, is necessary to understand which particular input parameter has a significant impact on the model outflow [25]. Thus, the SUFI-2 algorithm was used to analyze 16 input parameters and further calibrate and validate the SWAT model. The model's performance was evaluated using Nash–Sutcliffe efficiency (NSE) [26,27], percent of bias (PBIAS) [28], and the rootmean-square error (RMSE) [29].

### *2.4. Flood Frequency Analysis*

Using the calibrated model output, 50 years of annual discharge (m3/s) (1966 to 1960) was simulated and used to derive the flood frequency curve by applying commonly used probability distribution functions (the Gumbel distribution (EV1), log-Pearson III, and generalized extreme value distribution (GEV)). These distributions are widely used to estimate extreme values of available datasets [30]. Two methods were used to estimate the parameters of the distributions: first, the method of moments (MOM) technique, which is most used in Canada to estimate parameters for EV1 (Gumbel) [31] and the Pearson logarithm type III (log-Pearson III) (which is widely used by U.S. federal agencies for flood frequency analysis) [32]; second, the probability-weighted moments (PWM) method was used to calculate the generalized extreme value distribution (GEV), which is beginning to be accepted [31]. GEV and LP3 distributions include three parameters (location, scale, and shape), whereas Gumbel and normal distributions include two parameters (location and scale).

The probability density functions of the three distributions are presented in Table 2. The mathematical details regarding the above-mentioned probability distributions can be found in the reference book [33]. Kolmogorov–Smirnov (K–S) and Anderson–Darling (A–D) tests were used to assess the performance of each distribution.


**Table 2.** Probability density function equations.

### **3. Results and Discussion**

### *3.1. SWAT Model Performance*

The calibration of the model was performed using data from the Imin Lhamam and Iguir Nkouris gauging stations for the period of 2002-2012. Subsequently, the model was validated using data from the period of 2013-2016. The effect of melting snow was taken into account during the calibration stage.

Figure 2a,b show the results of the calibration and verification of the model as the hydrographs of measurements and modeling for the calibration and verification periods; Table 3 shows the respective results of the statistical indicators. The results of NSE were >0.5 and were considered satisfactory for both the calibration and validation periods (Table 3). The indicator PBIAS and RMSE for both stations (Iguir Nkouris and Imin Lhamam) presented good performance. Observing the hydrographs, the surface runoff was overestimated for a number of years (e.g., 2009); it could not be reduced because doing so would have affected the base flow. However, the model generally underestimated the runoff. A study by [34] explained that this underestimation was due to the limited number of meteorological stations or an inadequate description of the rainfall input.

**Figure 2.** (**a**) Daily simulated and observed discharge (m3/s) for the 2002–2012 period at Imin Lhamam station. (**b**) Daily simulated and observed discharge (m3/s) for the 2002–2012 period at Iguir Nkouris station. (**c**) Daily validated discharge (m3/s) for the 2002–2012 period at Imin Lhamam station. (**d**) Daily validated discharge (m3/s) for the 2002–2012 period at Iguir Nkouris station.

**Table 3.** Results of statistical evaluation for calibration.


### *3.2. Flood Frequency Analysis*

The return period LP3, Gumbel, and GEV results are given in Table 4. The distributions were able to provide maximum discharge for return periods between 2 and 100 years. It appears that the GEV was the most appropriate to estimate the occurrence probability of N'fis' floods. The value of the decennial return period was 303.09 m3/s, and the 100-year flood reached 949.5 m3/s. These quantiles are very high compared to the mean discharge (5.3 m3/s).


**Table 4.** Results of Return Period Analysis for Log-Pearson III, Gumbel, and GEV Models.

The GEV distribution better approximated the relationship between the return period and discharge (Figure 3). In both tests, GEV demonstrated favorable outcomes and was found to be highly comparable to the log-Pearson III results, as evidenced by Table 5. The Gumbel distribution deviated from the norm (based on the Anderson–Darling test) and at the same time provided lower flow values for long return periods; therefore, it lagged behind the other two distributions and was considered unequable. A notable observation is that the 95% confidence interval for longer return periods was expanded for the log-Pearson III and GEV log distributions, while remaining unchanged for the Gumbel distribution.

**Figure 3.** Flood Frequency Analysis of the N'fis Watershed (1966–2016) Based on Imin Lhamam Data (**a**) GEV (**b**) Log-Pearson III (**c**) Gumbel (EV1).


**Table 5.** Goodness-of-fit test results for Imin Lhamam.

### **4. Conclusions**

This study's main finding is that the SWAT (Soil and Water Assessment Tool) model managed to adequately simulate the ungauged N'fis watershed. The predicted values showed quite good agreemen<sup>t</sup> with the observed data, based on statistical criteria. The calibration process requires a long time to provide as many cases as possible to reach the best scenario. Another problem is that the SWAT model is not able to simulate single events and reach high peaks of flow during dry periods. These high peaks affect the Nash–Sutcliffe and RSR values.

Comparing the goodness-of-fit of log-normal, Gumbel, GEV, and LP3 distributions for flood frequency analysis in the N'fis watershed, the GEV distribution showed good results and appears to be the most suitable.

**Author Contributions:** Conceptualization, N.J. and A.M.; methodology, N.J.; software calibration/validation, N.J.; data curation, A.M.; supervision, L.B. and J.E.S.E.M.; writing—review and editing, all authors. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.
