Introduction

In recent decades, global warming has been a real threat to humanity. Morocco, as part of countries with an arid and semi-arid climate, remains one of the most vulnerable to the effects of climate change (Boko et al. 2007; Kuriqi 2014; Kuriqi et al. 2016). It is characterized by a spatiotemporal irregularity of rainfall, becoming increasingly weak towards the south (Driouech et al. 2013; Babqiqi 2014).

The IPCC’s Fourth Climate Change Report (IPCC 2007) has shown that Morocco will likely experience a decrease in precipitation that could reach 20% and a rise in temperatures that are expected to reach 2.5 °C to 5.5 °C at the end of the century. However, the global climate models used to date by the IPCC are low resolution and do not contain very precise information on topography, vegetation, and soil. However, assessing the impact of climate change on socio-economic sectors, such as agriculture and water resources, requires high-resolution climate change scenarios.

Several studies on rainfall in Morocco have shown that the number of years with a rainfall deficit is greater than the number of surplus years, with a general downward trend of between 12 and 23% depending on the region (Stour and Agoumi 2009; Driouech 2010; Sebbar et al. 2011; Driouech et al. 2013; Ouhamdouch et al. 2016; Ouhamdouch and Bahir 2017). By comparing the mean annual temperatures over two periods 1971–1980 and 1998–2007, an upward trend with warming varying from 0.3 to 2.5 °C depending on the region has been observed (Babqiqi 2014; Blunden and Derek 2015; Bahir et al. 2016). This situation makes water resources limited; they are estimated at 20 billion m3, an average of 700 m3/person/year, which corresponds to the situation of high water stress.

The main objective of this study is to evaluate the groundwater state in a semi-arid environment in Morocco and their relationship with global warming, by taking the Essaouira Basin as an example. To achieve this objective, the evolution of (i) climatic parameters (temperature and precipitation), (ii) groundwater level, (iii) salinity, and (iv) isotopic composition of groundwater has been treated.

Site description

The Essaouira Basin is located on the Atlantic coast of Morocco, at the western end of the High Atlas. This Basin occupies an area of 6000 km2. It includes several aquifer systems belonging to two synclinal units: the Bouabout unit (eastern part of the Basin) and the synclinal unit of Essaouira (western part of the Basin). These two units are separated by the outcrop of the Triassic formations (Tidzi diapir) (Fig. 1).

Fig. 1
figure 1

Location map of the study area

On the geological and structural framework, the Triassic and Jurassic formations have only very small outcrops and are located in the center of anticlines (Jbel Hadid NW, Jbel Amsitene SW, and diapir Tidzi), while the formations of the tertiary and quaternary occur in the synclinal Basin (Fig. 1).

The Triassic formations consist of saliferous red clays, doleritic basalts, and sandstone pelites. The Jurassic formations are composed of carbonate deposits (limestones and dolomites) and marls rich in gypsum and anhydrite. As for the lower Cretaceous, it is formed of marls and limestones with an average thickness of 200 m (Duffaud et al. 1966); the middle Cretaceous begins with martian-sandstone deposits of the Aptian with an average thickness of 60 m, followed by pyritic marl of the Albian with a thickness of about 100 m). Marls also dominate the Cenomanian (thickness of about 200 m); they are rich in anhydrites and are interbreed with past some limestone units. These marls constitute the bedrock of the Turonian aquifer with fractured flint, 60-m thick on average. The Cretaceous is completed by dolomitic marls and limestones surmounted by gypsiferous and siliceous gray marls interspersed with Senonian sandstone which separate the two Turonian and Plio-Quaternary aquifers of the synclinal zone of Essaouira (Duffaud et al. 1966).

