Introduction

Water is one of the most essential elements for human survival and development (Amirsha et al. 2020; Bahir et al. 2018a, b; Carreira et al. 2018; Hamed et al. 2018). One of the most effective ways to determine the quality of groundwater is to analyze the geochemical properties of groundwater, as groundwater quality can be altered by the growth of land use, mining, climate change or by natural chemical weathering as it flows underground (Bahir et al. 2019, 2021a; Bahir and Ouhamdouch 2020; El Mountassir et al. 2020), Interacts with rocks and soil layers (Maples et al. 2019; Merkel 2005), it normally contributes to higher levels of dissolved solids (Batabyal and Chakraborty 2015). In addition, groundwater is also the main source of fresh water used worldwide for the provision of drinking, domestic, agricultural, industrial, and ecological water. Protecting the quality of groundwater is, therefore, a growing problem around the world (Vasanthavigar et al. 2010; Wagh et al. 2019).

Drinking water quality is a relative term that relates the composition of water first and second to the effects of natural processes and human activities (El Mountassir et al. 2021a, b). The degradation of the quality of drinking water results from the introduction of chemical compounds through leaks and cross-links in the water supply system (El Mountassir et al. 2020; Napacho and Manyele 2010). The parameters of water quality are divided into three groups, namely chemical, biological and physical factors. Dissolution ions and other substances are also measured, while physical parameters can include color, odor, turbidity, taste, and temperature, and coliform bacteria can provide an indication of suitability for the drinking water quality (Batabyal and Chakraborty 2015).

It is useful to associate the measured concentrations of the parameters with different water quality criteria used around the world, such as World Health Organization standards (WHO 2011), to determine suitability for various uses. The Water Quality Index (WQI) helps identify the quality of groundwater in addition to reporting individual parameters and communicating suitability for defined purposes to those responsible for decision making (Amirsha et al. 2020; Appelo and Postma 2005; Wagh et al. 2019).

Geochemical data can be seen graphically using Piper diagrams to better explain processes that have contributed to groundwater composition, such as chemical weathering (Tiwari et al. 2018). The relative proportion of cations and anions is shown in piper diagrams and can be used to infer mineral sources of dissolved solids present in groundwater (Appelo and Postma 2005). It is undoubtedly true that there is a close link between the quality of water and the composition of geological materials in areas of groundwater recharge (Kalaivanan et al. 2018; Singh et al. 2013). When water recharges an aquifer, some rocks and other geological materials tend to weather quickly, and the mineral contents of these materials are controlled by the elements present in these rocks (Hamed et al. 2014). Since mineral solubility is variable, some react more quickly than others to impart dissolved components to the water, such as gypsum, halite and fluorite (Appelo and Postma 2005; Maples et al. 2019; Merkel 2005).

Coastal aquifers, especially shallow aquifers, are frequently exposed to seawater intrusion. Mixing of seawater is not the main cause of deterioration of water resources; high salinity can also be caused by evaporated mineral dissolution (halite, gypsum and anhydrite), agricultural and industrial activity, evaporation phenomena and climate change (Bahir et al. 2018a, b, 2021b).

The structure, status, and processes of the groundwater system, which can only be acquired through scientific research efforts, are critical aspects of water resource management. In this regard, hydrogeochemical data as well as stable and radioactive isotope data provide essential tools in support of water resources management (Barbieri 2019a; b; Barbieri et al. 2020; Ricolfi et al. 2020).

The objective of this article was to investigate groundwater quality of the coastal zone within Essaouira basin (Morocco) on the basis of 28 groundwater samples collected from the Plio-Quaternary, in 2019. To achieve this objective, the geochemical properties and processes that control groundwater quality of these aquifer were determined, the Water Quality Index (WQI) and the geographical distribution of groundwater quality has been mapped on the basis of statistical and GIS tools. The isotopic signatures (δ18O and δ2H) of the groundwaters were also determined to assess recharge zone. The WQI can be used by the local decision makers to manage the groundwater resources, and identification source of nitrate pollution in the coastal zone of Essaouira basin, especially the Plio-Quaternary aquifer.

The study area

The studied aquifer system the Plio-Quaternary alluvial aquifer of Essaouira basin which is part of the semi-arid climate of Morocco with an average rain-fall of 300 mm per year, and a mean temperature of 20 °C (El Mountassir et al. 2020; Ouhamdouch and Bahir 2017).

