Abstract

The study was carried out in a shallow phreatic aquifer in the piedmont zone between the Atlas Mountains and Tadla plain in Morocco. This study is carried out using physicochemical analyses with statistical analysis (CA and PCA) to show variability of groundwater hydrochemical parameters beneath Beni Mellal city in order to know spatial variability of water quality under urban activities. Total dissolved solid shows large variation from 355 mg/L to 918 mg/L with high values recorded, as electric conductivity, in the city center. High sulfate content is intercepted also in the old city center with values exceeding the threshold in the Moroccan guideline. Sulfate ions are often suspected of having an anthropogenic origin. All water samples show a dominance of Ca against Mg (Ca/Mg: 1.08–6.25) and HCO3 against SO4 (HCO3/SO4: 0.29–6.92). For most of the trace elements, the measured concentrations were far below the standard values except Al and Fe in some samples which exceed all guideline values. PCA of all dataset highlights eight factors with eigenvalues higher than 1 that explained about 80.34% of the total variance. The first two components PC1 and PC2 explained about 41.14% of the total cumulative variance and were responsible for 24.25% and 16.89% of the variance for each one, respectively. The component PC1 is mostly correlated with electric conductivity, TDS, and chloride. The component PC2 was highly correlated with Ca, Cr, and Zn. The dendrogram at a linkage distance of about 10.5 leads to dividing the diagram into three clusters of water samples, C1, C2, and C3. Cluster C1 shows a medium content of EC, HCO3, and NO3 and low content of TDS, Ca, Mg, Na, K, SO4, and Ba compared with C2 and C3. C1 samples show the lowest ion content, resulting probably from the minimal time of residence within the aquifer with low rock interactions. Cluster C2 regroups samples with high content of Ca, Mg, K, SO4, Al, and Cr, medium content of TDS and Na, and low content of EC, HCO3, NO3, and Cl. Samples in cluster C3 have more content of heavy metal (Cd, Fe, Mn, and Ni), CE, TDS, Ca, Mg, Na, HCO3, NO3, and Cl, with low content of Cr and Al and medium values of K and SO4. We recommended the monitoring and follow-up of the water quality under the city and the repair of pipes especially in the downtown area to limit unwanted infiltration. Spatial autocorrelation used with variograms and Moran'I leads to conclude that groundwater parameters varied differently according to the direction, which means that the semivariance depended on direction and distance between samples.

1. Introduction

Groundwater is one of the most useful water resources around the world. Many populations are supplied with for drinking, irrigation, or industrial purposes. Less than 2% of world water is stored inside the rocks as mineral constitutive and groundwater. Urbanization leads to an increasing demand for water of adequate quality, accompanied by the rejection of large corresponding volumes of wastewater. The major challenge is to protect urban groundwater resources so that it remains available to the future population. Water use related to human activities influences the hydrologic cycle by excessive water withdrawal from surface water and groundwater sources. The total of groundwater withdrawn annually is approximately estimated at about 20% of global water withdrawals [1].

Morocco is one of the countries that can have a significant deficit of water resources by 2050. This has led decision-makers to install several water infrastructures since the 1960s. Thus, the region of Beni Mellal Khenifra has 15 dams and seven water transfer systems. These structures warrant, both for the Oum Er-Rbia watershed and for the neighboring basins, the satisfaction of the needs for drinking water, industrial and agricultural, and support of the necessary flow for the safety of the water resources. This current hydraulic infrastructure mobilizes about 3,550 Mm3 of water and allows irrigation of 493,575 ha in Tadla plain and the production of about 350 Mm3/year for the supply of drinking and industrial water. Hydroelectric power produces about 866 GWh/year which represents more than 70% of the national production.

Water resources quality becomes a principal concern of population since many factors can alter and make water unusable such as solid waste lixiviation and wastewater discharge into water surface or groundwater. Many studies have focused on water quality under urban activities [210]. Urbanization has an important impact in the change of groundwater solute composition. Urban ground surface may change the original conditions and thus the groundwater circulation system which affected the dilution and transport of groundwater [11], by adding and dissolving many anthropic generated pollutants into the aquifer system.