Tertiary age compression (Souid 1983; Amghar 1995) and distasic tectonics of Triassic and Jurassic age (Duffaud et al. 1966; Souid 1983; Broghton and Trepanier 1993) gave the study area architecture in the form of anticlines and synclines. This architecture allows having several aquifers distributed as follows: in the upstream part, we find aquifers housed in the limestone and dolomitic limestones of the Cenomanian–Turonian. The impermeable base and the roof of the system are ensured, respectively, by the gray clays of the Lower Cenomanian and the Senonian white marls (Bahir et al. 2008). While in the downstream part, groundwater resources are contained in two main reservoirs: the Plio-Quaternary with marine calcareous sandstone matrix containing phreatic aquifers, and the Turonian which contains a water table quickly captive under the Senonian marls probably in direct contact with the Plio-Quaternary on the borders of this structure (Bahir et al. 2007; Jalal et al. 2001).

Methodology

A series of sampling campaigns were carried out in 1990, 1995, 2004, 2009, 2015 and 2017 in the Essaouira Basin. The depth of water level, electrical conductivities, pH, and temperatures were determined in field. The major elements contents were determined at the faculty of science of Marrakech. The anions (Cl, SO42−, and NO3) were assayed by liquid ion chromatography on a DIONEX apparatus connected to an electronic integrator, the cations (Ca2+, Mg2+, Na+, and K+) by atomic absorption spectrometry on a VARIAN apparatus type 640, and alkalinity by pH-metric using a sulfuric acid solution.

Stable isotope analysis was performed at the laboratories of IAEA-IHS (Vienna, Austria) and at the Laboratory of Radio-Analyses and Environment in the National School of Engineers of Sfax (Tunisia).

The climatic data used are the annual and monthly series of precipitation and temperature of the Igrounzar station, Adamna station, and Essaouira station. Data were obtained from the Tensift Basin Hydraulic Agency (ABHT). The location of the observation station is shown in Fig. 1. Two techniques were followed: one graph based on weighted rainfall indices (WRI), and the other statistic based on Pettitt and Mann–Kendall tests. The WRI is determined from the Nicholson and Assani equations, and the statistical tests were applied through the software XLstat® (trial version).

Rainfall index

This parameter estimate the deviation from a long-term mean based on data from the observation station. The annual rainfall index Ip is the reduced central variable of annual rainfall. It is calculated through the Eq. (1) (Nicholson 1986):

$${\text{Ip }} = \frac{{x_{i} - x_{m} }}{\sigma }$$
(1)

with Xi: rainfall of the year i; Xm: the average of the series; σ: the standard deviation of the series.

The weighting of the annual totals of the precipitation was done using the Eqs. (26) proposed by Assani (1999):

$$x_{t} = 0.06x_{{\left( {t - 2} \right)}} + 0.25x_{(t - 1)} + 0.38x_{\left( t \right)} + 0.25x_{(t + 1)} + 0.06x_{(t + 2)}$$
(2)

With ≤ t ≤ (n − 2), xt represents the weighted rainfall totals of t, x(t−2), x(t−1) = observed rainfall totals immediately preceding t and x(t +2), x(t+1) = the observed rainfall totals of two terms immediately following the term t.

The values of the first two terms x(1) and x(2) and last two terms x(n−1) and x(n) are determined using the following equations:

$$x_{\left( 1 \right)} = 0.54x_{\left( 1 \right)} + 0.46x_{\left( 2 \right)}$$
(3)
$$x_{\left( 2 \right)} = 0.25x_{\left( 1 \right)} + 0.50x_{\left( 2 \right)} + 0.25x_{\left( 3 \right)}$$
(4)
$$x_{{\left( {n - 1} \right)}} = 0.25x_{{\left( {n - 2} \right)}} + 0.50x_{{\left( {n - 1} \right)}} + 0.25x_{\left( n \right)}$$
(5)
$$x_{\left( n \right)} = 0.54x_{\left( n \right)} + 0.46x_{{\left( {n - 1} \right)}}$$
(6)

Test of Mann–Kendall