The natural flow path of the system is SE to NW (Bahir et al. 2000, 2007). This aquifer is limited to the north by Ksob wadi, to the south by Tidzi wadi where the Cretaceous lands outcrop, to the east by the diapir Tidzi to the Triassic heart, and to the west by the Atlantic Ocean, and extends over an area of 300 km2 (Fig. 1).

Fig. 1
figure 1

Study area of synclinal Essaouira basin

The Plio-Quaternary aquifer is represented by a marine or dune calcareous sandstone matrix with a primary hydraulic conductivity by porosity (3.2 × 10–2 m/s) and a variant thickness of 5–60 m, its substratum is formed by the Senonian marls (Bahir et al. 2000, 2007). Its thickness varies between 5 and 60 m and Senonian gypsiferous and siliceous marls represent its substratum with a thickness that reaches 200 m in places (Bahir et al. 2000). From a hydrogeological point of view, this shallow aquifer has permeability ranging from 0.27 to 132 m/d and transmissivity varies between 4.5 × 10–5 to 6.02 × 10–2 m2/s (Mennani 2001). The highest values are found near of Wadi Ksob, which serves as the aquifer recharge area, in the northern part of the study area.

Materials and methods

Sampling and analysis

In this study, a total of 28 water samples were collected from wells and river during March 2019 (Table 1). The depth of sampling wells was ranged from 4 m at the point S12 and 84 m at the point S7. Dry and clean polyethylene plastic bottles were used for sampling. Before collecting, all sampling bottles were cleaned 3–5 times with sample water. After sampling, all sample bottles were filled up with sample water to avoid exchange with CO2 in air bubbles and water vapor and sealed with parafilm to avoid leakage. The choice of water points was made according to several factors, including accessibility, position and geographical distribution. Temperature, pH, electrical conductivity (EC) and TDS were measured in situ with a portable multiparameter HI 9828. The depth of the water level was measured using a sound piezometric probe of 200 m length. All samples were refrigerated and sent to the laboratory as soon as possible for further water quality analysis.

Table 1 Physico-chemical parameters of the analyzed samples

Concentrations of Cl were determined by Mohr titration, and of SO4 by the nephelometric method (Rodier et al. 2009). Concentrations of HCO3 and CO3 were determined by titration, using 0.1 N HCl. Concentrations of Mg were obtained from total hardness and Ca by following the complexometry (EDTA) method (Rodier et al. 2009) in the Laboratory of Geosciences and Environment at ‘Ecole Normale Superieure’ of Marrakech (Cadi Ayyad University, Marrakech, Morocco). Concentrations of Na and K were analyzed by flame spectrometry at the University Center for Analysis, Technology Transfer & Incubation Expertise (UCA2TIE) of the Faculty of Sciences Ibn Tofail in Kenitra. In this study, the charge balance of most water samples was less than 10%.

Spatial interpolation technique inverse distance weighted (IDW) has been used to estimate the spatial distribution of the groundwater parameters.

Water quality assessment

Water quality index (WQI) is an efficient tool in evaluating water quality for drinking purposes and water resources management (Brown et al; 1970; Bouteraa et al. 2019; Singh et al. 2013), which was first developed by Horton in the 1960s. It is a quality evaluation criterion dependent on the assessment of various chemical elements, representing the effects of different chemical parameters on the overall quality of drinking water (Brown et al; 1970; Bouteraa et al. 2019; Singh et al. 2013).

Water quality index was calculated according to the following equation (Eq. 1) in two steps:

$$WQI = \frac{{\sum\nolimits_{i = 1}^{n} {(W_{i} \times Q_{i} )} }}{{W_{i} }}$$
(1)

Step 1: Each parameter analyzed in the water samples is assigned a relative weight (Wi) (Table 2). The unit weights of each of the 11 physico-chemical parameters were allocated using the formula (2) for this study:

$$W_{i} = \frac{K}{{S_{i} }}$$
(2)

K is the constant of proportionality determined using Eq. 3, Si is the permissible normal value of the water quality parameter of WHO

$$k = \frac{1}{{\sum {(1/S_{i} = 1,2,,,i)} }}$$
(3)
Table 2 Weight and relative weight of each parameter used for the WQI calculation

Step 2: For each parameter, the water quality index was calculated according to Eq. 4:

$$Q_{i} \; = \;\frac{{\left( {V_{a} - V_{i} } \right)}}{{\left( {V_{s} - V_{i} } \right)}} \times 100$$
(4)