Groundwater under the urban city of Beni Mellal is related to two systems: karstic aquifer under Atlasic Mountain to the south and multilayered aquifer system of Tadla Plain to the north. Aine Asserdoune and Tamaghnounte are the main natural water springs gushing in limestone of Atlas Mountains [12]. The Beni Mellal urban expansions have caused an overgrowing need for fresh water which is provided first by water spring of Aine Asserdoune, Turonian limestone aquifer and recently by surface water of Bin El Ouidane dam for drinking water. Many populations are supplied through drilled wells on the alluvial deposit aquifer.

The multilayered system of Tadla [1317] and karstic aquifer system [18] were mainly studied to elucidate hydrochemical features. Despite these works, no study has been undertaken on the Dir (Piedmont) aquifer of Beni Mellal under the urban influence. The permeation of pollution caused by the discharge of sewage into septic tanks, faulty pipes, and canals and the infiltration of urban wastewater lead to the contamination of the urban aquifer of Beni Mellal. In the prior work of Beni Mellal groundwater [9, 19], we have focused to illuminate water quality and suitability of groundwater to anthropic uses (drinking, irrigation, and industry suitabilities). The purpose of the present paper is using statistical analysis (CA, PCA, and spatial autocorrelation) to hydrochemical parameters of groundwater beneath Beni Mellal city in order to identify the parameters responsible for spatial variability of water quality under urban activities. We use also the variograms and Moran’s I to define spatial classes of variables based on interpretation of geostatistical parameters known to affect important hydrochemical processes measured at multiple locations.

2. Geologic Setting

Geologic setting of the Tadla plain aquifer system was explained by El Baghdadi et al. [19]. The groundwater resources in the Tadla Plain are organized in a multilayer system. The deepest one is the aquifer in the Turonian limestones which are surmounted by the sandy limestones that shelter the Eocene aquifer. The superficial formations formed mainly by Mio-Pliocene and quaternary alluviums contain the water tables of Beni Moussa, Beni Amir, and Dir or Piedmont. The river Oum Er-Rbia plays a very important role in recharging and draining these aquifers [20].

The thickness and depth of Tadla synclinorium aquifers vary considerably, inducing spatial variability in the availability of groundwater resources. The Mio-Pliocene quaternary alluvial aquifer shows variable thickness with an average of 80 m throughout the perimeter of Tadla. The Eocene layer has a uniform thickness, but its depth is the lowest in the northeastern part of the Beni Amir perimeter. The confined aquifer of Turonian is the deepest one on the whole perimeter, which puts it theoretically safe from pumping [15]. The good quality of the Turonian waters preserves it against agricultural or industrial uses. They are reserved only for drinking water supply.

In addition to the aquifer system of the plain, the High Atlas limestone of Beni Mellal contains a karst liasic system from which springs several sources in the piedmont (Figure 1). Throughout the area overlapping mountains on the plain arise the sources Aine Asserdoune, Aine Tamegnounte, Aine El Ghazi, Aine Sidi Bouyacoub, and Aine Ourbia. Located in the center of Morocco, the city of Beni Mellal is bordered to the South by the High Atlas Mountains sheltering the liasic karst system with many water sources (Aine Asserdoune, Aine Tamegnount, etc.) and to the North by the plain of Tadla which presents a multilayer aquifer system.

The urban area of Beni Mellal with an area of approximately 35 km2 is located south of the plain of Tadla. The climatic conditions show an average temperature of about 19°C and an average annual rainfall of 400 to 500 mm/year. The Beni Mellal foothill zone is formed by alluvial conglomeratic deposits structured as alluvial cones. These conglomerates are interspersed with clays and silts at their base. The center of the city consists of the travertine deposit related to spring activities. The city is built on quaternary travertines (downtown) and conglomerates of Mio-Plio quaternary alluvium. The urban groundwater beneath the city belongs to the Dir (Piedmont) layer (Figure 1). In the city center and the old medina, there is a complex system of caves and natural and artificial pits dug in travertines, where wastewater is directly rejected without treatment. The water table Beni Mellal once was drained by the source of “Day” which has completely disappeared for a long time. This indicates that the excessive use of groundwater has reduced the piezometric level of the water table by more than 10 to 20 m in recent decades.

3. Materials and Methods