The test of Mann–Kendall (Mann 1945; Kendall 1975) has been used to identify the presence or absence of a linear trend in a time series. Let the series Xi (x1, x2,… xn), this test set the standard UMK (multi-variable standard) as follows (7):

$$U_{\text{MK}} = \frac{S}{{\sqrt {{\text{Var}} \left( s \right)} }}$$
(7)

with \(S = \mathop \sum \nolimits_{i = 1}^{n - 1} \mathop \sum \nolimits_{j = i + 1}^{n} \text{sgn} \left( {x_{j} - x_{i} } \right)\), \({\text{Var}} \left( s \right) = \frac{{n\left( {n - 1} \right)\left( {2n + 5} \right)}}{18}\), and n = the number of data in the series.

The trend direction is defined by the Mann–Kendall statistical coefficient “UMK”. If UMK is positive, the trend is up; but if UMK is negative, then the trend is down.

Test of Pettitt

The Pettitt (1979) test examines the existence of a break at an unknown time in the series from a formulation derived from that of the Mann–Whitney test. This test is based on the calculation of the variable Ut,T defined by the Eq. 8:

$$U_{tT} = \mathop \sum \limits_{i = 1}^{t} \mathop \sum \limits_{j = i + 1}^{T} D_{ij} ,$$
(8)

where Dij = − 1 if (xi − xj) > 0, Dij = 0 if (xi − xj) = 0, Dij = 1 if (xi − xj) > 0.

The methodology applied in this study is presented in the Fig. 2.

Fig. 2
figure 2

Flow chart of the applied methodology. P precipitations, T temperature, RI rainfall index, WRI weighted rainfall index

Results and discussion

Climatology

After a 75-year observation period, precipitation shows significant fluctuations from year to year (Fig. 3a). The weighting of the data made it possible to segment the rainfall pattern of the study area in excess, normal and deficit periods (Fig. 3b). A normal period is defined as a period when the indices are distributed in a balanced way on both sides of zero. These periods follow one another as follows:

Fig. 3
figure 3

Time series of a the annual rainfall index, b the annual rainfall index weighted, and c Pettitt test applied to the rainfall series from the station of Igrounzar and Adamna for the period 1940–2015. RI rainfall index, WRI weighted rainfall index, AP annual precipitations

For the Igrounzar station, the excess period began in 1940 (beginning of observations) and ended around 1956. Two deficit periods are separated by a normal period of 12 years (1987–1998). The first started in 1956 and faded in 1986, and the second beyond 1999.

As for the Adamna station, the same situation is observed. The excess period began in 1940 and ended in 1955. Two deficit periods are separated by a normal period of 13 years (1985–1997). The first began in 1956 and was completed in 1984, and the second beyond 1998.

Indeed, the application of the Pettitt test, with a significance level of 5%, reveals the presence of a break in the rainfall series observed at the Igrounzar station in 1956 and in 1955 for the Adamna station (Fig. 3c). This confirms the limit between the wet period and the dry period determined by the pluviometric indices method. The average annual rainfall before and after the break allowed to estimate a rainfall deficit of the order of 12.6% and 10.8% for the station Igrounzar and Adamna, respectively. The results of Mann–Kendall test are regrouped in Table 1. As the calculated p-value < 5%, this reflects the existence of a trend in the studied series. The UMK multivariate standard norm calculated is negative; this reflects a downward trend in precipitation. However, the results of the statistical tests make it possible to conclude that the precipitation presents a general tendency to fall with a deficit of the order of 11.7%.

Table 1 Mann–Kendall test results on rainfall in the Essaouira Basin from 1940 to 2015

During the period 1988–2004, the average annual temperatures at the Igrounzar station oscillate between 18 °C and 21 °C. For the Essaouira station, the average annual temperatures oscillate between 16 and 20 °C (period 1950–2016). The hottest year is 2001 for the station of Igrounzar and 2014 for the Essaouira station, with an excess of 1.62 °C and 2.3 °C above the average for the station of Igrounzar and Essaouira, respectively (Fig. 4a, b).

