Introduction

Since the beginning of the eighties of the last century, Morocco has been experiencing a situation of water stress characterized by a frequency and significant amplitude of the droughts. Morocco’s renewable water resource is currently estimated at 700 m3/inhab/year, less than the internationally recognized water poverty threshold of 1000 m3/inhab/year.

Population growth in the Sebou basin is putting increasing pressure on land and water resources. Ongoing changes in land use and management are altering the overall water balance, resulting in the increased runoff, peak flows, soil erosion, and sedimentation of downstream reservoirs, thereby reducing the availability of water in the watershed. Floods and pollution have been reported as the main problems in the Sebou Basin (Terink et al. 2011).

Water resources in Morocco are overexploited and are approaching the limit of the sustainable ecological removal of groundwater and surface water (Chadli 2017). Also, the storage capacity lost due to the siltation of dam reservoirs is estimated at 75 million m3/year which is equivalent to the loss of an average dam every 2 years (ABHS 2005). This situation may be further accentuated by the increased degradation of soils and vegetation cover which will lead to the erosion aggravation.

The implemented model in this study is the Soil and Water Assessment Tool (SWAT), which is based on a physical design rather than a statistically based design (Arnold et al. 2012b). This ensures more reliability and better performance especially in basins where there is a lack of gauging stations, which is an essential element for a study of this scale (Neitsch et al. 2005). This model makes it possible to establish the water budget and to estimate the sediment and transport rate in the study area.

The emergence of remote sensing and geographic information systems (GIS) technologies is a significant solution for solving both the problem of data access and the implementation of spatialized models. Space-based remote sensing offers new horizons for the collection of spatial data and the measurement of model parameters; so, the researchers believe that the great evolution of watershed modeling in the future will be the result of the development data collection by satellites (Abbaspour 2011).

The overall objective of this work is the modeling of the Upper Sebou watershed through a spatialized approach by simulating the influx of water and sediments produced at the level of different basin units and transferred through the hydrographic network to the basin outlet which is the dam Allal El Fassi.

Materials and methods

Study area

The Upper Sebou watershed is part of the Sebou basin, upstream of the Allal El Fassi dam, drained by the river with the same name, which originates in the region of Aguelmane Sidi Ali in about 2078 m above sea level. On its way, the Sebou river receives several tributaries (Guigou, Zloul, Maaser, etc.). It covers an area of 5495 km2, and it is located in the northern Middle Atlas between latitudes 33° and 34° north and longitudes 4°:03′ and 5°:20′ west; it is exposed to humid westerly dominant flows (Fig. 1), and whose altitudes exceed 3000 m. It generally presents a sub-tabular and faulted geological structure (Martin 1981). The lithology consists mainly of dolomitic limestones of the Lower Jurassic (lower and medium Lias), which overcome the series consisting of Triassic red shale and basalt. The lower Jurassic consists of carbonate rocks that were deposited on an extended platform (Martin 1981).

Fig. 1
figure 1

The geographic location of the study area (Upper Sebou)

SWAT model significance

The Soil and Water Assessment Tool (SWAT) is an agro-hydrological model, developed by USDA’s Agricultural Research Service (United States Department of Agriculture). It simulates the main watershed processes such as hydrology, sedimentation, nutrient transfer, crop growth, environment and climate change for a daily time step (Arnold et al. 1998). The purpose of this model is to describe the physical functioning of these different components and their interactions in a way that is as simple and realistic as possible through conceptual equations and the use of available input data to make it useful in planning and decision-making for watershed management (Ogden et al. 2001).

Texas A&M University has developed a graphical and visual interface of SWAT, ArcSWAT, that uses the digital elevation model (DEM), data of climate and gauging stations, hydrographic network, land use and soil map in grid or polygon, as inputs to the model. In addition, it facilitates the extraction of output parameters and visualizes the results (Di Luzio et al. 2002).

According to Neitsch et al. (2005), the processes involved in assessing water quantity by SWAT include precipitation, evapotranspiration, surface runoff, sub-surface or lateral flow, and subsurface flow. Simulation of the terrestrial phase, according to a daily time step, is based on the following water balance:

$${\text{SW}}_{t} = {\text{SW}}_{0} + \mathop \sum \limits_{i = 1}^{t} (R_{\text{day}} - Q_{\text{surf}} - E_{a} - W_{\text{seep}} - Q_{\text{gw}} )_{i} ,$$
(1)

where: SWt: the final soil water content (mm) SW0: the initial soil water content (mm) \(R_{\text{day}}\): the amount of precipitation on day i (mm) \(Q_{\text{surf}}\): the amount of surface runoff on day i (mm) \(E_{a}\): the amount of evapotranspiration on day i (mm) \(W_{\text{seep}}\): the amount of water entering the vadose zone from the soil profile on day i (mm) \(Q_{\text{gw}}\): the amount of return flow on day i (mm) t: Time [day].

SWAT-CUP

SWAT-CUP (SWAT Calibration and Uncertainty Procedures) developed by Abbaspour et al. (2007) offers a range of more extensive and richer functions and interfaces for parameterization and calibration of the model. This tool integrates the algorithm SUFI-2, which is a method widely used for the calibration of the SWAT model at large scales. It has ease of implementation and a reduced number of simulations necessary for better results (Yang et al. 2008). This stochastic method uses Latin Hypercube sampling to discretize the range of parameter variation and define their optimal values (Abbaspour 2011). The processing of the SWAT-CUP tool is based on the use of the output files generated in the SWAT model (Abbaspour 2011).

Database required

SWAT model uses a large spatial database including the digital elevation model, land use, soil layers characteristics, to subdivide the basin into hydrologic response units (HRUs). In addition to that, the model requires daily meteorological.

DEM

The GDEM-ASTER data (Global Digital Elevation Model from the ASTER sensor) have been used as the relief representation for this study, which is characterized by a spatial resolution of 30 m × 30 m. It is widely used in hydrological modeling of watersheds (Hirt et al. 2010). The relief was integrated into the SWAT model as a raster of elevations. And it will be used for the delineation of sub-basins and stream generation using the D8 algorithm (Jenson and Domingue 1988). The operating principle of the D8 algorithm is to evaluate slopes to create a matrix of flow directions, which makes it possible to identify the convergence points of the water and thus to extract the hydrographic network (Arnold et al. 2012a). To delineate the watershed, we choose Allal El Fassi dam which is the point of the watershed outlet for our study. The D8 algorithm then proceeds from upstream to downstream, including cells that converge to the outlet according to the matrix of flow directions Figs. 2 and 3.

Fig. 2
figure 2

Digital Elevation Model (DEM) of the Upper Sebou watershed

Fig. 3
figure 3

Slope map of the Upper Sebou watershed

Landuse database

Land use is one of the fundamental elements of hydrological modeling. It has a decisive role in the functioning of hydrological processes. In the SWAT model, land use is used to divide the basin into elementary units for erosion rate estimation, and surface flow. The map obtained by SWAT finally resulted in a land cover map (Fig. 4), with six classes: urban areas (0.27%), forests (20.87%), agricultural land (21.84%), matorral (40.86%), rangeland (14.50%), bare soils (1.66%) (Fig. 4).

Fig. 4
figure 4

Landuse map of the Upper Sebou

Soil database

In addition to the soil map, the SWAT model requires a dataset describing the physicochemical characteristics of each soil type, including the texture, depth, soil water availability (AWC), hydraulic conductivity (Ksat). For that, we used the soil database HWSD (Harmonized World Soil Database) produced by FAO (Food and Agriculture Organization) (Fig. 5).

Fig. 5
figure 5

Soil map of the Upper Sebou

Weather data

Weather data are the basic components of the water balance (Arnold et al. 2012b). For that, SWAT requires daily precipitation, maximum and minimum temperature, solar radiation, wind speed and relative humidity (Neitsch et al. 2005). In this context, the Upper Sebou is covered by a network of dense climatic stations managed by the ABHS (Sebou Basin Hydraulic Agency), which allowed us to obtain data on rainfall, while other climatic variables were obtained from Climate Forecast System Reanalysis “CFSR”, with a resolution of 38 km. Our choice of rainfall data was based on the result of the comparison of CFSR data and the observed precipitation in the Azzaba station (Fig. 6) for the period 2009–2013). The results of this comparison reveal a satisfactory correlation between the two sources of data. Since the coefficient of determination is equal to 0.67, we finally decided to adopt the data observed at the stations of the Upper Sebou as inputs of the model.