The collection of sampling and data is the same as mentioned in the prior work [19]. The sampling companion was executed during the period April–May 2014 in several wells of the city covering the car wash stations, gas stations, and residences. 51 samples were taken for laboratory analysis. Some parameters were taken in situ such as piezometric level, pH, electrical conductivity, temperature, dissolved solid load, and dissolved oxygen content (Figure 1). The water samples are put in polyethylene bottles. In the laboratory, the samples were filtered by a membrane of 0.45 μm and analyzed. Alkalinity, nitrate, sulfate, and chloride were prepared by the titrimetric method at ONEE laboratory. Flame photometer BWB-XP was used to check calcium, sodium, potassium, barium, and lithium contents. All heavy metals were obtained by inductively coupled plasma in Sultan Moulay Slimane University Analysis Center using a mixture of nitric and hydrochloride acid solutions by heating following the EPA 3005a method.

To test the correlation between the different parameters, we used principal component analysis or PCA [21]. This statistical method allows visualizing the correlations on several axes whose significance is important (eigenvalues > 1). Principal components represent combinations of the n original variables in another set or axis. Generally, principal component PC1 explains more of the variance of the data than the second axis or principal component PC2 which explains more of the remaining variance. The remained components PC3, PC4, etc. may be treated as residuals, measuring the lack of fit of observations along the first principal components [22]. Before entering using PCA, all variable distribution fittings are normal. The KMO index gives an overall view of the quality of inter-item correlations with additional information to the inspection of the correlation matrix. This index is about 0.6 and is acceptable for performing all correlations analysis. If major and trace elements are mixed in one and the same factor, log-transformation may not reduce the data to comparable scales and confirm that each variable has an equivalent weight in the analysis. In this case, standardization to zero and unit variance guarantees an equal influence of all variables. In order to elucidate composition dissimilarity between sampling sites, we applied the cluster analysis method (CA) on the raw data, using squared Euclidean distances that are the most commonly chosen type of distance [23]. Cluster analysis is a hierarchical statistical method mainly used to separate homogeneous clusters on the basis of their close characteristics.

Semivariogram analysis and global Moran’s I were conducted for all measured parameters. Variograms were fitted by a spherical models leading to extraction of nugget, sill, and range of the variables. The Moran I index (1948) is the most used indicator for evaluating global spatial autocorrelation. It is a cross-product statistic between a variable and its spatial neighborhood, the variable being expressed as deviations from the mean. For an observation at location i, where is the average of the variable x, the statistic of Moran I is expressed aswhere wij is the element of the spatial weighting matrix and n is the number of observations.

The statistic descriptive parameters were calculated using XLSTAT (version 2014.5.03). Moran’s I values were extracted by GeoDa software (version 1.12, 2018). Variograms and map were carried out using Surfer software (version 2012) and Illustrator 15.

4. Results and Discussion

4.1. Ionic Balance

We have tested the accuracy of hydrochemical analyses by using an ionic error balance. This was computed according with normalized balance which must not exceed 5% of ion difference [24]. The balanced charge (CB) was achieved using the following equation:

The ionic balances of all samples were found in the range of 0 to 5%. For more accuracy insurance, we have computed the ratio of measured TDS and calculated TDS. The correctness of our analytical data was proved by the range of this ratio between 1 and 1.3.

4.2. Physicochemical and Component Variations

Table 1 summarizes the statistical data of 24 parameters measured for 51 samples. The electric conductivity ranges from 490 to 1260 with an average of 778. Correlation between two or more variables exhibits a statistical relation. SPSS 13.0 for Windows is used to calculate Pearson correlation coefficients of all variables which are listed in Table 2. All physicochemical parameters are listed in Table 3 with statistical ranges.

The electric conductivity shows high values, especially in the city center. Total dissolved solid shows large variation from 355 mg/L to 918 mg/L with high values recorded, as electric conductivity, in the city center. Several samples of these two parameters (EC and TDS) far exceed Moroccan standards (NM 03.7.001). The pH shows a range of variation from 7.10 to 7.9 with an average of 7.5.

Major elements Ca, Mg, and Na ranged from 72.1, 20.0, and 2.9 mg/L to 284, 84.5, and 67 mg/L, respectively, with values below Moroccan standards. K content varies from 1 to 10.5 mg/L with an average value of 3.4 mg/L. There are no guideline values established for potassium because it occurs in drinking water at concentrations below health concerns [25]. Only two samples, 16 and 34, show slightly high values 10.5 and 8.8 mg/L, respectively, but still within range of 0.1 to 10 mg/L [26]. High K content can be generated by the use of potassium permanganate as an oxidant in drinking water treatment but these waters have not undergone any treatment. The relative abundance of cations in groundwater within the study area is in the following order: Ca2+ > Mg2+ > Na+ > K+.

