Introduction

Scarcity and quality of water resources has always been a major problem limiting the development of arid and semi-arid regions. Sustainable management of water resources is crucial to meet the needs of drinking water for future generations and requires a detailed knowledge of the processes that control the groundwater chemistry and recharge areas. For this reason, a thorough study of the chemical and stable isotopes composition of groundwater from the Agadir-Essaouira Basin has been attempted, to evaluate the hydrogeochemical processes that control their mineralization and to localize their recharge area. To determine the mechanism of mineralization of groundwater is necessary for an efficient planning of groundwater use. Previous studies have successfully used these methods in different hydrogeological contexts (e.g., Wu et al.,2009; Cartwright et al.,2012; Ettayfi et al., 2012; Lgourna et al., 2014; Ait Brahim et al.,2015), especially in sedimentary aquifers composed of carbonate and evaporite units, to determine the groundwater salinisation processes such as mineral dissolution/precipitation and ion exchange(e.g., Back et al.,1979; Pacheco and Szocs,2006; Moral et al., 2008; Sadek,2012; Martos-Rosillo and Moral,2015).

The inhabitants of the semi-arid Agadir-Essaouira Basin suffer from insufficient access to freshwater, amplified by recurrent long drought periods (1980–1985, 1990–1995, and 1998–2000). Surface water contributes to a little extent to satisfy drinking water needs. In these circumstances and in the absence of surface water supplies, the population depends on groundwater resources for drinking, domestic and agricultural purposes. Jurassic and Cretaceous sediments are the main aquifers of this mountainous system. These aquifers are made of sedimentary deposits, mainly karstic limestone and marls with sandstone and limestone interbeds. Investigating the functioning of these aquifers is made difficult due to the rough relief and complex geological structures. Several exploratory boreholes and wells (about 260) have been drilled in the basin aiming to investigate the hydro-potential of these units and to satisfy the drinking water needs of the most important rural villages of the region. The region has more than 300 karstic springs, but most of them are not systematically monitored due to rocky terrain and difficult accesses. Hence, chemical and isotope analyses were performed on groundwater (springs and wells) and surface water samples, collected during several field trips between February 2014 and April 2015. This study aims at (i) investigating the processes controlling the groundwater quality of the Agadir-Essaouira area and (ii) refining the groundwater recharge processes.

Study area

Geographic setting

The Agadir-Essaouira Basin (AEB) is located within the Western High Atlas in the southwestern part of Morocco between 31° 10′ N and 30° 30′ N and covers an area of 3072 km2. This area is a semi-arid region with very high potential of evapo-transpiration (more than 920 mm/yr) and annual rainfalls less than 300 mm/yr. The region shows strong relief with elevations decreasing westward from 3200 to 100 m (Fig. 1). The whole study area is drained by two main rivers (locally called “Oued”): Tamraght and Tamri, as well as by several tributaries. The average rainfall (250–300 mm/year) remains low and very irregular.

Fig. 1
figure 1

Location map of Agadir-Essaouira Basin showing sampling locations and elevations based on a digital elevation model (DEM)

Geological setting

The Western High Atlas consists of Cretaceous and Jurassic lithologic units characterized by deep valleys. In most of the area, the Jurassic limestone units (1000 m) are overlain by Cretaceous marls interbedded by sandstone and limestone layers (2000 m), while Triassic deposits are restricted to the East (Fig. 2a). Quaternary sediments are locally observed. According to Ambroggi (1963), Behrens and Siehl (1982) and Zühlke et al. (2004), the Jurassic and Cretaceous series of the AEB can be summarized as follows:

  • Upper Permian—Lias: conglomerates, sandstones, and clays (300 to1200 m).

  • Jurassic: Thick sequence of carbonates and evaporites. The Lower Jurassic is characterized by sandstones, gypsum-bearing red clays, and dolomitic limestone (400 m). The Middle Jurassic corresponds to red clastic units capped by dolomitic limestone and calcareous clays (400 m). The Jurassic sequence ends up with gypsiferous marl and dolomitic limestone (440 m).

  • Cretaceous: The Lower Cretaceous units are marked by marly facies at the base, overlain by calcareous marl (200 m). Sandstone with marl is then overlain by calcareous marl and clay (200 m). The Upper Cretaceous units are rich in gypsum and marl interbedded with limestone or sandstone layers (400 m). Latest Cretaceous period are characterized by marl intercalated with limestone and sandstone beds (200 m), and by gypsiferous marl (150 m). The Cretaceous succession ends up with siliceous marl (150 m).

