Keywords

1 Introduction

Groundwater quality is equally important to its quantity owing to the suitability of water for various purposes. Water quality analysis is an important issue in groundwater studies. Variation of groundwater quality in an area is a function of physical and chemical parameters that are greatly influenced by geological formations and anthropogenic activities (El Mountassir et al. 2020). The hydrochemical study reveals the quality of water that is suitable for drinking, agriculture and industrial purposes and helps to understand the change in quality due to rock–water interaction or any type of anthropogenic influence (Carreira et al. 2018; Bahir et al. 2019a). Several studies have been realized in the Essaouira basin having partially identified and characterized some of the main mechanisms causing degradation of water quality in some coastal areas of this region, based on the application of geochemical and isotopic approaches (Bahir et al. 2019b; Ouhamdouch et al. 2019). These studies have demonstrated that (a) the groundwater recharge in Essaouira basin is supported by water runoff and precipitation; (b) important contribution of water–rock interaction in groundwater mineralization; (c) anthropogenic contamination was also identified.

The present study had the objective to understand the spatial distribution of hydrochemical constituents of groundwater related to its suitability for agriculture and domestic use, with application of cluster analysis.

2 Methodology

The Ouazzi basin is located in the north-eastern part of Essaouira city (Fig. 1). The basin is under semi-arid climate with irregular rainfall of about 300 mm year, and the temperature oscillates about 20 °C (El Mountassir et al. 2020). A set of 50 groundwater samples was analysed for 11 physical and chemical parameters comprising major ion concentrations. The samples were collected in 2019 from the Plio-Quaternary (downstream) and Cenomanian–Turonian (upstream) aquifers (depth 9.20–170 m) of Ouazzi basin. The physical parameters (temperature, pH, electrical conductivity) were measured in situ, and the major chemical parameters (Ca2+, HCO3, Mg2+, Na+, K+, Cl, SO4 and NO3) were determined in the Laboratory of Geosciences and Environment—ENS (LGE–ENS) at ‘École Normale Supérieure’ of Marrakech (Cadi Ayyad University, Marrakech, Morocco). To identify possible groups and relationships among the samples analysed based on major chemical compositions, ion species (Ca2+, HCO3, Mg2+, Na+, K+, Cl, SO4 and NO3) were considered as variables for application in Q-mode cluster analysis. The clustering procedure was performed by the Ward’s linkage method with the Euclidean distance as a measure of similarity of samples using the XLSTAT statistical tool.

Fig. 1
figure 1

Study area

3 Results and Discussions

3.1 Hydrochemical Characterization and Water Type

The electrical conductivity of groundwater samples ranges from 615 to 5738 μS/cm with a mean value of 4479 μS/cm. The salinity increases in the direction of groundwater flow from north to south. The pH ranges between 7 and 8.4 with a mean value of 7.5, which shows that the groundwater of the study area is of alkaline nature. The mean temperature of groundwater samples was 20.4 °C. The maximum Ca2+ and Mg2+ concentrations of 769.5 and 297.4 mg/L, respectively, are however higher than their respective WHO standards of 200 and 30 mg/L. The mean sodium and potassium concentrations in the groundwater are 168 and 18.4 mg/L, respectively. The concentration of HCO3 in the study area ranges between 244 and 898 mg/L. Most Cl in the groundwater is from three sources including ancient sea water entrapped in sediment, solution of halite and related minerals in evaporate deposits in the region. The chloride value in the study area ranges between 113 and 1817 mg/L. The projection of 50 samples analysed on the Piper diagram (Fig. 2) shows four water types: Ca-Mg-Cl type, Mg-Ca-HCO3 type, SO4-Ca-Mg and Na-Cl water type. The dispersion of the points in the Piper diagram suggests that the groundwater mineralization is of several origins.

Fig. 2
figure 2

Piper diagram of groundwater samples in the study area

3.2 Cluster Analysis

The output of the Q-mode cluster analysis is given as a dendrogram (Fig. 3). Three preliminary groups are selected based on visual examination of the dendrogram, each representing a hydrochemical facies (Table 1). The first group of waters, group 1, has high salinity (mean EC = 4275.67 μS/cm) and abundance orders (meq/L): Na+ > Ca2+ > Mg2+ > K+ and Cl > HCO3 > SO42− > NO3 (Table 1). These waters are classified as Ca-Mg-Cl and Na-Cl water type. Group 2 is made up of water samples wherein the anion composition was dominated by SO42− and Cl, with cation composition varying from dominantly Ca2+ and Mg2+ to dominantly Na+ plus K+ (Table 1). EC values (mean 4007.86 μS/cm) are significantly less than those of group 1, reflecting a more effective weathering process. These waters are classified as Ca-Cl and Ca-Mg-Cl. Group 3, made up of 37 water samples, has a salinity range (615 μS/cm < EC < 3842 μS/cm); mean 1857.9 μS/cm overlapping those of the former two groups (G1 and G2). On the basis of overall chemical composition, characterized by ion abundances Ca2+ > Mg2+ > Na+ > K+ and Cl > HCO3 > SO42− > NO3, these waters are classified as Ca-Mg-Cl, Ca-Cl and SO4-Ca-Mg.

