Introduction

Since the 1970s, the water sector in Morocco has taken a major place among the concerns of the public authorities because of its decisive role in the country’s food security (CESE 2014). This interest has been expressed by a set of policies and strategies to ensure water conservation and management, within the framework of national goals of socio-economic development (Lionboui et al. 2016a). However, in the current context of climate changes, the country is strongly confronted to water scarcity (Schilling et al. 2012), given the sensitivity of this resource to the variability of climate conditions (Gosain et al. 2006; Benabdelouahab et al. 2015). This situation seems to get accentuated in recent decades due to the significant decrease in rainfall with irregular spatiotemporal distribution and more frequent drought seasons (Esper et al. 2007; Driouech 2010). Further, Morocco is largely dependent on agricultural productivity. The latter is one of the major drivers of the Moroccan economy with an important contribution to the gross domestic product and high rate of employment (Lionboui et al. 2016b). However, agriculture is the most affected sector by climate condition variability (Mougou et al. 2011). In fact, the socio-economic stability of Morocco is highly sensitive to climate change, especially that most of the agricultural activities occupy rainfed lands (Schilling et al. 2012). Yet, with limited adaptation capacities, severe changes in climatic conditions greatly impact living conditions and food security in the country, mainly in poorer and rural areas (Lionboui et al. 2016b).

These last years, serious concerns have been raised about potential changes of water resource intakes and their influence on the environmental and social components. Hence, several debates and studies have discussed the spatiotemporal evolution of climatic parameters as an indicator of these changes. However, unlike temperatures that present significant changes consistent with global warming conditions, rainfall exhibits a strong temporal variability and spatial incoherent patterns in terms of tendencies (IPCC 2012, 2014). Still, rainfall has sparked a lot of interest in various climatic contexts, particularly in semi-arid regions, since it constitutes the primary source of surface water. On the one hand, many studies were developed to explore potentials to collect rainwater in small catchments through rainwater harvesting systems (Terêncio et al. 2017, 2018). On the other hand, numerous works were conducted to assess rainfall changes in space and time. Around the world, wide changes of this resource have been reported over the twentieth century (Bates et al. 2008). Rainfall significantly increased over three regions in the eastern part of the USA during the last half of the twentieth century (Boyles and Raman 2003; Burns et al. 2007; Lu et al. 2015). On the other hand, no significant changes in rainfall were reported over China (Chen et al. 2007; Liu et al. 2011). But at a smaller scale, river basin studies performed in China showed a large variability in trend directions, with serious declines over the Songhua River Basin against significant increases in rainfall over the Yangtze River Basin (Li et al. 2013, 2014). Even at one same site, the tendency of total rainfall may exhibit a high complexity as it changes direction from one season to another (Ahmad et al. 2015).

Furthermore, the Mediterranean Basin has known a generalized reduction in rainfall during the twentieth century (Xoplaki et al. 2004; Sousa et al. 2011). In the southern shore, the rainfall in Morocco is characterized by a strong spatiotemporal variability and experienced prolonged dry spells that prevalently took place in the last decades (Driouech 2010). Tramblay et al. (2013) evaluated the rainfall trends over North African countries (Morocco, Algeria, and Tunisia) and noticed a decline in total annual rainfall, linked to a decrease in wet days and an increase of dry periods in the extreme northern part of Morocco. Filahi et al. (2015) reported that rainfall presents mixed spatial patterns and a small number of significant changes. However, the extreme north exhibits a wetter condition against drier ones in the south. In fact, studies conducted over the Moroccan territory are in most cases of statewide-scale analysis focusing on lowlands and urban areas. Only limited studies were conducted at the basin scale. Khomsi et al. (2016) stated that rainfall exhibits different trends inside each of Bouregreg and Tansift River Basins, while an overall rainfall decrease was shown by Bouchaou et al. (2011) and Abahous et al. (2017) over the arid basin of Souss-Massa.