The results of statistical tests applied on the time series of temperatures at the station of Igrounzar and Essaouira are grouped in Table 2. The Pettitt test was applied considering a threshold of significance of 5%. A significant break in the annual average was found in 1993 and 1986 for the Igrounzar series and the Essaouira series, respectively.

Fig. 4
figure 4

Annual variation of temperature at a station of Essaouira (1950–2016) and b station of Igrounzar (1987–2004) within Essaouira Basin

Table 2 Statistical tests of Pettitt and Mann–Kendall on the temperature in the Igrounzar and Essaouira station from 1988 to 2004 and from 1950 to 2016

For the Igrounzar station, sub-series averages before and after this break are 18.08 °C and 19.63 °C, respectively, with an increase of 8.5% from 1994 to 2004. In Essaouira, the sub-series means before and after this rupture are 17.23 °C and 18.13 °C, respectively, with an increase in temperatures of 5.2% from 1986 to 2016 (Fig. 4a, b).

The Mann–Kendall test, applied at the 5% threshold, confirms the results found by the Pettitt test by highlighting an upward trend in temperature at the Igrounzar station and the Essaouira station (UMK = 3.75 for Igrounzar station and UMK = 4.71 for the Essaouira station). However, temperatures show a general upward trend with a warming of about 1.5 °C at Igrounzar station, and 0.9 °C at Essaouira station. This remains in perfect consistency with the upward trend in global temperature (GIEC 2013).

Groundwater level evolution

As the arid and semi-arid zones are characterized by scarcity, or even absent, of surface water, the aquifer regime depends on precipitation. However, fluctuations in the piezometric level are mainly due to changes in precipitation (Bahir et al. 2016; Ouhamdouch et al. 2018). For a period of 10 years, observation of the monthly evolution of the groundwater level in the Essaouira Basin was made on 6 piezometers representing 4 aquifers (Fig. 5). From Fig. 5, it can be seen that at all piezometers, the groundwater level is closely related to rainfall and shows a general downward trend.

Fig. 5
figure 5

Groundwater level evolution for the period 2006–2016 (see location on Fig. 1). GL groundwater level, P precipitation

The choice of the Plio-Quaternary aquifer for assessing the piezometric level evolution results from the fact that it is the only aquifer within the Essaouira Basin that has had the longest monitoring of the piezometric level (27 years).

The piezometric map of the Plio-Quaternary aquifer, compiled from data of the campaign of 2017, shows a global direction of flow from E–SE towards W–NW, conditioned by the straightening of its substratum following to the uprising of Triassic formations (Tidzi diapir) (Fig. 6a).

Fig. 6
figure 6

a Piezometric map of the Plio-Quaternary aquifer (April 2017), and b temporal evolution of the water table of the Plio-Quaternary aquifer

The piezometric level of groundwater in the Plio-Quaternary aquifer shows significant fluctuations between high and low water periods (Bahir et al. 2002, 2016; Ouhamdouch et al. 2018). These fluctuations are mainly related to the precipitation, which, thus, controls the aquifer regime.

A number of problems related to water scarcity and long recurring periods of drought have been noted in the Essaouira region during the last decades (Bahir et al. 2002; Chkir et al. 2008). Long periods of drought are often considered to be related to climate variability resulting from climate change.

Figure 6b shows the variation of the piezometric level in eight observation wells of the Plio-Quaternary aquifer.

All the points capturing this aquifer show a general tendency to lower piezometric levels. As for point 15/51, there is a rise due to its location in a topographic depression draining rainwater during short and intense showers that characterize our semi-arid environment. The combined effect of 1995, the driest year in Morocco during the twentieth century (Bahir et al. 2002), and overexploitation pushed by the through and the scarcity of surface water (Chkir et al. 2008) were demonstrated the drying of some wells, notably the wells: 116/51 and 117/51 (since 2004), 101/51 (since 2009), and 93/51 (since 2015) (Table 3).