Fig. 3
figure 3

Q-mode cluster analysis. Dendrogram for 50 samples and eight chemical variables

Table 1 Mean concentrations of the major chemical parameters of three main water groups

3.3 Irrigation Water Quality

The suitability of groundwater for agricultural purposes depends on the effect of mineral constituents of water on both plants and soil. Effects of salts on soils causing changes in soil structure, permeability and aeration indirectly affect plant growth. Wilcox and US Salinity Laboratory Staff proposed irrigational specifications for evaluating the suitability of water for irrigation use. There is a significant relationship between sodium adsorption ratio (SAR) values for irrigation water and the extent to which sodium is adsorbed by the soils. SAR was computed using the equation given below :

$${\text{SAR}} = \left( {{\text{Na}}^{ + } } \right)/\left[ {\left( {{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } } \right)/2} \right]^{1/2}$$
(1)

where the concentrations are reported in meq/L.

The SAR values ranged from 0.22 to 5.83 with a mean varying from value of 1.95 to 4.8 in the three groups. Approximately, all samples fall in low SAR class (S1) and (S2) (Fig. 4). This implies that no alkali hazard is anticipated to the crops. If the SAR value is greater than 6–9, the irrigation water will cause permeability problems on shrinking and swelling of clayey soils types (Saleh et al. 1999).

Fig. 4
figure 4

Salinity (μS/cm) versus alkalinity hazard in the US salinity diagram

The SAR and electrical conductivity values plotted on the US salinity richards diagram illustrate that most of the groundwater samples of the group 1 belong to the categories C4S2 (very high salinity and medium sodium) (Fig. 4). Most samples of the group 2 fall in the field of C4S1, indicating high salinity and low sodium water, and thus, they can be used for irrigation on almost all types of soil with little danger of exchangeable sodium (Fig. 4). The samples of the group 3 fall in the field of C4S2 and C4S1, indicating very high salinity and medium sodium hazard. These samples will be suitable for plants having good salt tolerance and hence restricted suitability for irrigation, especially in soils with limited drainage (Saleh et al. 1999).

The sodium percentage (Na %) is calculated using the formula given below, where all the concentrations are expressed in meq/L:

$${\text{Na}}\% = \left[ {\left( {{\text{Na}}^{ + } + {\text{k}}^{ + } } \right)/\left( {{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } + {\text{Na}}^{ + } + {\text{k}}^{ + } } \right)} \right] \times 100$$
(2)

The Na% of groundwater samples ranges from 4.3 to 53.18 with a mean of 40.92 for group 1, 18.76 in group 2 and 25.15 in group 3. The Wilcox diagram relating sodium percentage and electrical conductivity values shows that most of the groundwater samples fall in the field of good to permissible (group 3) except a few samples falling in the fields of doubtful and unsuitable category for irrigation (Fig. 5). The Na% indicates that the groundwater is unsuitable for irrigation in the group (1 and 2) (Fig. 5).

Fig. 5
figure 5

 Wilcox diagram

4 Concluding Remarks

This study was conducted to evaluate factors regulating groundwater quality in an area with agriculture as main use. Fifty groundwater samples have been collected from Ouazi basin (Essaouira) for hydrochemical investigations, to understand the sources of dissolved ions and assess the chemical quality of the groundwater. Q-mode cluster analysis was applied to groundwater quality data sets and generated three clusters (groups 1, 2 and 3). The values of sodium absorption ratio and electrical conductivity of the ground water were plotted in the US salinity laboratory diagram for irrigation water. Most of the samples fall in C3S1–C4S1 quality with high and very high salinity hazard to low sodium hazard. However, the study has helped to improve understanding of water quality of the area for effective management and proper utilization of groundwater resources for better living conditions of the people. A continuous monitoring program of water quality is required to avoid further deterioration of the water quality of the study area. The hydroclimatic, hydrodynamic, hydrochemical and isotopic approaches have led to the diagnosis of the state of vulnerability of the aquifers of the Essaouira basin. Thus, the use of unconventional resources, such as desalinated sea water for drinking water supply or treated wastewater for agriculture, must be considered an immediate priority to avoid severe water shortage.