In addition, the geographical location of Morocco makes it undergo numerous influences and large-scale circulations (Knippertz et al. 2003; Driouech 2010). The winter rainfall was found to be highly correlated with the North Atlantic Oscillation (NAO), where large amounts of rainfall coincide with high negative NAO values (Lamb and Peppler 1987). However, the importance of the negative phase of NAO for winter rainfall is not the same over all parts of Morocco. The Atlantic region (named ATL) that covers the northwestern part, including the OER River Basin, is the most influenced by NAO which was found to be responsible for almost 50% of monthly rainfall variance in that region (Knippertz et al. 2003).

Indeed, it is necessary to investigate the rainfall variability at the basin scale in order to enhance our knowledge on small-scale rainfall patterns, and thus on water resource intakes in different territorial units of the basin. Such work presents a particular interest for the OER River Basin managers, stakeholders, and decision-makers, on the one hand, given the fact that the basin constitutes a transitory area between humid and dry conditions (Bouaicha and Benabdelfadel 2010); on the other hand, it contributes to water mobilization between basins, water supplying the irrigated perimeters, and hydropower generation (JICA 2007; USAID 2010; Ouatiki et al. 2017).

In this research, we aim to provide an analysis of rainfall variability over the OER River Basin during the period 1970–2010. First, we analyzed the deficit of annual rainfall using the standardized precipitation index (SPI), and secondly, we assessed rainfall trends at monthly, seasonal, and annual scales, using the Mann–Kendall test.

Study area

The area of study is the OER River Basin located in the center of Morocco between 31° 15′ N and 33° 22′ N latitudes and 5° 00′ W and 9° 20′ W longitudes (Fig. 1). It is one of the largest Moroccan basins occupying an area of nearly 35,000 km2 (7% of the total area). It is bordered from the east by the Atlas Mountains, represented by its two important parts, the Middle Atlas (oriented NNE–SSW) and the High Atlas (oriented NE–SW), that gives the main source of water supply for downstream plains. The highest peak of the basin culminates at 3890 m a.s.l (meters above sea level).

Fig. 1
figure 1

Geographical situation of the Oum Er-Rbia River Basin

The OER River Basin is drained by the Oum Er-Rbia River and two of its main tributaries Oued El Abid and Tassaout Lakhdar, taking its source from the Middle Atlas at 1800 m a.s.l. and running along 550 km until it reaches the outflow in the Atlantic Ocean. The OER River Basin contains many hydraulic structures, including the three main dams Bin El Ouidane, Ahmad Al Hansali, and Al Massira, which are intended to produce hydraulic energy and provide water for drinking and economic activities, particularly for irrigating agricultural plains. The agriculture is considered as the main consumer of water in the OER River Basin; almost 2856 m3 year−1 of water is mobilized for irrigating around 450,000 ha of agricultural lands (ABHOER 2017).

In this work, we have considered three territorial units: the plain (lower 500 m a.s.l.), the foothill and phosphate plateau (between 500 and 1000 m a.s.l.), and the mountain (greater than 1000 m a.s.l.).

Data and methods

Rainfall data

Rainfall records from 15 rain stations, within the limits of the OER River Basin, were used in this study (Fig. 1 and Table 1). Data series from 14 stations were provided by the Oum Er-Rbia hydraulic Basin Agency (ABHOER), and one station (Oulad Gnaou) was obtained from the Regional Office for Agricultural Development of Tadla (ORMVAT). Data of all stations were originally cheeked and treated for missing values. However, the selection of these stations was held to obtain a time series with the longest possible length, at least 30 years according to the World Meteorological Organization (WMO) recommendation. In fact, a period of 40 seasons (from 1 September to 31 August) was set as a reference period starting from 1970 to 2010, although the Oulad Gnaou time series ends with three seasons earlier than the others. Moreover, all the measurement stations lie in the banks of the upstream part of Oum Er-Rbia River and its tributaries, except for Oulad Gnaou, which exists within the irrigated perimeter of Tadla.

Table 1 Geographical locations of the used rain stations

Standardized Precipitation Index

The Standardized Precipitation Index (SPI) was proposed by McKee et al. (1993) to quantify the rainfall deficit for a certain period (Table 2). In 2009, the WMO recommended the SPI to be the standard index for tracking and monitoring meteorological drought (WMO, 2012), through the Lincoln Declaration on Drought Indices (Hayes et al. 2011). Applicable in all climate regimes, the SPI is classified as a green index due to its simplicity and ease of use (WMO & GWP 2016). Only rainfall data are required for this index to be computed, and it is as good in detecting wet periods as it is in dry periods. The SPI is tolerant to missing data, though it can be calculated on a time series of 20 years in length at least. However, a period of more than 30 years is ideal and would give more robust results (WMO & GWP 2016).