Therefore, Va is the measured value of each parameter i, Vi the standard value suggested by the WHO for parameter i and Vs the standard suggested by the WHO for parameter i. Compared to acceptable limits recommended on an international basis, water content may be assessed using physico-chemical criteria (WHO 2011). WQI is the easiest way to express the quality of drinking water supplies, since it is one of the most effective tools for summarizing and displaying water quality data (e.g., Bouteraa et al. 2019). However, the water quality based on WQI classifies in five part like shown in Table 3. The inverse distance weighting (IDW) technique was used in this study to delimit the geographic distribution of the WQI used ARCGIS 10.2 software (ESRI 1999).

Table 3 Water quality classification based on WQI

Water quality for irrigation purposes

The irrigation water quality is determined by the chemical compositions in water and has significant impacts on the production of crops. Irrigation water of excellent quality combined with sustainable agricultural practices can maximize the yield of crops (Li et al. 2016; Khalid 2019). In this research, the quality of irrigation water was evaluated by sodium adsorption ratio (SAR) (Wilcox 1955), sodium percentage (Na%) (Ayers and Westcot 1985), permeability index (PI) (Kumar et al. 2007), and magnesium hazard (MH). These parameters can be obtained by solving the following equations, where the concentrations of the cations were expressed in meq/L in the following three formulas.

$${\text{SAR}} = \frac{{{\text{Na}}^{ + } }}{{\sqrt {({\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } )/2} }}\,$$
(5)
$${\text{Na}}\% = \frac{{({\text{Na}}^{ + } + {\text{K}}^{ + } ) \times 100}}{{({\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } + {\text{Na}}^{ + } + {\text{K}}^{ + } )}}$$
(6)
$${\text{PI}} = \frac{{({\text{Na}}^{ + } + \sqrt {{\text{HCO}}_{3}^{ - } } ) \times 100}}{{({\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } + {\text{Na}}^{ + } )}}$$
(7)
$${\text{MH}} = \frac{{{\text{Mg}}^{2 + } }}{{{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } }} \times 100$$
(8)

Results and discussion

The statistical parameters like minimum, maximum and mean concentration of physico-chemical parameters, major ion concentrations are tabulated in Table 1. The Geographic Information Systems (GIS) are important tools to study the spatiotemporal distribution of a given parameter. In this study, four parameters were processed (NO3, Electrical Conductivity (EC), Cl and Na).

Chemical facies

The representation of the 28 groundwater points on the piper diagram (Piper 1944) (Fig. 2) reveals that the groundwater has two chemical forms in the Ksob sub-basin research area: the form of mixed Ca–Mg–Cl and the type of Na–Cl water.

Fig. 2
figure 2

Piper diagram in the study area

Drinking suitability

Temperature and pH

The temperature variation ranges from 17.3 to 26.5 °C with a mean value of 21.7 °C. Temperature in this study was found within permissible limit of WHO (30 °C). PH is an important parameter in evaluating the acid–base balance of water. It is also the indicator of acidic or alkaline condition of water status. WHO has recommended maximum permissible limit of pH from 6.5 to 8.5. The current investigation ranges were 7.1–9.1 which are mainly in the range of WHO standards with the exception of a sample N S20 which sampled in the Ksob wadi. The high values of pH in the study area, it may be attributed to the anthropogenic activities like sewage disposal and improper irrigation process and weathering process. The ground water in the Plio-Quaternary aquifer is generally alkaline with few exceptions.

Nitrate (NO3)

The nitrate values in the study area range between 0 and 400 mg/L with an average value of 40.68 mg/L (Table 1). Based on the maximum allowable limit of 50 mg/L, most groundwater samples do not reach the maximum permissible limit of 50 mg/L (WHO 2011), except 6 samples: S10, S11, S12, S13, S15 and S19. This high concentration of the samples No (S10, S11 and S12) with a value 400, 95 and 135 mg/L, respectively, maybe it’s due to: (a) high concentration of tourism activity (village of Sidi Kaouki); (b) the gap of a sewage system and wastewater treatment plant; and (c) waste from livestock during watering. The spatial nitrate concentrations distribution (Fig. 3) shown that the majority of high values are in the northwest of the study area.

Fig. 3
figure 3

Spatial distribution maps physico-chemical parameters such as (NO3, EC, Na, and Cl)

Electrical conductivity (EC)