Fig. 2
figure 2

a Geological map (extracted from the geological map of Marrakech 1/500000 (Choubert (1957)). b 3D model of the basin showing its morphology and the structural zones

Regarding the structural geology of the southern part of the AEB, Fig. 2b shows three main structures: the Axial zone, where Jurassic limestone crop out, and the Northern and Southern Sub-Atlasian zones, marked by lower elevations and widespread Cretaceous outcrops. The study area shows several ENE–WSW-trending anticlines and synclines separated by faults or flexures. The anticlines are partially eroded and culminate at 1500 m. The synclines are slightly affected by erosion and present structural surfaces made of carbonates (e.g., Medina et al., 2011). These ENE–WSW-trending structures control the water drainage from the surface to the deep aquifers of the western High Atlas.

Hydrogeological characteristics

The availability of groundwater in the AEB varies widely due to the geologic complexity of the area. Field trip investigations and geological studies suggest that the AEB has a medium hydrological potential, groundwater being stored in the karstic aquifers of the Jurassic units and in the fissured or porous reservoirs of the Cretaceous deposits.The Jurassic karstic limestone are the main aquifer of the Western High Atlas consisting of an extensive network of interconnected fractures that lead the waters from the top of the mountains/karstic plateau down to the springs. Three potential aquifers can be distinguished: (1) The Upper Liassic limestone present a good aquifer with K-values ranging from 10−3 to 10−5 m/s; (2) the Late Oxfordian-Early Kimmeridgian (« Rauracian-Sequanian ») limestone, within which the Win-Timdouine karst network is developed (Tasroukht plateau) with K-value ranging from 10−3 to 10−5 m/s; and (3) the Upper Kimmeridgian dominantly calcareous series with K-value ranging from 10−8 m/s in the marl to 10−4 m/s in the limestone beds. The Cretaceous groundwater resources are located in local or discontinuous aquifers within porous sandstone and slightly fractured limestone units, with limited water potential. Some small springs were identified. The hydraulic conductivity ranges from 10−4 to 10−2 m/s.

Sampling and analytical methods

Sampling campaigns in the AEB took place in February, March, and October 2014, and in March and April 2015. Eighty-four water samples were collected: 43 groundwater samples from the Jurassic aquifer, 34 from the Cretaceous aquifer and 7 from surface water (Fig. 2). Physico-chemical parameters of water samples, including temperature, pH and electrical conductivity, were measured in the field. Bicarbonates (HCO3 ) were also measured in situ using titration with sulfuric acid (0.2 N).

All water samples were collected, filtered with 0.45 μm, preserved and shipped to the Steinmann Institute of the University of Bonn for chemical analysis. Major cations (Ca2+, K+, Na+, Mg2+) were determined using a graphite technique of atom absorption spectroscopy (Analyst 700, Perkin Elmer), while major anions (Cl, SO4 2−, NO3 ) were measured by ion chromatography (Shimadzu HIC-6A. Shimadzu). Trace element analyses (Sr2+) were performed by Photometry (Cadas 100n Dr. Lange).

Stable isotope measurements of δ2H and δ18O were performed according to IAEA standards (IAEA-ILS) by cavity ring down spectrometry using a Picarro L2120 in the Laboratory of Applied Geology and Geo-Environment at the Ibn Zohr University in Agadir, Morocco. The results are presented in the standard notation delta per mil (δ‰). Typical precision analysis is ±0.1‰ and ±1.5‰ for δ18O and δ2H, respectively.

Moreover, rocks samples were submitted to a geochemical analysis using X-ray diffractometry (XRD) to identify their mineralogical composition, and to X-ray fluorescence spectroscopy (XRF) to determine their mineral content.

Results

The results of all the analyses performed on water and rock samples are presented in Tables 1 and 2. Four types of water samples are distinguished: (i) surface water collected from rivers Tamraght and Tamri, (ii) groundwater samples collected in the eastern part of the basin within the carbonate Jurassic aquifers, (iii) groundwater samples collected in the northern part of the basin within the lower Cretaceous units, and (iv) groundwater collected in the southern part of the basin within Lower and Upper Cretaceous units.

Table 1 Mineralogical composition of rocks samples within Jurassic and Cretaceous units of Agadir-Essaouira Basin
Table 2 Physicochemical measurements, major ions and stable isotope analysis of groundwater and surface water samples from Agadir-Essaouira basin

Mineralogical composition of rocks

Groundwater chemistry largely depends on the mineral composition of the aquifer through which it flows (e.g., Hem, 1985). In the study area, carbonate rocks (limestone, dolomitic rocks) are the dominant type of rocks (Zühlke et al., 2004). Therefore, in order to estimate the amount of dolomite and limestone in the Jurassic and Cretaceous units, the Ca/Mg ratio is calculated for rock samples (Table 1). According to the classification by Boulvain (2010):

  • 0 < Ca/Mg <1.5: magnesian dolomite;

  • 1.5 < Ca/Mg ≤2: dolomite;

  • 2 < Ca/Mg ≤3.5: calcareous dolomite

  • 3.5 < Ca/Mg ≤15: dolomitic limestone

  • 15 < Ca/Mg ≤60: very dolomitic limestone

  • Ca/Mg >60: limestone

Our results show that dolomitic limestone and very dolomitic limestone represent 42 and 50%, respectively, of carbonate rocks in the Jurassic units. Cretaceous units consist of 40% of magnesian dolomite, 40% of calcareous dolomite, and 20% of very dolomitic limestone. Dolomite can be formed through the alteration of carbonate sediments by groundwater processes (Hanshaw and Back, 1985).These reactions have significant consequences on the chemical composition of groundwater.

Sandstone of the Cretaceous units contains carbonate as cement crystallized within the pores between grains. This cement can be in turn dissolved, which may result in increasing calcium and bicarbonate ions in groundwater (Hem, 1985).

Minor components are gypsum bearing layers, representing37% in the Jurassic units and only 22% in the Cretaceous terrains, which may yield sulfate ions in groundwater.

pH, EC, and temperature

Water temperatures range from 14 to 28 °C in groundwater with an average of 22 °C, and from 18 to 36 °C in surface water with an average of 23 °C. The average pH is 7.4 and 8.1 in groundwater and surface water, respectively. The specific electrical conductivity EC varies in groundwater from 401 to 6277 μS/cm, with an average value of 1485 μS/cm. The EC in surface water varies from 1075 to 2410 μS/cm. The total dissolved solid (TDS) values are ranging between 270 and 4394 mg/L, with an average of 999 mg/L. Surface water samples from the main rivers (Tamraght and Tamri) show low TDS values ranging from 720 to 1014 mg/L in the upstream sections of Tamri and Tamraght, respectively, and between 1030 and 1197 mg/l in the downstream sections.

Major ions

As a whole, the abundance of major cations decreases in the following order: Ca2+ > Mg2+ > Na+. Ca2+ concentrations range from 53 to 522 mg/L, with an average of 174 mg/L in the Cretaceous aquifers, and from 45 to 561 mg/L in the Jurassic aquifers, with an average of 152 mg/L, accounting for 51 and 90% of the total cations in the Cretaceous and Jurassic aquifers, respectively. Mg2+ values range between 17 and 254 mg/L, with an average of 104 mg/L in the Cretaceous aquifers, and between 24 and 171 mg/L, with an average of 63 mg/L in Jurassic aquifers, accounting for 39 and 10% of the total cations in the Cretaceous and Jurassic aquifers, respectively.

The concentration of anions decreases as follows: SO4 2− > HCO3  > Cl. SO4 2 concentrations range from 12 to 1272 mg/L with an average of 386 mg/L in the Cretaceous aquifers, and from 9 to 1561 mg/L with an average of 343 mg/L in the Jurassic aquifers, accounting for 51 and 49% of the total anions in the Cretaceous and Jurassic samples, respectively. HCO3 varies from 111 to 1134 mg/L with an average of 372 mg/L in groundwater of the Cretaceous aquifers, and from 128 to 675 mg/L in the Jurassic aquifers with an average of 340 mg/L, accounting for 42% and 51% of the total anion in the Cretaceous and Jurassic aquifers, respectively. Cl concentrations range from 27 to 2072 mg/L with an average of 304 mg/L in the Cretaceous aquifers, accounting for 27% of the total anions, and from 7 to 142 mg/L with an average of 38 mg/L in Jurassic aquifers, accounting for 3% of the total anions. In some wells, located close to human agglomerations, we measured values of NO3 higher than the Moroccan drinking water standards (50 mg/L), based on the World Health Organization (WHO 2011) standards.

The dominant cation in surface water is Mg2+ with concentration ranging from 10 to 69 mg/L with an average of 61 mg/L, accounting 75% of total cations. SO4 2+is the most abundant anion with concentration ranging from 165 to 1822 mg/L with an average of 694 mg/L, accounting 95% of total cations.

The correlation matrix (Fig. 3) shows the correlations between the different chemical constituents in groundwater and surface water. The results show good correlations between TDS (mg/l) and Ca2+ (R 2 = 0.7), Mg2+ (R 2 = 0.8), Na+ (R 2 = 0.7), and Cl (R 2 = 0.8) for the Cretaceous aquifers, which suggest that these elements largely control the mineralization of the water. Groundwater salinity in the Jurassic aquifer seems to be controlled by SO4 2− (R 2 = 0.8), Mg2+ (R 2 = 0.7), and Ca2+ (R 2 = 0.8). The chemical composition of surface water is best correlated with Mg2+ (R 2 = 0.8), SO4 2− (R 2 = 0.9), Ca2+ (R 2 = 0.9), and NO3 (R 2 = 0.8).

Fig. 3
figure 3

Chemical ions and TDS correlation matrix of groundwater and surface water within Agadir-Essaouira Basin

Chemical water types

The plot of samples in the Piper diagram (Fig. 4) shows three water types of groundwater in AEB: (i) Ca-Mg-SO4; (ii) Ca-Mg-HCO3, and (iii) Ca-Mg-Cl. The groundwater from the Jurassic limestone units are dominated by Ca-Mg-SO4 and Ca-Mg-HCO3 water types, with abundances of 50 and 47%, respectively. Groundwater from the Cretaceous units shows high variations due to the variable lithological facies. In the northern part of the EAB, groundwater samples from Lower Cretaceous units are dominated by Ca-Mg-SO4 and Ca-Mg-Cl water types, with abundances of 53 and 40%, respectively. Only the water sample collected in a deep aquifer located in Hauterivian (lower Cretaceous) marls and clays associated to limestones shows Na-Cl water type and relatively high TDS of 3 g/L. In the southern part of the EAB, samples collected in Cretaceous units are also dominated by Ca-Mg-SO4 and Ca-Mg-HCO3 water types, with abundances of 70 and 30%, respectively. Another Na-Cl water type collected from Triassic red clays shows the highest TDS value of 22 g/L. The surface water from rivers Tamraght and Tamri belong to Mg-SO4 and Ca-SO4 types.

Fig. 4
figure 4

Piper diagram showing the major ion water types of all water samples

Stable isotopes

The stable isotopes compositions of groundwater in the Western High Atlas Mountains are presented in Table 2. δ18O and δ2H values are used to determine the conditions of aquifer recharge (e.g. evaporation, recharge altitude; Edmunds, 2009; Currell et al., 2010; Cartwright et al., 2012; N’da et al., 2016). δ18O and δ2H values range from −6.2 to −4.3‰ and −41.06 to −29.90‰, respectively, in the Cretaceous aquifers of the northern zone, from −4.9 to −3.8‰ and −29.48 to −23.99‰, respectively, in the Cretaceous aquifers of the southern zone, and from −6.9 to −4.8‰ and −47.09 to −25.79‰, respectively in the Jurassic, aquifers. These results show a clear difference between groundwater samples from Jurassic and Cretaceous aquifers.

Discussion

Gibbs (1970) illustrated the mechanisms controlling groundwater chemistry, distinguishing rock weathering dominance, evaporation and precipitation dominance. Our samples plotted in this diagram (Fig.5) show that most indicate rock weathering as the main controlling process for groundwater chemistry. Only groundwater samples from Cretaceous units seem to be affected by evaporation.

Fig. 5
figure 5

Gibbs’s diagram with all water samples representing the ratio of a Na/(Na + Ca) as a function of TDS

Ion ratios are used to further assess the different weathering processes (Griffioen, 2004). The relationship between (Ca2+ + Mg2+) and (HCO3  + SO4 2−) reveals that most samples plot close to the carbonate (calcite and dolomite) and gypsum dissolution line (Fig.6a).

Fig. 6
figure 6

a, b, c, d, e Relationship of main ions (Ca2+, Mg2+, HCO3 , SO4 2− and Sr2+) with each other for groundwater and surface water in the study area. f (Na+ + K+) versus Cl

Dissolution of carbonates

The molar concentration of Ca2+ versus HCO3 in water should fall around the 1:1 trend line for the calcite dissolution and around 2:1 trend line for dolomite dissolution (Tjasa et al., 2014). Our results show that most of the samples have an excess of Ca2+ with respect to HCO3 (Fig. 6b), suggesting that calcite dissolution is not the dominant reaction in this case. This result is confirmed by the poor correlation between Ca2+ and HCO3 (R2 = 0.11 in the Cretaceous aquifers; R2 = 0.17 in the Jurassic aquifers; Fig.3). Taking into account the mineralogical composition of rocks within the Jurassic and Cretaceous aquifers, dolomite (CaMg(CO 3)2) dissolution may be responsible for the increase of dissolved ions (Ca2+ + Mg2+) in the system.

Ca2+ concentration in water may come from the dissolution of both dolomite and gypsum. To calculate the Ca2+ concentration derived from the dissolution of dolomite, the contribution of gypsum must be subtracted from the total Ca2+ concentration. Indeed, calcium concentration derived from gypsum dissolution reaction is also equal to the sulfate concentration following this reaction:

$$ {Ca SO}_4\to {Ca}^{2+}+{SO_4}^{2-} $$

Hence, (Ca2+ − SO4 2−) plot against HCO3 along the trend line (1:4) representing the dolomite dissolution (Fig. 6c) according to these reactions (Herman and White, 1985; Raines and Dewers, 1997):

$$ \begin{array}{l}{ Ca CO}_3+{H}_2 O+{CO}_2={Ca}^{2+}+2{{ H CO}_3}^{-}\\ {}{(CaMg)}_2{CO}_3+2{H}_2 O+2{CO}_2={Ca}^{2+}+{Mg}^{2+}+4{{ H CO}_3}^{-}\end{array} $$

Groundwater samples from Jurassic aquifers, as well as surface water samples, plot close the 1:4 line, showing the dominance of dolomite dissolution with respect to gypsum weathering. Samples from Cretaceous aquifers from the northern zone, plot between the two trend-lines, suggesting that Ca2+ comes from the dissolution of both limestone and dolomite.

Dissolution of gypsum

In basins not dominated by agriculture, such as the AEB, sulfate mainly derives from the dissolution of gypsum (CaSO4, 2H2O) or anhydrite (CaSO4) (Wang et al., 2006). In the study area, gypsum layers mainly occur within the Jurassic units. Consistently, groundwater from the Jurassic aquifer shows a good correlation between SO4 2− and TDS (R2 = 0.8). The enrichment in SO4 2− in groundwater from Jurassic aquifers would thus result from a relatively prolonged contact with evaporites. In contrast, SO4 2− enrichment is much less pronounced (R 2 = 0.3) in groundwater from the Cretaceous aquifers, since these units contain much less gypsum.

Samples plotted in diagram (Ca2+- SO4 2−) versus SO4 2+ (Fig. 6d) show the significant contribution of gypsum in Jurassic groundwater and surface water. In addition, the diagram strontium (Sr2+) versus SO4 2− confirms the origin of sulfate through evaporite dissolution (Fig. 6e). Meybeck (1986) explains that the concentration of Sr2+ is very high in waters draining evaporites. The higher concentration of strontium would result from the dissolution of celestine (SrSO4) often associated with gypsum in evaporate deposits (Tekin, 2001).

On the other hand, Lucria (1961) emphasized the replacement of gypsum by calcite as an important process in the alteration of evaporite minerals in contact with limestone. In fact, the presence of dissolved calcite (CaCO3) affects the dissolution rate of gypsum, and the water tends to be oversaturated with calcite and undersaturated with gypsum. This is confirmed by the saturation index (SI) (Fig.9).

Dedolomitization

Dedolomitization is one of the major processes that control the chemical character of water in carbonate aquifers containing gypsum, as a result of dolomite dissolution and calcite precipitation, often driven by gypsum dissolution (Wu et al., 2009). In fact, (Back et al., 1983) explains that in carbonate aquifers containing gypsum, the water will be saturated or supersaturated with calcite due to gypsum dissolution that increases calcium ions concentration. The continuous addition of calcium derived from gypsum dissolution leads to the precipitation of calcite, which removes carbonate from the solution, thereby causing further dissolution of dolomite.

To demonstrate this process, we used the Mg2+/Ca2+ ratio because dolomite is preferentially dissolved when interacting with groundwater with low Mg2+/Ca2+ ratio (MittermayrF et al., 2013). If Mg2+/Ca2+ = 1, the water is in equilibrium with both dolomite and calcite (Hanshaw et al., 1971), whereas if Mg2+/Ca2+ < 1, dedolomitization becomes thermodynamically induced. If gypsum dissolution is active, it provides an abundant supply of calcium cations, thus maintaining a low Mg2+/Ca2+ratio in water. As most samples have Mg2+/Ca2+ < 1 (Tab.2), the dedolomitization process may also occur in both aquifers and surface water.

Silicates weathering

According to Meybeck (1987), Na+ and K+ in water are mainly derived from the weathering of alkaline silicates such as clay minerals. The (Na++ K+) versus Cl diagram is an excellent indicator of this reaction (Fig. 6f). Our samples plotted in this diagram show that water from Cretaceous aquifers is close to the dissolution line. Since Lower Cretaceous units are largely composed of marl, in particular in the northern zone, this confirms that the clay weathering accounts for the increased concentration of Na+ and K+ in water from this aquifer.

On the other hand, Gaillard et al. (1999) have pointed to silicate weathering in a reservoir draining carbonates, silicates and evaporites, and defined mixing diagrams using the ratios Ca2+/Na+ versus Mg2+/Na+, and Ca2+/Na+ versus HCO3 /Na+ in a log–log space. In fact, water draining carbonates have Ca2+/Na+ ratios close to 50, Mg2+/Na+ ratios close to 10, and HCO3 /Na+ ratios close to 120. Conversely, lower ratios are expected in water draining silicates due to the higher solubility of Na+ relative to Ca2+. The plot of samples in these diagrams indicates that silicate weathering is significant in most samples from Cretaceous aquifers, supporting the previous assumption Fig. 7.

Fig. 7
figure 7

Mixing diagram relating carbonates, silicate and evaporates in water samples

Ion exchange

Naus et al. (2001) demonstrated that ions exchange reactions are one of the important reactions occurring during the surface contact between the groundwater and base exchanger, generally clay, whereby sodium is released to the water in exchange for calcium or magnesium. The higher ratio of Na+/Cl (average = 1.82) (Tab.2) can be attributed to this process. Cation exchange is traditionally represented by this reaction:

$$ \begin{array}{l}2{Na}^{+}+{Ca}^{2+}- EXCH={Ca}^{2+}+2{Na}^{+}- EXCH\\ {} EXCH:\mathrm{base}\ \mathrm{exchanger}\end{array} $$

Base Exchange Index (BEI) is used to expresses cation exchanges within an aquifer. This index is used to indicate salinized or freshened water. The ratio [Cl - (Na+ + K+) / Cl] was used by Schoeller (1934) to calculate BEI. Negative values indicate salinized water (fixation of Ca2+ and Mg2+ and solubilization of Na+ and K+). Positive value indicates freshened water (solubilization of Ca2+ and Mg2+ and fixation of Na+ and K+).

The results show that 56% of Cretaceous aquifers samples present a negative BEI value, thus characterizing salinized water and confirming the significant contribution of silicate alteration to the enrichment in Na+ in groundwater from the Cretaceous aquifers. BEI is positive for 58% of Jurassic aquifers samples, revealing freshened water.

Evaporation

Besides ions exchange reaction, evaporation may also influence water chemistry, since the AEB experiences dry and semi-arid climatic conditions. As the Gibbs’s diagram illustrates, samples from Cretaceous aquifers seem to be affected by evaporation. To disclose this effect, the Na+/Cl ratio is used to point out evaporation process in groundwater. If evaporation is the dominant process, the Na+/Cl ratio should remains table when the electrical conductivity rises (Jankowski and Acworth, 1997). The diagram EC versus Na+/Cl (Fig.8) shows that the Na+/Cl ratio changes with increasing conductivity, which means that ion exchange reactions dominate over evaporation.

Fig. 8
figure 8

EC versus Na+/Cl in the groundwater and surface water of the study area

Saturation index (SI)

Most groundwater samples are either in equilibrium or oversaturated with calcite and dolomite (Fig.9). The oversaturation indicates that precipitation of calcium carbonate may occur. About 11 and 30% of samples are undersaturated with dolomite and calcite, respectively (negative SI). This means that samples have not reached equilibrium with carbonates, probably because of short residence time in calcareous lithologies. On the other hand, most groundwater and surface water samples are undersaturated with gypsum. These results confirm the previous interpretations: carbonate mineral tends to be precipitated by groundwater, while gypsum dissolution is limited by the presence of calcite consequently tends to be undersaturated in groundwater.

Fig. 9
figure 9

Saturation index for calcite, dolomite, gypsum, and halite. The plots show different trends for each mineral as calculated for different samples from the Agadir-Essaouira Basin

Stable isotopes

In global precipitation, the δ2H and δ18O concentrations obey a linear relation represented by the global meteoric water line (GMWL): δ2H = 8 δ18O + 10 ‰ SMOW, defined by Craig (1961). The Local Meteoric Line (LMWL) is compared to: δ2H = 8 δ18O + 13 ‰ SMOW, defined by Ouda et al. (2004).

The δ18O versus δ2H diagram shows a clear difference between groundwater samples from Jurassic and Cretaceous aquifers (Fig.10a). Representative groundwater samples from Jurassic units form one group close to the GMWL, and the LMWL indicates a direct infiltration of precipitation into the Jurassic karstic aquifer with no evaporation effect, except for sample “FS14-15” that plots slightly below the LWML. The depleted values of δ18O and δ2H reflect the high recharge altitude, since temperature decreases with altitude, which results in a precipitation with heavier isotopes: δ18O and δ2H.

Fig. 10
figure 10

a Variation of δ2H and δ18O values of groundwater compared to the Local Meteoric Water Line (LMWL; Ouda et al. 2004) and global meteoric water line (GMWL; Craig 1961). b Relationship between δ18O in groundwater samples and their recharge elevations according to the altitude gradient of Bouchaou (1995)

Cretaceous groundwater samples plot below the GMWL and slightly below the LWML, suggesting that an evaporation process affects the recharge of Cretaceous groundwater (involving slight enrichment in δ18O and δ2H). According to Kendall and McDonnell (1998), the resultant slopes of water undergoing evaporation are less than 8 and commonly between 4 and 7 in the δ2H-δ18O diagram. In this case, groundwater samples from Cretaceous aquifers of the northern zone define two groups: (i) the group defining an evaporation line with slope of 2.5 showing highest values of δ18O and δ2H, and (ii) the group with a slope of 3.5 and negative values of δ18O. On the other hand, the samples from Cretaceous aquifers of the southern zone define an evaporation line with a slope of 3.4 and positive value of δ18O and δ2H.

Furthermore, the changes of stables isotopes with altitude can define the recharge zone of aquifers and especially in high topography regions (case of the AEB). The average altitude of recharge area of groundwater samples can be determined by placing its average isotopic composition on a regional correlation line between stable isotopes and altitude. The recharge altitudes in the Western High Atlas aquifers were defined by adopting a local altitude gradient equation (δ18O ‰ = −0.0027 * Altitude −3) calculated by Bouchaou (1995). The projection of different points on the line allows determining the mean elevation effect of different aquifers (Fig.10b). The δ18O signal indicates a local groundwater recharge of both aquifers. Recharge altitudes for the Jurassic aquifer range from 800 to 1500 m. According to Stichler and Schotterer (2000), the recharge of meteoric waters originated from high altitudes is associated with relatively low values of both δ2H and δ18O. Therefore, the sample FS14-15, which has the lowest stable isotope ratios in the Jurassic aquifer, presents the highest altitude recharge (1500 m). In the same way, for the Cretaceous aquifer, there charge altitude is between 400 and 600 m in the southern part, while the recharge of groundwater from the northern zone seems to be from higher altitudes, estimated from 400 m to 1200 m.

Conclusion

Our results reveal that groundwater shows a wide variability of mineralization mainly attributed to the lithology variation in the region. Rock samples from Jurassic aquifer are dominated by dolomitic and very dolomitic limestones. Cretaceous units are made of dolomite and calcareous dolomite. The alkaline earth (Ca2+ + Mg2+) and SO4 2− are the dominant ions, followed by HCO3 and Cl. Consequently, Ca-Mg-SO4, Ca-Mg-HCO3 and Ca-Mg-Cl are the dominant hydrochemical water types in the area. This water type is related to water/rock interactions, including dissolution of carbonate and evaporitic rocks (limestone, dolomite; gypsum) and cation exchange process with clay minerals.

Saturation index (SI) indicates that dissolution of gypsum seems to control the water chemistry in the study area and that the groundwater has an overall tendency to precipitate carbonate minerals.

The isotopic analyses reveal an evaporation process affecting the recharge runoff of the Cretaceous aquifer, while there is a direct infiltration of precipitation in the Jurassic karstic aquifer. The low values of δ18O and δ2H suggest that the recharge occurs in high reliefs. The δ18O signature also indicates a local groundwater recharge from areas with altitudes between 800 and 1500 m for the Jurassic aquifer, and between 400 and 1200 m for the Cretaceous aquifer. These results will be useful for planners and policymakers to improve sustainable management of water resources and to elaborate strategies to solve similar problems elsewhere.