Sulfate content varies between 65.0 and 851.0 mg/L, with 39% of analyzed samples showing sulfate content above 400 mg/L, which is the threshold in the Moroccan guideline (NM 03.7.001). These values are intercepted also in the old city center. High sulfate and potassium contents may be related to anthropogenic activities. The concentrations of bicarbonates, nitrates, and chlorides range from 210.0, 6.2, and 12.32 mg/L to 468.0, 41.2, and 114.7 mg/L, averaging 369.7, 21.9, and 63.5 mg/L, respectively. All these concentrations remain below the Moroccan limit values. The relative abundance of anions in Beni Mellal groundwater is as follows: HCO3 > SO42− > Cl > NO3.

In order to show the variation of major cations and anions of all water samples, the Schoeller diagram used indicates that Beni Mellal groundwater is depleted in Cl, K, and Na and enriched in Ca, Mg, HCO3, and sulfates (Figure 2).

The major components of Beni Mellal groundwater are plotted in a Piper diagram (Figure 3). All water samples plot along the lines Ca-Mg and HCO3-SO4 with a dominance of Ca against Mg (Ca/Mg: 1.08–6.25) and HCO3 against SO4 (HCO3/SO4: 0.29–6.92). Clearly, there is high variation in cation proportions; the water is calcium-magnesium water mass. The diagram indicates that there is a continuum of mixing between sulfate and bicarbonate waters. The anions, however, show a range in composition from bicarbonate to sulfate-rich solutions. In fact, there is a great increase in ionic strength, total dissolved solids, and electrical conductivity from the bicarbonate to sulfate ends of the diagram. This variation reflects the sources and mixing of water derived from dissolution of limestone and/or dolomite and gypsum and/or anhydrite.

The carbonate dissolution should generate an equal amount of Ca + Mg and HCO3, but the excess of Ca + Mg in relation to HCO3 (Ca + Mg/HCO3 = 1.2–4.7) suggests an alternative origin of Ca and Mg. Contrariwise, the good correlation between Ca and SO4 (R2: 0.87) and Mg and SO4 (R2: 0.55) suggests dissolution of Ca-Mg-sulfate-bearing minerals (gypsum or anhydrite). Sulfate ions are often suspected to have an anthropogenic origin, especially in the center of the city with high population density and bad maintenance of wastewater network, in addition to the dissolution of evaporates such as gypsum and atmospheric deposits [27].

These facies have hydrochemical composition closely to those of Liasic karstic nappe of Beni Mellal Atlas than groundwater of quaternary water table of Tadla plain which has trended to Cl and Na in Oum Er-Rbia facies (Figure 4).

The high content of sulfates is reported for the dissolution of gypsum (CaSO4) prior to the dissolution of barite (BaSO4) (Figure 5). But in some samples localized in old central city, the content of sulfate is higher than 500 mg/L which can be reported probably due to discharge of domestic seepage without treatment directly into a complex system of natural and artificial caves and cesspits dug in the travertines. Urban groundwater pollution can be reported to be due to leakage sewage, septic tanks, contaminated land, industrial spillages, infiltration, landfills, and fertilizers used in gardens [29]. In Beni Mellal city center, there are several cavities dug in the travertines where the inhabitants directly discharge the domestic sewage. This leads to direct infiltration of pollutants to reach rapidly the vadose and saturated zone.

The diagrams in Figure 6 show the presence of a positive correlation between the ions (HCO3, Na+, K+, Cl, and NO3 and some trace elements such as Ba, Mn, and Cd) and the TDS, demonstrating the participation of these elements in the acquisition of the total dissolved load.

4.3. Trace Elements