Table 2 Classification of drought intensity based on the Standardized Precipitation Index values

The SPI is calculated as the difference of rainfall from the mean of a specified period divided by the standard deviation:

$$ \mathrm{SPI}=\frac{P_i-\overline{P}}{\sigma } $$
(1)

where

P i :

rainfall total of the year i

\( \overline{P} \) :

mean annual rainfall of the time series

σ :

standard deviation of the time series

Mann–Kendall test

The Mann–Kendall test is a statistical test for evaluating trends in time series. It evaluates whether X (observed values) tends to increase or decrease over time. The Mann–Kendall test is essentially limited to test the null hypothesis that no trend exists in the data, without estimating the amplitude of change. It is a free distribution test; no assumption regarding the normality of the data is required. However, there must be no serial correlation for the resulting p values to be correct and the distribution must remain constant (Helsel and Hirsch 1992).

Mann (1945) proposed a test for monotonic trend which is based on τ (tau), a rank correlation coefficient defined by Kendall (1938). The τ coefficient tests the independence between two different variables, where one of them is arranged in an objective order (Kendall 1970). Mann–Kendall constitutes a particular case of Kendall’s test for correlation where the arranged variable is time (Hipel and Mcleod 1994).

To perform the test, Kendall’s S statistic is computed from the X and time data pairs (Kendall 1970). A subtraction between all consecutive observed data pairs is set, and a value of + 1, 0, or − 1 is assigned to positive differences, no differences, or negative differences, respectively. Then, the test statistic S is computed as the sum of the integers:

$$ S=\sum \limits_{i=1}^{n-1}\sum \limits_{j=i+1}^n\mathit{\operatorname{sgn}}\left({X}_j-{X}_i\right),\mathrm{where}\ j>i $$
(2)

where