Table 3 Temporal evolution of piezometric levels in four observation points from the Plio-Quaternary aquifer showed a drying process

As the study area is characterized by the absence of industrial activity, and that the population only practice the agricultural activity of the ‘‘food crops’’ type, the decline in the water table level can only be explained by the reduce in precipitations rates under the climate change effect.

Hydrogeochemistry

The Piper diagram (Piper 1944) was used for determining the chemical facies associated with each groundwater sample. The projection of the analyzed samples on this diagram (Fig. 7) shows that the groundwater of the 1990, 2009 and some of the 1995 campaigns are of the Na–Cl type. While, those of the two campaigns 2015 and 2017 are of the Ca–Cl and mixed Ca–Mg–Cl type. However, the principal ions governing groundwater are Na, Ca, Mg and Cl.

Fig. 7
figure 7

Piper diagram of analyzed samples

The problem of aquifer salinization is a global phenomenon, but it is more serious in areas of water scarcity, such as arid and semi-arid zones. The increasing demand for water and the trend of decreasing rainfall have led to enormous pressure on the water resource, which has resulted in the lowering of the water level and consequently the degradation of their quality. As the Essaouira Basin is part of the semi-arid zone, however, there is no exception to the phenomenon of groundwater salinization and consequently the degradation of their quality. Following the availability of data, only the Plio-Quaternary aquifer of the Essaouira Basin has been evaluated.

In order to have an idea of the aquifer’s groundwater quality and their temporal evolution, we based on the concentration of their salinity using the electrical conductivity and major elements over a period of 27 years (Figs. 8 and 9). From Fig. 8, it can be seen that the EC values vary between a minimum value of 800 μs/cm (2004 campaign) and a maximum value of 7500 (2017 campaign).

Fig. 8
figure 8

Spatiotemporal evolution of electrical conductivity of water of the Plio-Quaternary aquifer

Fig. 9
figure 9

Boxplots of major elements of analyzed samples

Water quality varies with precipitation. It is very poor during the dry cycle of 1995 to a modest improvement during the rainy cycle of 2004 and 2009, but this improvement did not last long since the quality became very poor thereafter (campaign 2015 and 2017).

The highest values of EC are marked at Cap Sim and at the southern part of the aquifer. This elevation could be explained by the marine intrusion and by a longer and longer stay of these waters and away from the recharge area.

While, the least mineralized waters are observed in the East and North part of the aquifer, especially near the rivers, locally named “Wadi”, representing the aquifer recharge zones.

Cl content ranged from 6.1 to 44 meq/L with an average of 19.3 meq/L for the 1990 campaign and between 4.8 and 88.5 meq/L with an average of 18.7 meq/L for the 2017 samples (Fig. 9). Ca concentration varied between 2.8 and 17 meq/L with an average of 8.4 meq/L for the samples of 1990 and from 2.2 to 18.4 meq/L with an average of 6.5 meq/L. As for Mg contents, they ranged between 0.6 and 16.4 meq/L with an average of 4.8 meq/L for the 1990 campaign and from 2.6 to 16.9 meq/L form the samples of 2017 campaign with an average of 6.4 meq/L (Fig. 9). Na concentrations varied between 7.5 and 35 meq/L with an average of 17.1 meq/L for the samples of 1990 campaign and between 3.7 and 62.2 meq/L with an average of 11 meq/L for the 2017 campaign (Fig. 9). The increase in maximum contents of these ions is observed by going from 1990 to 2017; this can be explained by the reduced precipitation rates associated with the effects of climate change as provided in climatology section. While, the other element concentrations do not have a significant variation from 1990 to 2018 (Fig. 9).

However, the degradation of the quality of the resource is due to climate change (rainfall deficit) and human pressure following the increase in demand.