The contents of analyzed trace metals were matched to many standards directives [25, 3033]. The analyses are summarized in Table 1. As mentioned in the previous work [19], the content of all analyzed trace elements are below the concentration threshold except for Al and Fe in some samples. Al content exceeds the recommended concentration (200 μg/L) in 17.6% of analyzed samples and iron whose limit is 300 μg/L in 23.5% of samples (Figure 7). Reduced water conditions lead to increase the solubility of iron [34] and consequently increase the concentration of Fe in groundwater. When the water pressure become low, the iron deposition and precipitation can occur and cause many problems in infrastructure tubing or industrials and domestic uses. The mean values of Ba, Cd, Cr, Cu, Li, Mn, Ni, Pb, and Zn are 136.73, 1.29, 3.24, 109.29, 8.65, 17.29, 8.92, 3.49, and 641.12 μg/L, respectively. Some samples show high Cr content (3.5–7 μg/L), which can be due to the tannery industry in Beni Mellal (Dar Dbagh in the south and Cooperative of Tannery in the north). In the same way, Pb shows high content without exceeding the limit values. Cd, Li, Ni, Ba, and Cu show no concentration abnormalities except for a few trivial variations (Figure 7). The Zn contents (536–700 μg/L) vary according to the lithology variations because the Beni Mellal High Atlas carbonates show in faulted zones the presence of smithsonite mineral (zinc carbonate).

Heavy metals are exhausted by many anthropic activities such as automotive exhausts [35]. When these metals are not fixed by soil, they can reach the saturated zone by infiltration or a direct water recharge.

4.4. Multivariate Statistical Analysis
4.4.1. Principal Component Analysis/Factor Analysis

The principal component analysis was performed on the normalized data set in order to compare the variable pattern between the water samples and all factors influencing each one (Table 4). PCA of all dataset highlights eight factors with eigenvalues higher than 1 that explained about 80.34% of the total variance (Figure 8). The relation between the total scores for each component of all hydrochemical parameters is shown in Figure 9. When the score is higher than 0, the component processes have significant influences on water chemistry. Contrariwise, if the score is less than 0, the component processes do not have any significant influence on the hydrochemistry [36]. The first two components PC1 and PC2 explained about 41.14% of the total cumulative variance and were responsible for 24.25% and 16.89% of the variance for each one, respectively. The component PC1 is mostly correlated (with loading values up to 0.8) with electric conductivity, TDS, and chloride and in less degree (with loading values up to 0.5) by Na, K, Ba, Cd, and Mn. These elements contribute significantly to the total dissolved solids in Beni Mellal water. PC1 can be considered as the salty component because it is mainly saturated with conductivity and TDS. None of the components responsible for the facies type such as Ca, Mg, HCO3, and SO4 of these waters have great influence on the TDS and ionic. The component PC2 was highly correlated (with loading values up to 0.7) with Ca, Cr, and Zn and in less degree (with loading values up to 0.5) with Na, SO4, and Ba and negatively with Ni. This component can be reattached to the dissolution of sulfate minerals (gypsum or barite) and probably to calamite incrusted in Beni Mellal limestone. The component PC3 shows less correlated parameters (HCO3, Pb, and Cr). The fourth PC4 component is influenced only by Mg and SO4. The remained components PC5, PC6, PC7, and PC8 are correlated, respectively, with temperature, dissolved oxygen, pH, Fe, and Ag.

The varimax rotation consists of associating each of the variables with a small number of factors and representing each factor by a limited number of variables. Visually, the variables are brought closer to the axes to which they contribute so as to facilitate their interpretation. The varimax rotation helps to identify the contribution of variables to the formation of factorial axes. This makes it possible to draw, in a quick and synthetic way, conclusions on the dimensionality of the variables, avoiding any bias related to the quality of the projection and the synthesis of the data. Two factors VF1 and VF2 are retained that explain about 40% of the variance (Table 4). VF1 which explains 20.11% of total variance has a positive correlation with EC, TDS, HCO3, NO3, Cl, Cd, Mn, and Ni and negative correlation with Cr and Zn. This VF can be interpreted as mineral component implying anionic contribution to the mineralization and water quality of Beni Mellal groundwater. VF2 (19.76% of total variance) was positively correlated with Ca, Na, K, SO4, Cl, and Ba. This factor can be related to dissolution/cation-exchange process which occurred in the water reservoir. Ca, SO4, and Ba come from a natural process such as liasic limestone and gypsum/barite dissolution of bearing mineral. Exchanges of Ca2+ + Mg2+ in all groundwater samples with Na+ + K+ from surrounding rock are the major cation-exchange process. The diagram of (Ca + Mg) vs. (Na + K) (not shown) shows a positive correlation with R2 = 0.73, indicating the existence of a cation-cation exchange with the replacement of sodium and potassium ions.

4.4.2. Cluster Analysis and Spatial Distribution