$$ \mathit{\operatorname{sgn}}\left({X}_j-{X}_i\right)=\Big\{{\displaystyle \begin{array}{c}+1\kern0.50em \ \ \ \ if\ \ \ \left({X}_j-{X}_i\right)>0\\ {}\ \ \ 0\ \kern0.1em \ \ \ \ if\ \ \ \left({X}_j-{X}_i\right)=0\\ {}-1\kern0.50em \ \ \ if\ \ \ \left({X}_j-{X}_i\right)<0\end{array}} $$
(3)

A positive value of S indicates an upward trend, and a negative value of S means a downward trend. When the absolute value of S is small, no trend is indicated.

Further, for a large sample size (n > 10), the frequency of distribution tends to be normal (Kendall 1970). Thus, the mean value of S (E(S) = 0) and the variance (var S) are defined considering the presence of ties:

$$ \operatorname{var}\ S=\frac{1}{18}\left\{n\left(n-1\right)\left(2n+5\right)-\sum \limits_tt\left(t-1\right)\left(2t+5\right)\right\} $$
(4)

where

n :

sample size

t :

length of the tied group

Then, the significance of the trend results is evaluated computing the standard normal variate Z. The null hypothesis of no trend is rejected, under a certain significance level α, when ∣Z ∣  >  ∣ Zα∣.

$$ Z=\Big\{{\displaystyle \begin{array}{c}\frac{S-1}{\sqrt{\operatorname{var}\ S}}\kern0.50em \ \ if\ \ S>0\\ {}0\ \kern0.50em \ \kern0.50em \ \kern0.50em \ \kern0.50em \ \kern0.50em \ if\ \kern0.50em S=0\\ {}\frac{S+1}{\sqrt{\operatorname{var}\ S}}\kern0.50em \ \ if\ \ S<0\end{array}} $$
(5)

Theil–Sen slope

Proposed by Theil (1950) and Sen (1968) and later extended by Hirsch et al. (1982), the Theil–Sen slope (β) is a useful index to express the magnitude of trend as a slope: change of the data per unit time (Hirsch et al. 1982).

The Kendall slope estimator, which is resistant to outliers, is defined to be the median of the differences of the ordered data pairs included in the Mann–Kendall test. The positive/negative β connotes the slope of the upward/downward trend.

$$ \beta =\mathrm{median}\left(\frac{X_j-{X}_i}{j-i}\right),\mathrm{where}\ j>i $$
(6)

Results and discussion

Rainfall variability

Generally, the study area is characterized by a Mediterranean climate, a cold wet winter, and a hot dry summer. Beside the western advections, which are the dominant source of moisture in the OER River Basin (Moniod and Roche 1973), the orographic uplifting effect plays a major role in stimulating rainfall generation over the study area. The Atlas chain, which limits the OER River Basin from the east, holds most of humid advections along the western slope. Hence, a strong contrast marks the southeastern side of the Atlas in terms of rainfall amount, where the mean interannual is around 100 mm (Navas et al. 2013).

The majority of the OER River Basin is semi-arid with sub-humid parts located on high altitudes of the Atlas (Mokhtari et al. 2013). It is characterized by a strong spatiotemporal variability of rainfall. During the period of 1970–2010, the total annual rainfall ranged from 80 mm in the plain to about 1100 mm in the mountainous areas (Fig. 2a). An exceptionally wet season, up to 1500 mm, was recorded at Aval El Heri station which is located within the wetter region of the OER River Basin. In fact, the relationship between total annual rainfall and the altitude is far from being perfectly linear. However, the mountainous area receives the largest amounts of rainfall with a regional average of 480 mm against 330 mm in the plain (Al Massira, Oulad Sidi Driss, Ouaouirinth, and Oulad Gnaou), where 75% of the seasons accumulate less than 370 mm year−1 (Fig. 2a). Nevertheless, stations in sheltered areas exhibit low rainfall amounts compared to the foothills.

Fig. 2
figure 2

a Annual and b monthly precipitation amounts over the study period (1970–2010)

The annual cycle of rainfall in the OER River Basin shows a clear seasonal variation with two distinct periods: a wet period of 6 months beginning in November and lasting until April and a dry period that extends between the months of June and September. These two periods are separated by the months of October and May that we considered as transitory months. The smallest amounts of rainfall often occurred during the summer (June, July, and August), where July is the driest throughout the study period with monthly values hardly exceeding 15 mm (Fig. 2b). Nevertheless, sometimes high rainfall amounts are observed, generally produced as a result of stormy events, which are more abundant in August. During the wet period, the monthly totals generally remain low. Nearly 60% of monthly totals recorded during 1970–2010, over the entire study area, are less than 60 mm. However, in the mountainous area where some months receive more than 200 mm, the peaks alternate over all the months of the wet period, from one year to another, although a great number of stations register a strong occurrence of maxima, respectively, during April, January, and November. Still, 40% of the annual rainfall total is ensured by the winter months (December, January, February), 10% more than those of the spring season (March, April, and May).

Drought analysis

Since the 1970s decade, the rainfall situation over the OER River Basin has undergone noticeable changes manifested in persistent dry periods and isolated or some consecutive wet seasons. The basin experienced an overall deficiency of water intakes, particularly since the early 1980s. As it was identified from the SPI series (Fig. 3), during the period extending from 1970 to 2010, the dry seasons occurred relatively more than the wet seasons. The percentage of occurrence ranged from 50% at the Tamesmate station and 63% at Oulad Sidi Driss. However, all the studied sites exhibit a predominance of small intensity deficits. On average, 72% of the seasons were mildly dry against 22% of moderately dry and less than 10% of severe ones, but no extremely dry season was reported over the whole study period.

Fig. 3
figure 3

Annual rainfall deficit based on SPI during the period of 1970–2010

The 1970s were mostly marked by wet seasons, where five stations show a clear and persistent wet period over the whole decade, with some very and extremely humid seasons. Some shorter periods were observed in the rest of the stations, most of which took place in the second half of the decade. Unlike the 1970s, wet periods are less frequent and generally of small extent over time, mostly of two successive seasons that permeate two successive dry periods. However, two wet periods of three seasons long were observed at several sites. The first appears between 1987 and 1988 and 1989 and 1990 and the second between 1995 and 1996 and 1997 and 1998. The 1995–1996 season was the wettest over much of the study area, particularly at the Tizi N’Isly and Aval El Heri, and also over most regions of Morocco (Driouech 2010). Hence, over the course of this period, several places witnessed important flood events that caused human losses and damaged the infrastructures and agricultural lands (Daoudi and Saidi 2008; MEMEE 2008).

However, the three stations Aval El Heri, Moulay Bouzekri, and Taghzirt were the first to experience a dry period of four seasons starting in 1971–1972. The 1980–1981 season was of a significant impact for all the OER River Basin sites. Henceforth, the area has experienced a succession of dry episodes interspersed with a few of moderately to extremely wet seasons. The first one, which lasted between five and seven seasons, took place in the early 1980s and was almost widespread over the entire basin. The second, which counts three to five seasons long, occurred between 1990 and 1991 and 1994 and 1995. Yet, at some stations, these two periods were almost connected to one another, except the appearance of slightly humid seasons. Therefore, the rainfall deficit over the OER River Basin has reached about 20% and 21%, respectively, during the 1980s and 1990s decades. These intense multiyear drought periods, identified by Esper et al. (2007) and Driouech (2010) over several areas of Morocco, have led to dramatic reduction in agricultural production causing the GDP to decline and provoke serious economic instability (Fatna and Handoufe 1997; Balaghi et al. 2007). Xoplaki et al. (2004) and Sousa et al. (2011) have reported that these two periods were the most severe and their extent was very wide over the Mediterranean Basin. It was suggested that the dry conditions during the 1980s and the 1990s were mostly driven by the NAO-positive phase (Lamb and Peppler 1987; Hurrell and Van Loon 1997; Knippertz and Fink 2009). Further, since 1997–1998, a third dry period has started at all stations with a length that varies between four and six seasons. The last dry period appeared between 2004 and 2005 and 2007–2008 with a slightly humid season in 2005–2006.

Trend analysis

The annual rainfall during the study period (1970–2010) has shown a predominant decreasing trend over the OER River Basin, except for the three stations Aval El Heri, Moulay Bouzekri, and Taghzirt (Table 3). The latter stations, which are located relatively close to the foothill of the Middle Atlas, exhibit a non-significant increasing trend. Among the 15 considered stations, Al Massira, Ouaouirinth, and Oulad Gnaou were the only three stations that experienced a significant decline of rainfall during the 40 years. The rates of decrease at these three stations, situated in the plain, are relatively close. However, the highest magnitude of decrease was observed at the Oulad Gnaou station with about − 3.87 mm year−1. These declining tendencies were mostly accounted to the first two decades. These results confirm the noticed decrease in surface water availability with a rise in water demand in the Tadla plain, which implies an increasing pressure on surface water and groundwater resources specifically during drought periods (Lionboui et al. 2016a).

Table 3 Sen slope for annual and seasonal time series

Besides, the data time series was split into two parts and the rainfall amount behavior during each period was analyzed. A sharp decrease in total rainfall was found during the period from 1970 to the mid-1980. Ten out of 15 stations demonstrate a statistically significant downward trend. Henceforth, although non-significant, a slight increase took place at many stations and gets spread out after the early 1990s. This last observation is similar to what was declared in previous work done by Tramblay et al. (2013) over the North African countries, including Northern Morocco. The authors have reported an increase in rainfall totals after 1980, which they linked to the positive anomalies registered in 1995/1996 and 2009/2010.

Considering the seasonal and monthly totals, we note that at the same site, rainfall trends show different directions throughout the hydrological season (Table 3 and Fig. 4). However, there are many negative instances than positives suggesting an overall tendency towards drier conditions. The rainfall decreases are concentrated around the winter and spring seasons, which occupy both most of the wet period, while the summer and autumn seasons mostly exhibit increasing trends.

Fig. 4
figure 4

Trend directions for each month over the period of 1970–2010 (triangles with bold limits express significant trends at α = 0.05)

In the summer months, except for some isolated points which show a rainfall decrease during the month of June, all the obtained tendencies are either null or very low increasing slopes. The latter were found to be spatially frequent during the month of August. And only Ait Tamlilt and Tizi N’Isly, the highest in terms of altitude, show notable rainfall increases with statistically significant rates of + 0.37 mm year−1 and + 0.20 mm year−1, respectively. The rising trends are more prevalent during the autumn season, but none of them is statistically significant. The month of September shows a kind of balance between null, positive, and negative trends. October, November, and even December present widespread positive trends with rates becoming more accentuated around December and reaching + 1.29 mm year−1 at Taghzirt.

Moreover, the falling tendencies start to take place in January and February, except some positive slopes found at the foothill stations. The average rate of decrease for these 2 months is − 0.4 mm year−1 (January) and − 0.24 mm year−1 (February), though no station showed a statistically significant decrease. The negative trends are much more homogeneous in space during spring. All stations show a noticeable decrease in rainfall during the 3 months of the season, except at Oulad Sidi Driss where the rate of change is almost null during the month of May. The remarkable decline during the spring season is largely driven by the important decreases that occurred during the month of March but mainly during the month of April. The latter experienced dramatic rainfall drop amounts equivalent to rates up to − 1.52 mm year−1 (Ait Sigmine). The importance of decline is also reflected in the spatial scale, where 10 out of the 15 sites show statistically significant decreases at an average rate of − 1 mm year−1. In fact, the irrigated perimeter of Tadla mainly relies on water from the Bin El Ouidane dam. Since the rainfall decreases noticed over the mountainous regions, the dam storage withdraws and the water release for irrigation gets under the demand. Hence, the groundwater is subjected to huge pressure as the farmers rely more on groundwater to compensate the rainfall deficit registered over the plain. The pumped groundwater used in irrigation has increased by 6.28% between 2003 and 2010 (ABHOER 2012; Lionboui et al. 2016b).

Conclusions

The Moroccan kingdom undergoes influences from the Mediterranean, the Atlantic Ocean (locally named Gharbi) and the Sahara (locally named Shergui). However, the rainfall occurrence is largely influenced by the NAO (Lamb & Peppler 1987; Knippertz et al. 2003). Despite this, the mountain chains that spread over the Moroccan territory considerably affect the spatial distribution of rainfall. It is the case for the Atlas chain that holds the credit for the water availability in the OER River Basin and thus the socio-economic development resulting from agricultural production, where the water held in artificial reservoirs and dams contributes to the irrigation of some of the most important irrigated perimeters in all Morocco.

In this paper, we have studied the rainfall variability over the OER River Basin. Beside a classic statistical exploration of the observed rainfall data, we have used the standardized rainfall index to analyze the annual deficit, and the Mann–Kendall to assessed rainfall trends at different time scales. The OER River basin, mostly semi-arid, has known strong year-to-year rainfall variability during the period 1970–2010. There was a prevalence of deficit years since the early 1980s. This decade was distinguished with one of the most severe and long-lasting dry periods over the study area. It counts up to seven consecutive seasons of mildly to severe deficits. Since then, three dry periods have taken place with relatively short extent. In addition, the wet spells are less frequent and mostly of small length over time, except the 1970s, which was found to be abundant with wet seasons and spatially incoherent wet periods. Furthermore, the rainfall amounts at annual scale demonstrate an overall decline through the period 1970–2010. Only three stations, situated in the plain, experienced a statistically significant decreasing trend. The most important rates of decrease were found between 1970 and mid-1980s with a wide spatial consistency. Seasonally, rainfall trends exhibit a mixture of directions in one same site. While the summer and autumn show a non-significant increasing trend, the winter and spring were dominated by strong decreasing tendencies. In particular, the spring months demonstrate the large number of significant decreases, mostly found during April.

The findings of this analysis, which fill an important gap of rainfall studies in the OER River Basin, emphasize that the region encountered a serious issue regarding water availability. The observed decrease in rainfall over the entire region, particularly during the most important month of the hydrological/agricultural season, should be considered as alarming signs for future difficulties that the area may face. The situation challenges the decision-makers and managers to take measures to guide alternative management practices enabling mitigation to decreasing water resources, thus leading to efficient and sustainable surface water use.