Fig. 6
figure 6

Correlation between observed rainfall and CFSR data at the Azzaba meteorological station for the period 2007–2013

Observed flows data

Observed flows on the Upper Sebou watershed are recorded at several permanent hydrological stations, installed downstream of the sub-basins, Therefore, our study will be based on the data of the Allal El Fassi station situated at the outlet of the watershed, at the dam level whose coordinates are X = 569 693 m, and Y = 368 778 m; it has been in service since 1991. It allows the recording of flow rates and weather parameters such as precipitations and temperature. It controls an area of 5495 km2. Also, the main tributaries, Guigou, Maaser, and Zloul, are also equipped with hydrological stations. The monthly flow data used in this study are provided by the ABHS. These are the data recorded from 2000 to 2013 at the Allal El Fassi hydrometric station since it controls all sub-basins belonging to the Upper Sebou (Fig. 7).

Fig. 7
figure 7

Delineation of sub-basins and gauging situation of the Upper Sebou

Results and discussions

Model simulation

The simulation period is defined over 14 years and is subdivided into:

  • Two years as a warm-up period (January 2000–December 2001) recommended to optimize calibration, this period aims to let the model do these first two complete hydrological cycles;

  • Calibration period (Jan 2002–Dec 2006);

  • Validation period (Jan 2007–Dec 2013).

Model performance

The calibration is based on the comparison between the outputs simulated by the model with observation data. The evaluation and the adequacy between the two datasets (simulated and observed) is done through statistical indicators like the Nash–Sutcliffe measure of efficiency (NSE), the root-mean-square error observations SD ratio (RSR), which is derived from the root-mean-square error (RMSE), and the percent bias (PBIAS) described by the following Eqs. (2), (3) and (4)

$${\text{NSE}} = 1 - \frac{{\mathop \sum \nolimits_{i = 1}^{n} (Q_{\text{obs}}^{i} - Q_{\text{sim}}^{i} )2}}{{\mathop \sum \nolimits_{i = 1}^{n} (Q_{\text{obs}}^{i} - Q_{\text{obs}}^{\text{mean}} )2}}$$
(2)
$${\text{RSR}} = \frac{{\sqrt {\mathop \sum \nolimits_{i = 1}^{n} (Q_{\text{obs}}^{i} - Q_{\text{sim}}^{i} )2} }}{{\sqrt {\mathop \sum \nolimits_{i = 1}^{n} (Q_{\text{obs}}^{i} - Q_{\text{mean}} )2} }}$$
(3)
$${\text{PBIAS}} = \left[ {\frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {Q_{\text{obs}}^{i} - Q_{\text{sim}}^{i} } \right) \times 100}}{{\mathop \sum \nolimits_{i = 1}^{n} \left( {Q_{\text{obs}}^{i} } \right)}}} \right].$$
(4)

The percentage of BIAS measures the average trend of the simulated data to be higher or lower than the observed data. An optimal value of the percentage of BIAS is zero; it indicates a perfect simulation of the model. A percentage of positive BIAS indicates an underestimation of the model while a negative percentage demonstrates overestimation of the model (Moriasi et al. 2007). A model is never perfect; it is always tainted with an imprecision associated with the complexity of watershed, and sometimes with the structure of the model. Based on the statistical criteria obtained by Moriasi et al. (2007), Table 1 establishes a monthly performance evaluation grid.

Table 1 Monthly performance evaluation grid (Moriasi et al. 2007)

Calibration of the SWAT model

The model is calibrated over 5 years (Jan 2002–Dec 2006) using the SUFI2 optimization method integrated into the SWAT-CUP tool. The sensitivity analysis is the process of determining the rate of change in model output with respect to changes in model inputs (parameters). It is necessary to identify key parameters and the parameter precision required for calibration (Andrade et al. 2000). In our study, the optimal values for these parameters are shown in the following Table 2:

Table 2 Optimal values of the calibrated parameters