Cluster analysis was used to elucidate and group the similarities observed in the 51 sampling sites of Beni Mellal urban groundwater. The adopted method consists of grouping all water samples into clusters with similar water quality, water process interaction, and sources of pollution on the basis of 25 measured available parameters. The result was performed in the form of a dendrogram (Figure 10). The phenon line was drawn in the dendrogram at a linkage distance of about 10.5 leading to divide the diagram into three clusters of water samples, C1, C2, and C3. The Stiff diagrams of two representative samples of each cluster based on median concentrations are also shown in Figure 10. The three classes show the following level of similarity according to the median values of geochemical and physical data presented in Table 4; C1 contains 23 samples, C2 contains 11 samples, and C3 contains 17 samples. C1 and C2 are connected with a lower linkage distance improving the existence of a great similarity between them than with C3. The Stiff diagrams combined with median values data point out the hydrochemical interdependence between the three clusters. We can subdivide C1 to tree subclasses: C1a, C1b, and C1c with a dominance of Ca-HCO3, Mg-HCO3, and Ca-HCO3 with a minor content of SO4, respectively. Cluster C1 shows a medium content of EC, HCO3, and NO3 and low content of TDS, Ca, Mg, Na, K, SO4, and Ba compared with C2 and C3. C1 samples show the lowest ion content, resulting probably from the minimal time of residence within the aquifer with low rock interactions. Cluster C2 regroups samples with high content of Ca, Mg, K, SO4, Al, and Cr, medium content of TDS and Na, and low content of EC, HCO3, NO3, and Cl. Samples in cluster C3 have more content of heavy metals (Cd, Fe, Mn, and Ni), CE, TDS, Ca, Mg, Na, HCO3, NO3, and Cl with low content of Cr and Al and medium values of K and SO4. There is more mineralization in samples of cluster C3 and more content of some heavy metals. This is confirmed by the C3 calcite saturation index whose average value is about 1.1, while C1 and C2 have lower calcite saturation, 0.81 and 0.80, respectively. This is reported to be due to more rock interaction and also to some pollution input into the aquifer. T°, DO, and pH do not have any noticeable variation probably caused by their small values variations.

In order to analyze the spatial variability of the groundwater quality, the tree cluster’s samples are plotted in Figure 11 and represented in the map as sampling sites (Figure 1). The cluster C1 is characterized by low mineralization and is located principally at the peripheral zones of the urban city with low population density and many olive plantations. The cluster C2 records medium mineralization and is located as cluster 1 in the urban periphery, but we can find some vestiges in the central zone. In fact, C1 and C2 have many similarities in terms of hydrogeochemistry or spatial distribution. The samples of cluster C3 show a high mineralization ratio and are located exclusively in the center of the city with high population density and high activities. In addition, the high mineralization values are recorded in wells dug in travertine rocks beneath the old and central city.

As mentioned in many studies, carbonate and silicate weathering, dissolution, ion-exchange processes, and residence time along the flow path control the chemical composition of groundwater in the shallow alluvial aquifers [3739]. Variability and spatial distribution of Beni Mellal groundwater hydrochemistry can be reported as two main processes. The first one occurs naturally as a chemical water-rock interaction leading to dissolution of carbonates, Ca, Na, and Cl and others components to reach water solution and in less degree the ion-exchange can be also reported. Cation-cation exchange reaction in water can be induced by Na+/K+ and Mg2+/Ca2+ ions exchange. This is shown with positive chloroalkaline (CA) indices of Schoeller [40]. The positive correlation of (Ca2+ + Mg2+) vs. (Na+ + K+) R2 = 0.73 is reported. The resulting concentrations of major ions of Beni Mellal shallow groundwater translate the intensity of rock-water interaction and chemical reactions. Because of the close relationship between High Atlas karstic groundwater and the piedmont groundwater of Beni Mellal especially in terms of recharging the water table, the residence time is so short especially for the contributions from the karst system. The continual mixing of waters leads to this hydrochemical variability observed in the waters of Beni Mellal. The second factor can be related to the anthropogenic pollution under urban activities by infiltration of many pollutants such as SO4, K, Al, and Fe that show high values and exceed the water quality thresholds. In the old City center, the presence of many excavations of a cellar, septic tanks, pipes, and faulty pipes that serves as sewerage rejection increases direct infiltration by rainwater storms of urban activity residues [19].

4.4.3. Semivariogram Analysis