Stable isotopes

The stable isotopes oxygen-18 and deuterium of the water are the most used in groundwater studies. They provide information on the origin and the recharge method of the groundwater. They also help to determine short- and long-term climate variation and to understand the physical processes that may influence groundwater, such as evaporation and isotope exchange in aquifer systems (Clark and Fritz 1997).

In the study area, the isotopic content varied between − 6.2 and − 3.7‰ for oxygen-18 and between − 38.37 and − 20.69‰ for deuterium (Fig. 10). The projection of these contents on the 18O–2H diagram (Fig. 10) shows that all the points are scattered around GMWL. This allows us to conclude that this groundwater has been recharged by local precipitation (of oceanic origin) without notable evaporation.

Fig. 10
figure 10

Correlation diagram of 18O–2H

However, the groundwater recharge in study area depends on rainfall. This confirms and supports the results obtained by the piezometric approach, and which makes the water resource in study area sensitive and vulnerable to climate change.

The study of the 18O content evolution in wells capturing the Plio-Quaternary and Turonian aquifer was made. The results are grouped in both Figs. 11 and 12. The correlation diagram 18O–2H for each point during the period 1995–2018 shows that the recharge of the Plio-Quaternary and Turonian aquifer is done without notable evaporation by precipitation of oceanic origin. Except point 272/51 representing the 2004 campaign and point 11/51 representing the 2018 campaign are located below GMWL. This situation could be explained by the fact that point 272/51 was subjected to evaporation during sampling, whereas point 11/51, located a few meters from the sea, was subjected to marine contamination as shown in Fig. 12 where the electrical conductivity is around 10,000 μs/cm and the 18O content is equal to − 1.8‰, close to that of seawater (0‰).

Fig. 11
figure 11

Correlation diagram of 18O–2H of points capturing Plio-Quaternary and Turonian aquifers from Essaouira Basin (see location on Fig. 9)

Fig. 12
figure 12

Evolution temporal of 18O content and Electrical Conductivity of points capturing Plio-Quaternary and Turonian aquifers from Essaouira Basin

Figure 12 shows the evolution of the 18O content and EC of the points capturing the Plio-Quaternary and Turonian aquifer. From this, it is noted that the increase in 18-oxygen content is accompanied by an increase in salinity. The 18O content evolution as a function of time remains almost stable. In addition, small fluctuations in 18O (1–1.5‰) levels may be due to analytical errors. As the atmospheric temperature within the Essaouira Basin has had a slight upward trend and the temporal evolution of groundwater content in oxygen-18 are slightly stable, the isotopic fractionation is insensitive to the rather small increase in temperature. Therefore, it can be concluded that climate change has no effect on the isotopic content of groundwater in the Essaouira Basin.

Conclusion

Like other Basins in coastal areas, the Essaouira Basin has not been spared by the effect of climate change, which adds to the effect of groundwater over-exploitation. This effect is manifested by (i) an upward trend in temperatures with a warming of 1.5 °C and a generalized downward trend of rainfall of 12%. (ii) A piezometric level depression during dry years and a modest recovery during the rainy years, with a general downward trend. (iii) A deterioration of groundwater quality with an increase in salinity. This degradation is due to the marine intrusion and to the decrease of the recharge rate of aquifers caused by the decrease of precipitations under the climate change effect. The isotopic approach shows that climate change has no effect on the isotopic content of the groundwater in the study area.

The complementary of hydroclimatic, piezometric, hydrochemical and isotopic approaches led to the diagnosis of the vulnerability of aquifers in the Essaouira Basin to climate change. However, the development of a rational exploitation strategy would make it possible to value its waters, while safeguarding its long-term potentialities. As well as the use of unconventional resources such as desalinated seawater for drinking water supply or treated wastewater for agriculture should be considered as a priority at present to avoid triggering a serious situation of water scarcity.