The Nash coefficient obtained is of the order of 0.69 and that of determination is 0.70. These values indicate a good performance of the model at the calibration phase according to the evaluation criteria of the performance of the recommended model for a monthly time step (Moriasi et al. 2007). The monthly flows observed and those simulated by the model at the basin outlet (Allal El Fassi station) for this calibration period, are illustrated in Fig. 8, and showing that the flow simulation is generally faithful to reality.

Fig. 8
figure 8

Hydrograph of observed and simulated flows during the calibration period (Jan. 2002–Dec. 2006) at the Allal El Fassi station

SWAT-CUP also has other criteria to quantify the strength and uncertainties of the calibration analysis. In this study, the P factor and the R factor of the iteration were also noted. P factor represents the percentage of simulated data covered by the 95% uncertainty band (95PPU) and it ranges from 0 to 1 (Li et al. 2009). The P factor value of this study is 0.75 which entails that more than 75% of the simulated data are acceptable. R factor, on the other hand, estimates the strength of the calibration by dividing the average thickness of the 95PPU band with the standard deviation of the measured data. The range of R factor starts from 0 to infinity; high and low R factor values correspond to a thicker and thinner 95 PPU bands, respectively. A P factor of 1 and an R factor of 0 mean a perfect simulation of the observed data (Li et al. 2009). To find the best fit of the model, the R factor is minimized to 1.57 at its best.

In the hydrograph comparing the observed and simulated flow for the calibration period (Fig. 9), a good simulation is distinguished for the majority of flows. Concerning the year 2003, the flow recorded in December is 42.73 m3/s, and that simulated by the model is 37.87 m3/s. On the other hand, the model underestimated the flows in January 2003 and March 2005. In general, the model underestimated the cumulative simulation of calibration with a deficit of about 0.48% compared to observations.

Fig. 9
figure 9

Correlation between observed and simulated flow during calibration (2002–2006)

Validation of the model

The validation phase is the most decisive step in the simulation of water resources management at a watershed level. Once the performance of the calibration model is satisfactory, as is the case in our work, the model is simulated with the optimal parameters derived from the calibration, for another period called the validation period (Arnold et al. 2012b). This step was performed on ArcSWAT, replacing the values of the initial parameters with the optimal ones, using a manual calibration tool integrated into ArcSWAT. Subsequently, the model was simulated for 7 years of validation, from January 2007 to December 2013. The statistical indices for this period showed values ranging from satisfactory to very good (Fig. 10), which means a satisfactory correlation between the simulated flow rates and those observed. The percentage of BIAS is 1.82 which indicates a very good estimate of the flows simulated by the model during this period.

Fig. 10
figure 10

Correlation between simulated and observed flow rates (2007–2013)

These statistical criteria used to determine the performance of the model showed that the flows observed at the validation period level correspond better to those simulated. In Fig. 11, we can notice that the peak of March 2009 is overestimated by the model. On the other hand, the peak of February 2010 is consistent with the model estimation. Overall, the model underestimates the total flow by 1.82%. However, the SWAT model has approximately reproduced the flows for this period. The uncertainties at the peaks could be linked firstly to the use of weather data measured by the agents of the ABHS whose working conditions are lacking, and secondly to the complexity of the natural components of the watershed that can play an important role in the slight imperfection of the model.

Fig. 11
figure 11

Hydrograph of observed and simulated flows during the validation period (Jan 2007–Dec 2013) at the Allal El Fassi station

Water balance

Over the entire watershed, the average annual precipitations during the study period are of the order of 431 mm; 69.3% of this amount is eliminated by evapotranspiration (298.7 mm) (Fig. 12), Surface runoff is approximately 37 mm, or 8.58% of the precipitation, and the total flow is about 99.8 mm. This can be explained essentially by a recharge from the water table given the presence of a permeable substrate in the Upper Sebou watershed. The percolation value is 73.15 mm with a percentage of the order of 16.94%.

Fig. 12
figure 12

Water balance of Upper Sebou

Erosion yield

Erosion is estimated using the modified universal soil loss equation (MUSLE) [5]:

$$\begin{aligned} {\text{Sed}} & = 11.8\left( {Q\_{\text{surf}} \times q\_{\text{peak}} \times {\text{area}}\_{\text{hru}}} \right)0.56 \times K\left( {\text{USLE}} \right) \times C\left( {\text{USLE}} \right) \\ & \quad \times P\left( {\text{USLE}} \right) \times {\text{LS}}\left( {\text{USLE}} \right) \times {\text{CFRG}} \\ \end{aligned}$$
(5)

where Sed is the sediment yield on a given day [t] Q_surf is the surface runoff volume [mm/ha] q_peak is the peak runoff rate [m3/s] area_hru is the area of an HRU [ha] K (USLE) is the USLE soil erodibility factor C (USLE) is the USLE soil cover factor P (USLE) is the USLE support practice factor LS (USLE) is the terrain shape factor (slope and length of a slope) CFRG is the coarse fragment factor.

The quantity of sediments delivered by the different spatial units of the Upper Sebou watershed varies between 2.60 and 12.11 t/ha/year, with an average rate of around 6.51 t/ha/year (Fig. 13). A study conducted by the ABHS and High Commission for Water and Forests and the fight against desertification (HCEFLD) to analyze erosion problems and identify areas at high risk of erosion shows an average erosion rate between 5 and 10 t/h/year in the Middle Atlas regions. This value is close to the value estimated by the SWAT model. However, this rate is low and indicates that the Upper Sebou watershed presents different areas where water erosion is less important.

Fig. 13
figure 13

Map of the spatial distribution of erosion rate by sub-basin

Sediment inputs to the reservoir

The mobilized elements, which account for most of the alluvial flow, are exported mainly to the dam. The simulation results of the quantity of solid transport for the period 2002–2013 are shown in Table 3. For this period, the siltation rate of the reservoir dam was estimated by the model at 2.12 Mm3/year. This value was verified and validated by the bathymetric surveys of the Direction of Research and Water Plannification in 2017, which estimated average annual siltation rate approximately at 2.15 Mm3/year. This evolution of the rate of siltation can be explained by the major floods experienced by Upper Sebou in the study period and especially in 2006/2007–2008/2009. Figure 14 shows the variation in monthly sediment inputs in the dam during the study period. This variation shows that most of the sediment arrives at the reservoir during wet periods specifically during floods.

Table 3 Annual sediment and silt load of the Allal El Fassi dam (2002/2003–2013/2014)
Fig. 14
figure 14

Monthly sediment loadings at the Allal El Fassi dam during the study period (2002–2013)

Conclusion

Spatialized modeling approach (SWAT) as a management tool for the simulation of water resources at the watershed scale was successfully calibrated in the Upper Sebou watershed. It has, therefore, reproduced the hydrological balance and erosion in different entities of the study area and also the model assessed the water and sediment inputs to the Allal El Fassi dam. These results were obtained after a long process of data preparation and structuring on a spatiotemporal scale using remote sensing and geographic information system (GIS) techniques.

Overall, the SWAT model has correctly reproduced the flows for the validation period. Flow varies closely with precipitation. As a result, the uncertainties in peaks can be linked on the one hand to the use of observed flow data, and on the other hand to the complexity of the natural components of the watershed, which can present an important role in the slight imperfection of the model. The evapotranspiration is predominant in the water balance components. Indeed, 69.3% of the annual precipitation is evaporated. The surface runoff is only 47.71 mm; whereas the total flow in the river is 99.80 mm. The quantity of sediments delivered by the different spatial units of the Upper Sebou watershed varies between 2.6 and 12.11 t/ha/year, with an average rate of around 6.51 t/ha/year; also, the rate of siltation of the reservoir dam was estimated by the model at 2.12 Mm3/year.

The specific degradation of soil can reach a maximum value more than 12 t/ha/year upstream of the basin, particularly in the sub-basins controlled by the hydrometric stations of M’dez, Dar Lhamra and AinTimedrine characterized by bare soil and high altitudes. The presence of a dense canopy can reduce this rate. Indeed, the results obtained from this modeling show that the land covered by forests and matorrals are less affected by erosion. So, the reliability of SWAT modeling for Moroccan watersheds can be considered as an interesting tool for climate change studies, agricultural practices, and water resources allocation.