Semivariograms of all variables are fitted using a spherical model. The anisotropy in the variograms was spotted practically in all parameters except for Al. Anisotropy is detected in data when the spatial correlation function is not the same for all geographic directions [41, 42]. However, groundwater parameters varied differently according to the direction, which means that the semivariance depended on direction and distance between samples. Three parameters are determined after the refinement of semivariograms: nugget, sill, and range. When sampling interval is null, the discontinuity represents the nugget effect which corresponds to the local variation occurring with sampling error, fine-scale spatial variability, and measurement error [43]. The sill represents the stationary plane variance which occurs at a range distance when the samples do not show any spatial correlation. The variogram parameters are summarized in Table 5. The nugget/sill (N/S) ratio expressed as percentage of the total semivariance allowing comparison of the nugget effect between sampling variables. Cambardella et al. [44] classified this ratio in tree classes relative to spatial dependence. The variables were considered strongly spatial dependent with N/S < 25%; between 25 and 75%, there was moderate spatial dependence and weak spatial dependence when the ratio is higher than 75%. In our study, twelve variables (TDS, T, DO, K, SO4, NO3, Cl, Al, Ba, Li, Pb, and LSI) were considered strongly spatial dependents with N/S < 25%; sixteen variables (EC, pH, Ca, Na, HCO3, Ag, Cd, Cr, Cu, Fe, Mn, Ni, Zn, %Na, SAR, and RSC) have a ratio between 25 and 75% and consequently were moderately spatial dependent. Only Mg has higher ratio (>75%) and can be considered as weakly spatial dependent. Strong spatial dependence is controlled by extrinsic factors such as pollution. There was the case of K and SO4 found with high content in the center of the city as mentioned above and automotive Pb exhaust which can reach the groundwater table by flood seepage. The range values showed considerable variability of the parameters measured (Table 5). The range is considered as the distance across distinct hydrochemical variability. The spatial variability oscillates between 1090 and 7790 m. We thought that distance range tends to be related to the nature of the parameter, aquifer lithology, and hydrochemical processes controlling locale concentration as mentioned below:

4.4.4. Moran’s I Analysis

The calculation of the index of all pairs for each location took into consideration a limit distance of 776 m. The minimum distance choice in this study was arbitrary, as there is no specific criterion for determining an optimal distance. In general, they should not be shorter than the sampling interval or more than half the maximum distance between all pairs of samples [45] (Table 6).

Table 5 shows Moran’s Index values of all measured parameters. It is not easy to represent all the correlograms of the different variables. It should be known that the higher the absolute value of Moran’s I is, the greater the spatial autocorrelation. We subdivided our variables into three classes based on Moran’s I. The strongest spatial autocorrelation was shown with the following parameters: EC, TDS, Cl, Ba, Mn, and Zn with Moran’s I oscillating between 0.4 and 0.6. T°, Na, K, HCO3, Cd, Cr, Li, Pb, Na, and SAR show intermediate spatial autocorrelation with indices ranging from 0.2 to 0.4. The lowest spatial autocorrelation is recorded for pH, DO, Ca, Mg, SO4, NO3, Ag, Al, Cu, Fe, Ni, RSC, and LSI with indices ranging from 0 to 0.2.

The results of the global Moran’s I and LISA analysis of three examples of the three classes are illustrated in Figure 12. TDS belongs to the first class with strong spatial autocorrelation and a large high-high spatial cluster located in the center of the city and the low-low spatial cluster in the periphery road. K illustrates medium spatial autocorrelation with decrease in the number of samples belonging to the high-high and low-low cluster and increase of the number of the nonsignificant samples. The high-high cluster was located, also in the center of the city. The number of samples with significant spatial autocorrelation was very low; SO4 is the best parameter to illustrate the third class recording the lowest spatial autocorrelation.

In order to elucidate the spatial autocorrelation of the principal component PC as clustered above, we use an empirical Bayes (EB) standardization suggested by Assunção and Reis [46] and reviewed by Anselin et al. [47] for bivariate spatial correlation of PC1 and PC2. This standardization performs correction of Moran’s I spatial autocorrelation test statistic for varying population densities across observational units, when the variable of interest is a rate or proportion. The notion of bivariate spatial correlation measures the degree to which the value for a given variable at a location is correlated with its neighbors for a different variable. Local Moran’s I of each component was computed, and a correlogram exhibiting spatial evolution was built (Figure 13). The main component PC1 is the only one that shows a very good spatial autocorrelation and to a lesser extent the PC2 component. The other components do not show any spatial autocorrelation. This led us to report the PC1 vs. PC2 standardized component (EB) in the sampling space (Figure 14). The result is a spatial distribution with the high-high cluster clearly visible in the center of the city and the low-low cluster in periphery. The sampling outliners, low-high and high-low, were at the minimum.