Electrical conductivity is a measure of water capacity to convey the electrical current. The most desirable limit of EC in drinking water is prescribed as 1500 μS/cm (WHO 2011). The value of EC is between 880 μS/cm were observed in sample No S3, and 12,250 μS/cm were observed in sample No S12. EC measures the ability of a material to conduct an electric current such that the higher EC indicates enrichment of salts in the groundwater. Thus, the EC can be classified as type I, if the enrichments of salts are low (EC < 1500 μS/cm); type II, if the enrichment of salts are medium (1500 μS/cm < EC < 3000 μS/cm); and type III, if the enrichments of salts are high (EC > 3000 μS/cm (Sarath Prasanth et al. 2012). According to the classification of EC, 14.3% of the total groundwater samples (S2, S3, S9, S22) falling under the type I (low enrichment of salts), 67.85% of the samples (S4, S6, S7, S11, S13–S18, S20, S21, S23–S28) under the type II (medium enrichment of salts), and 17.85% of the samples (S1, S5, S8, S12, S19) under the type III (high enrichment of salts). The spatial distribution map of the electrical conductivity in the study area is shown in (Fig. 3).

Sodium (Na)

Sodium salts are found in all food and drinking water. No firm conclusions can be drawn about the possible association between sodium in drinking water and the occurrence of hypertension (Rabeiy 2018). However, concentrations more than 200 mg/l as assigned by WHO may give rise to unacceptable taste. The sodium in the groundwater of the study area ranges from 84.3 at the point S2 to 1950 mg/L at the point S12 in the downstream part of the study area, with the mean of 359.7 (Table 3). In the region, 64.3% of the samples have sodium within WHO desirable limit (Table 1) for drinking waters and 35.7% were found to be beyond the maximum permissible limits of WHO standards. High concentration of sodium may be attributed to ion exchange and leaching of sodium salts such as halite during the flow of groundwater through sediments. Also, lack of sewage system has increased the amount of sodium in groundwater within the old agricultural lands. Spatial distribution of sodium in the study area illustrated in Fig. 3.

Chloride (Cl)

The chloride in groundwater may be from diverse sources such as weathering, leaching of sedimentary rocks and soil, domestic and municipal effluents. The range of chloride concentration is found to vary between 226 and 4800 mg/L, with a mean of 814 mg/L (Table 1). The study area has 57.14% samples of chloride within WHO desirable limit for drinking waters and the rest 42.85% were found to be beyond the maximum permissible limits of WHO standards (Table 1). These high Cl concentration values are mainly due to dissolution of evaporite, wastewater, and infiltration of seawater (the overexploitation of the Plio-quaternary aquifer resource causing a deficit which leads to an intrusion of seawater). The spatial distribution map of the chloride concentration shows that most of the high values are in the downstream part of the study area (Fig. 3). Furthermore, there are two samples S2 and S22 which are characterized by a chloride concentration of less than 250 mg/L as they are located in the recharge zone (Fig. 3).

The correlation diagram Na vs Cl (Fig. 4) shows a significant positive correlation between these two elements (R2 = 0.97). This reflects that these two ions have the same origin. The samples are positioned along or below the halite dissolution line and the variations of their Cl and Na concentrations could be explained by the effects of dilution during rainy periods, and evaporation during hot, dry periods.

Fig. 4
figure 4

Na vs. Cl diagram

The samples showing Na/Cl ratios lower than the line halite dissolution ratio are probably attributed to Na depletion due to the reverse ion exchange process. Moreover, the Na+ and Cl dissolved in the groundwater do not seem to be primarily associated with halite dissolution (Fig. 4).

Water Quality Index result and evaluation

Eleven physico-chemical parameters (EC, TDS, pH, HCO3, NO3, Cl, SO4, Mg, Na, K, Ca) of groundwater were used for calculation of Water Quality Index (WQI) during the campaign march 2019 in the Ksob sub-basin. In the WQI calculation, twenty eight different sampling sites were used to determine the suitability of groundwater content for drinking. Water quality index values range between 102 and 879 and thus can be classified into three water classes (Table 4). The results show that, 10.7% of the samples indicate water unsuitable for drinking, while 28.6% of groundwater sampled in the field of research had very poor water quality. Regrettably, 60.7% are poor water quality (Table 4). The spatial distribution map of the WQI shows that most of the groundwater samples belong to the very poor water (Fig. 5A). The area of high WQI concentration was located in the Ksob sub-basin due to the high concentration of NO3 (Fig. 5A, Fig. 3). However, the intrusion of sea water, the dissolution of evaporative minerals (halite, anhydrite, and gypsum), the use of chemicals and the impact of climate change on this coastal aquifer can explain this situation.

Table 4 Water quality index (WQI) classification for individual samples of campaign 2019
Fig. 5
figure 5

Water quality index classification (A); locations of unsuitable groundwater for drinking or irrigation according to quality indices in the synclinal of Essaouira basin (B)

Assessment of groundwater for irrigation

To explore the conditions of groundwater for irrigation purposes, four quality indices were estimated for each sampling site using Eqs. (5), (6), (7) and (8). The results of SAR, Na%, PI, and (MH) are classified and tabulated in Tables 5, 6, 7, and 8, respectively. According to the results, most of the groundwater sites are suitable and good for irrigation. There are 3.6% of the sampling data unsuitable for irrigation according to SAR, never samples are unsuitable according to Na% and PI, while 9 samples are unsuitable for irrigation corresponding to MH. These sites are illustrated in Fig. 5B.

Table 5 SAR values for sampling sites and water quality ranges for each class
Table 6 Values of sodium percentage for sampling sites and water quality ranges for each class
Table 7 Values of permeability index percentage for sampling sites and water quality ranges for each class
Table 8 Values of magnesium hazard percentage for sampling sites and water quality ranges for each class

Isotope hydrology (δ 2H and δ 18O)

Groundwater tracers have been widely used to identify areas contributing precipitation to groundwater recharge (Blasch and Bryson 2007). Specifically, stable isotopes of hydrogen (δ2H) and oxygen (δ18O) have been used as conservative groundwater tracers because values remain constant as long as there are no phase changes or fractionation along the flowpath (Clark and Fritz 1997).

The stable isotope ratios of the groundwater in the Plio-Quaternary alluvial aquifer of Essaouira basin, range between − 26.8 and − 14.9‰ with an average of − 22.01‰ for deuterium contents and between − 4.56 and − 3.5‰ with an average of − 4.16‰ for the oxygen-18 contents (Table 9).

Table 9 Isotopic composition of groundwater samples in the synclinal of Essaouira (2006 campaign)

For the isotopic characterization of study area, two reference lines were used: the global meteoric water line (GMWL) following Eq. (9) (Craig 1961).

$$\delta^{2} {\text{H}}\; = \;8\delta^{18} {\text{O}} + 10$$
(9)

And the local meteoric water line of Ksob sub-basin (LMWL) according to Eq. (10) (Bahir et al. 2000).

$$\delta^{2} {\text{H}}\; = \;7.72\;\delta^{18} {\text{O}} + 10.83$$
(10)

The δ18O-δ2H correlation diagram (Fig. 6) shows that the most of the samples in the study area are scattered around the GMWL and LMWL lines reflecting a recharge by infiltration of rainwater of Atlantic origin, as like samples (M24, 368/51, 149/51). This area is located in the upstream part of the study area and is characterized by aquifer recharge which results in low electrical conductivity.

In the other hand, there are other points are located below GMWL and LMWL (Fig. 6). This group of points is dominated by the phenomenon of evaporation, as like samples (363/51, 190/51, 272/51). Point 11/51 is located in the downstream part of the study area and is positioned above the GMLW and LMWL, which implies that the fresh water has been contaminated by sea water.

Fig. 6
figure 6

Correlation of δ2H = f (δ18O) in the groundwater in the study area

Conclusion

The categorization of the groundwater samples suggests that Na–Cl is the major hydrofacies that is dominant in the Ksob sub-basin. The results show that the aquifer is characterized by a generally high natural salinity, with the groundwater samples revealing EC values that exceed 1000 μS/cm.

The suitability of irrigation water quality is measured based on SAR, Na %, PI, and MH. Majority of the samples fall within the suitable range for irrigation purpose except few that exceed the permissible limits were observed to have been varying geology and anthropogenic activities.

The computed WQI for twenty eight samples ranged from 102.60 to 879.77. In global, 10.7% of the samples indicate water unsuitable for drinking, while 28.6% had very poor water quality. Regrettably, 60.7% of groundwaters are poor water quality. The areas of high WQI and NO3 were located in the agricultural region, where the groundwater was polluted by nitrate due to excessive use of nitrogen fertilizers and large amount of untreated excreta of animals. The study has shown that the groundwater in the downstream part of the study area is characterized by high salinity due to the concentration of the Na–Cl ions attributable to fossil water, which makes it unsuitable for domestic use or irrigation.

The stable isotope composition of water reflects that the origin recharge of aquifers is contributing by infiltration of precipitation of Atlantic Ocean. Some points reflecting by the evaporative effect before the infiltration in the aquifer. One point represented the effected by seawater.

The results of this work would be helpful and meaningful for groundwater protection and management for local government despite some uncertainties. In addition, it is important to establish a groundwater treatment system in rural areas to prevent residents from drinking groundwater directly to reduce the human health risks.