The distances determined from the variograms of each component vary according to the nature of the parameter being measured (1090–7790 m) and are generally larger than the set bandwidth (776 m) for calculating the Moran index. This is due to the fact that the semivariogram calculates variance but cannot distinguish positive or negative autocorrelation, whereas Moran’s I calculates the covariance and can distinguish between positive and negative autocorrelation [45, 48].

The measured parameters that show values higher than the allowed threshold such as SO4, Al, and Fe (∼K) all have a very low spatial autocorrelation (Moran’s I < 0.2). Their high concentrations are related to a local process especially for SO4 which is linked to an anthropogenic effect under the urban activity of the Beni Mellal city.

5. Conclusion

In this study, an attempt was made to elucidate variations of groundwater hydrogeochemistry composition as a result of water-rocks interaction and urban activities in Beni Mellal city. The study was carried out in a shallow phreatic aquifer in the piedmont zone between the Atlas Mountains and Tadla plain in Morocco. We can summarize the following conclusions:(i)Total dissolved solid shows large variation from 355 mg/L to 918 mg/L with high values recorded, as electric conductivity, in the city center.(ii)The relative abundance of cations in groundwater within the study area is in the following order: Ca2+ > Mg2+ > Na+ > K+.(iii)High sulfate content is intercepted also in the old city center with values exceeding the threshold in the Moroccan guideline. Sulfate ions are often suspected of having an anthropogenic origin.(iv)The relative abundance of anions in Beni Mellal groundwater is as follows: HCO3 > SO42− > Cl > NO3.(v)All water samples plot along the lines Ca-Mg and HCO3-SO4 with a dominance of Ca against Mg (Ca/Mg: 1.08–6.25) and HCO3 against SO4 (HCO3/SO4: 0.29–6.92). Clearly, there is high variation in cation proportions; the water is calcium-magnesium water mass.(vi)For most of the trace elements, the measured concentrations were far below the standard values except Al and Fe in some samples which exceed all guideline values.(vii)PCA of all datasets highlights eight factors with eigenvalues higher than 1 that explained about 80.34% of the total variance. The first two components PC1 and PC2 explained about 41.14% of the total cumulative variance and were responsible for 24.25% and 16.89% of the variance for each one, respectively. The component PC1 is mostly correlated with electric conductivity, TDS, and chloride. The component PC2 was highly correlated with Ca, Cr, and Zn.(viii)The dendrogram at a linkage distance of about 10.5 leads to dividing the diagram into three clusters of water samples, C1, C2, and C3. Cluster C1 shows a medium content of EC, HCO3, and NO3 and low content of TDS, Ca, Mg, Na, K, SO4, and Ba compared with C2 and C3. C1 samples show the lowest ion content, resulting probably from the minimal time of residence within the aquifer with low rock interactions. Cluster C2 regroups samples with high content of Ca, Mg, K, SO4, Al, and Cr, medium content of TDS and Na, and low content of EC, HCO3, NO3, and Cl. Samples in cluster C3 have more content of heavy metals (Cd, Fe, Mn, and Ni), CE, TDS, Ca, Mg, Na, HCO3, NO3, and Cl with low content of Cr and Al and medium values of K and SO4.

The hydrochemical variability observed in shallow groundwater of Beni Mellal can be due to two factors. The first one is natural, such as the rock-water interaction, which is more influenced by residence time. This time is very short considering the continual feeding of the piedmont aquifer by the waters of the Atlasic karstic system. The second is anthropic, which is related to diffuse pollution especially in the city center. To remedy this last factor, it is necessary monitor water quality and an adequate planning of the basement of the old Medina of Beni Mellal.

By applying spatial autocorrelation, we conclude that groundwater parameters varied differently according to the direction, which means that the semivariance depended on direction and distance between samples. The combination of the variogram and Moran’s I makes it possible to highlight the most space-dependent parameters. Almost all elements show a dependence of space except the Mg.

Data Availability

The data used to support the findings of this study are included in Table 1.

Conflicts of Interest

The authors declare that they have no conflicts of interest.