Introduction

In arid and semi-arid regions, groundwater is the primary supply for drinking, irrigation, and other uses. According to data from the Food and Agriculture Organization (Global Food Problems and the Role of Irrigation, n.d.) groundwater is used for irrigation in more than 50% of the world. It produces more than 60% of the food produced globally. Groundwater quality is crucial because it affects human health, the environment, aquatic life, and long-term economic growth. To properly plan and manage groundwater resources, an assessment of the geochemical state of the groundwater is necessary (B et al. 2019). The type of rock that forms the aquifer, the period of time that water stays in the hosted aquifer, the groundwater’s origin, and the groundwater’s flow directions are some of the variables that affect groundwater geochemistry (Djebassi et al. 2022). This study focuses on the Tebessa-Morsott alluvial aquifer, which is a stressed aquifer that supports many urban centers and cities with a population of about 150,000 people (Boufekane et al. 2022). It is situated in a semi-arid environment. The aquifer is currently under threat from a variety of pollution sources, including small-scale industrial operations in the area and domestic water flows into the aquifer without any kind of treatment or controls to preserve the water supply. Indeed, several kinds of studies have focused, especially on the Tebessa region (Boufekane et al. 2022; Drias et al. 2022; Fehdi et al. 2016; Rouabhia et al. 2009a, b; Seghir 2014) in an effort to better understand its hydrogeological and hydrochemical features as well as identify the source of groundwater mineralization. Indeed, none of them have used the water quality index (WQI) and irrigation water quality index (IWQI) to assess the quality of the groundwater. In light of this and to increase interest in the Tebessa region’s water resource research, the current study aims to assess the water’s quality for irrigation and consumption as well as deepen our knowledge of the mechanisms underlying the alluvial aquifer’s mineralization and its suitability for drinking and irrigation purposes. This will be accomplished by interpreting the physicochemical analysis data that has been gathered from the study area. This research is a first in the field, evaluating groundwater quality using geographic variability of groundwater hydrogeochemical parameter assessment for domestic use based on WQI, IWQI, nitrate pollution index (NPI), and geographic information systems (GIS) technique.

The evaluation of environmental issues and natural resource access, particularly groundwater, has been considerably facilitated by the application of GIS technology (Khan et al. 2011). When it comes to determining water availability, solving problems related to water resources, and managing water resources at the local or regional level, GIS can be an extremely powerful tool (Ketata et al. 2012; Shabbir and Ahmad 2015). When used with GIS, the groundwater quality evaluation aids in defining the regions impacted by groundwater contamination. According to (Adhikary et al. 2012), groundwater planning and management techniques may require accurate information about the current groundwater quality scenario, which can be acquired via GIS.

Many researchers throughout the world use the DWQI, an efficient method for assessing the potability of water consumption for a particular purpose (Bawoke and Anteneh 2020; Dhaoui et al. 2023; El-Aziz 2018a, b; Kharroubi et al. 2022). It is a useful as well as effective way to determine the quality of water and if it is suitable for human consumption.

The WQI technique converts data from a wide range of indicators of water quality into a single score that is simple to explain to the general public and those who make decisions about water quality. Studying parameters that affect soils and plants, such as electrical conductivity (EC), sodium adsorption ratio (SAR), sodium percentage (Na%), residual sodium bicarbonate (RSBC), potential salinity (PS), magnesium hazard (MH), Kelly ratio (KR), and permeability index (PI), allowed for the evaluation of the irrigation water quality index(El-Aziz 2018a, b). Furthermore, IWQI is recognized as an improved strategy that employs a set of indicators and reduces water quality to a single value (Saeedi et al. 2010). Employing classical hydrogeochemical techniques like Piper diagrams, Gibbs, and ion ratio plots allowed for the identification of the processes governing the mineralization of the alluvial aquifer waters.

The primary goals of this study were to: (1) identify the hydrochemical properties of the groundwater; (2) apply the DWQI to map the groundwater quality and assess drinking water parameters using the GIS approach; (3) classify and assess the irrigation water quality parameters; and (4) enhance our understanding of the mechanisms underlying the mineralization of the alluvial aquifer in Tebessa region. Additionally, it assists the government in conserving the financial resources allocated for the sector’s rescue. However, it is also critical to understand whether the water quality meets drinking standards since this information aids in putting the right policies in place to prevent the spread of diseases that are harmful to human health and even mortality.

Materials and methods

Study area

The Tebessa-Ain Chabro Plain is a part of the large Tebessa-Morsott Plain that is situated 650 km southeast of Algiers, the country’s capital, in northeastern Algeria (Fig. 1). It covers the whole of the Oued Ksob sub-basin as well as a section of the vast Medjerda watershed, which is categorized as basin number 12 in the orohydrographic delimitation that the National Water Resources Agency (ANRH) has suggested. It is associated with a considerable, closed depression that spans 600 km2 and extends in the NW–SE direction (Drias et al. 2020; Fehdi et al. 2016; Kowalski et al. 2002). The study area is located between UTM coordinates: 235,000–262000 N and 975,000–1012000 E (Fig. 1). This data, based on satellite photos that were collected from https://earthexplorer.usgs.gov/ used to extract the digital elevation model (DEM), field observations, and topographic map; ArcGIS 10.8 software was used to process the model domain. This area is encircled by mountains that range in elevation from 1626 to 700 m above sea level (Fig. 1). We mentioned the following mountains: Djebissa (1120 m), located in the southeast; Dyr (1471 m) in the north; and Anoual (1545 m) in the south. On the other hand, the plain stands out for having a relatively level surface with elevations ranging from 950 to 700 m above sea level at the south, east, and west borders from the study area’s center and north. This results in a modest slope (average of 0.25%) that encourages runoff toward the depressions and rivers. Wadi El Kebir and Chabro collect all surface runoff waters from the northern, southern, and eastern areas of the plain, and then discharge the water into the Wadi Ksob River. Based on DEM, a maximum drainage density value of 1.11 km/km2 was observed in the Bekkaria zone along the Wadi El Kebir River. An important alluvial aquifer can arise because of this morphology (Fig. 1). The study area has a semi-arid climate, with dry summer months (June to August) and wet winter months (November to May).

Fig. 1
figure 1

Tebessa-Ain chabro plain area: a geographical location; b Tebessa-Morsott watershed elevation map; c simplified geological map of the Tebessa-Ain Chabro watershed area including the spatial distribution of groundwater samples from wells (P) and boreholes (F)

The average annual temperature is 17 °C, and there is approximately 380 mm of precipitation. Approximately 650 mm of water evapotranspiration every year. Seasonality is also seen in other climate characteristics, including wind speed and evaporation. In particular, the humidity rate ranges from 18 to 76%, and the wind speed varies from 3.2 m/s to 1.9 m/s between winter (December) and summer (August) (Djebassi et al. 2022; Drias et al. 2022; Fehdi et al. 2016).

Geological and hydrogeological frameworks

According to (Vila 2001), the geological structures are made up of a sequence of anticlines and synclines that were formed by Cretaceous formation. This depression has passed through four stages: the first in Lower Villafranchien (Upper Pliocene), the second in Upper Villafranchien (Lower Pleistocene), the third at the end of Middle Pleistocene, and the fourth one at the end of Upper Pleistocene.(Kowalski et al. 2002). The majority of the research region was made up of cretaceous limestone deposits, which created an organization of anticlines and synclines. Recent alluvial deposits, gravels, conglomerates, sandstones, and other materials are described as the plio-quaternary and quaternary formations in the central region. The stratigraphic column analysis identified three aquifer formations The shallow aquifer under study is bounded to the east and west by two large faults that are oriented NW–SE, and it covers the majority of the Tebessa tectonic depression covered by the plio-quaternary formation (Fig. 2). The Mio-Pliocene alluvium is composed of gravels encased in an argillaceous matrix that surpasses 350 m in specific locations (Seghir 2014). For the main sources of recharge, the aquifer primarily receives water from deeper aquifer specifically the Cretaceous formation through faults.(Drias et al. 2022; Rouabhia et al. 2009a, b); precipitation in the form of rainfall and other minor sources contributing to the overall recharge of the aquifer, such as localized groundwater flow from adjacent areas or surface water bodies. Additionally, human activities, such as irrigation or groundwater pumping, can also influence the recharge dynamics of the aquifer. In a simple analysis of the piezometric map (Fig. 1), the piezometric level varies between 890 and 760 m. The isopiezes curves can be analyzed to identify two main flow paths. The first direction runs parallel to Wadi El Kebir’s path, from southeast to northwest. The second direction runs from El Hammamet to Morsott, starting from the south and moving north. The isopiezes curves in the center region show regular spacing, suggesting a homogenous flow pattern. Moreover, the flow axes diverge toward the southeast, suggesting recharge from the Djebissa mountain. As one moves toward the center of the plain, the isopiezes curves tighten, indicating a rising slope of the piezometric surface and comparatively high hydraulic gradient.

Fig. 2
figure 2

Hydrogeology setting: a Piezometric map (February 2022) including the cross-sectional boreholes’ location; b Study area cross section based on boreholes lithology logs

Water sampling collection and analysis

In February 2022, twenty-nine samples were collected in a one-liter plastic bottle (Fig. 1). The bottles are thoroughly rinsed with the sampled water and completely refilled to empty the volume in the bottle. After ten minutes of well pumping, the samples were taken straight from the well. Before being transferred to the lab for analysis, the samples were kept in their original conditions in a field refrigerator (< 5 °C) to avoid chemical and biological deterioration (Saha et al. 2019). A cellulose acetate filter size of 0.45 mm was used to filter the samples. Using Handfield’s GPS device (Garmin), the locations of the wells and boreholes were determined. The samples were submitted to physicochemical examinations in compliance with the guidelines provided by (Rodier et al. 2009) (Table 1). The in situ measurement of physicochemical parameters, such as temperature, pH, and electrical conductivity (EC), using a multimeter (Hach HQ40d) connected to an electrode submerged in a 3 mol/l potassium chloride (KCl) solution and calibrated using a standard solution and manual user instructions. Using HCl as the standard solution, the bicarbonate was measured using the titration method. The chemical parameters were measured at the University of Ouargla’s Sahara geology laboratory (LGS). These analyses are carried out according to four methods: The gravimetric method for sulfate ions SO42−and the flame atomic emission spectrometry method: using a Janeway flame photometer. It is a flame photometer of emission at low temperatures intended for the simultaneous determination of Sodium, Na + , Potassium K + , and Calcium Ca2+. The colorimetric titration method is for the determination of the water hardness TH (Ca2+ + Mg2+) and bicarbonate (HCO3). The potentiometric method is used for the determination of chloride ions (Cl) using the Titrino 716 apparatus. The NO3 and PO4 were measured using the Multiparameter and Photometer HANNA HI 83099 COD in a private control quality laboratory in Tebessa (Ministerial authorization for expertise N: 10,476/16 of 03/23/2016).

Table 1 Physicochemical analysis results

Accuracy of analytical results

Testing the ion balance while accounting for the fact that water is electrically neutral in theory is part of assessing the validity of the results. Consequently, cations’ total chemical equivalents must be equivalent to anions’. (Semar et al. 2013). It is important to note that a water chemical analysis is deemed representative only when the ionic balance is 10% or lower. The following formula (Eq. (1) determines the calculation of the ionic balance (Eq. (1)):

$$BI = \frac{{\Sigma \left[ {{\text{Cations}}} \right]{-}\Sigma \left[ {{\text{Anions}}} \right]}}{{\Sigma \left[ {{\text{Cations}}} \right] + \Sigma \left[ {{\text{Anions}}} \right]}} \times 100\,,\;\left( {{\text{Akoteyon}}\;{2}0{13}} \right)$$
(1)

where Σ [Cations] is the sum of the cations and Σ [Anions] is the sum of the anions (meq/l), and BI is the ionic balance given as a percentage. For each of the 36 analyzed samples, the ionic balance was computed. It is observed that 80% of the samples have an ionic balance (BI) within the range of −5% to + 5%, indicating acceptable quality of the analyses. Additionally, 100% of the wells have a BI within the range of −10% to + 10%, which is considered high but still falls within an acceptable range. (Fig. 3).

Fig. 3
figure 3

Methodology adopted flow chart

Drinking water quality index (DWQI)

In the traditional method, the acceptable quality of groundwater for consumption was evaluated by comparing the acquired results for various physicochemical parameters with the values of the World Health Organization’s (World Health Organization, 2022) drinking water guidelines, hydrogeochemical facies (Piper trilinear diagram) and Gibb’s diagram. The World Health Organization Standards (WHO 2011) were compared to the water quality index (WQI) in order to initially evaluate the chemical quality of the water supply. In the United States, (Horton 1965) created the water quality index approach at first. Following that, it was extensively used and approved in a variety of global contexts. Weights to individual parameters were used as the foundation for the new WQI that (Brown et al. 1972) developed. Variety of researchers and experts have recently proposed many modifications to the WQI concept (Das Kangabam et al. 2017; Ewaid et al. 2020; Mukate et al. 2019). For the calculation, a total of twelve parameters: pH, EC, TDS, Ca2+, Mg2+, Na+, K+, HCO3, Cl, SO42−, NO3, and PO43−, were used. DWQI computation requires four steps, each of which is described in detail as follows:

Step 1 Based on their relative significance in the overall quality of the water suitable for drinking, each of the 12 characteristics has been given a weight (wi) (Table 2). Total dissolved solids (TDS) and nitrate (NO3) are two characteristics that have been given a maximum weight of five because of their significance in the evaluation of water quality (Srinivasamoorthy et al. 2008). While phosphate (PO43−) has little effect on evaluating of water quality, particularly in the study area, it is assigned a minimal weight of 1. The remaining factors were given a weight ranging from 1 to 5, based on the importance they contributed to the total water quality for drinking;

Table 2 Descriptive statistics for the physicochemical parameters

Step 2 Using the weighted arithmetic index approach described below (Brown et al. 1972), the relative weight (Wi) is calculated using the following formula (Eq. (2)):

$${\text{Wi}} = \frac{{{\text{Wi}}}}{{\mathop \sum \nolimits_{i = n}^{n} {\text{Wi}}}}$$
(2)

where n is the number of parameters, wi is the weight of each parameter, and Wi is the relative weight.

Step 3 Using the WHO (2011) standards, each parameter’s quality rating scale (Qi) is assigned by dividing its concentration in each water sample by the corresponding standard and then multiplying the result by 100 (Eq. (3)):

$${\text{Qi}} = \frac{{{\text{Ci}}}}{{{\text{Si}}}} \times 100$$
(3)

where Ci is the concentration of each chemical characteristic in each water sample and Qi is the quality rating sample in mg/l, and Si is the drinking water standard (WHO, 2011) in mg/l for each chemical parameter in accordance with (Table 3). The pH is estimated by Eq. (4)

$$Q_{{{\text{pH}}}} \frac{{\left( {C_{{{\text{pH}}}} - 7} \right)}}{{\left( {8.5 - 7} \right)}} \times 100$$
(4)
Table 3 calculated relative weight (Wi) for each parameter of the groundwater samples based on (WHO 2011) From: (Bawoke and Anteneh 2020)

The fourth step involves determining the sub-index (SI) for each chemical parameter. This information is then used to calculate the WQI using the formula (Eq. (5):

$${\text{SIi}} = {\text{Wi}} \times {\text{Qi}}$$
(5)

where SIi is the sub-index of the ith parameter and Qi is the rating based on concentration of the ith parameter. The DWQI was calculated by summing the SIi values of each groundwater sample (Table 4) (Eq. (6).

$${\text{DWQI}} = \Sigma {\text{SIi}}$$
(6)
Table 4 Calculated of sub-index (SI) for each parameter and WQI using Eq. (6)

Nitrate Pollution Index (NPI)

Globally, one of the main causes of groundwater contamination is nitrate pollution. A simple nitrate pollution index (NPI) is used to measure the amount of nitrate contamination in groundwater. Equation (7) is used to calculate the value of NPI.

$${\text{NPI}} = \frac{{{\text{Cm}} - {\text{Cs}}}}{{{\text{Cs}}}}$$
(7)

The nitrate concentration (Cm) of water samples is measured using the equation for calculating NPI, and it is compared to the threshold value (Cs) caused by human activity, which is advised to be 10 mg/l (Spalding and Exner 1993). Following that, the NPI can be categorized into one of five levels (El Mountassir et al. 2022; Wang et al. 2023), each of which has a grading that is comparable to it and is shown in Table 5.

Table 5 Classification of computed water quality evaluation index and results statistics in the study area

Suitability of water quality for agricultural use

The water quality was evaluated to determine whether the water supply was suitable for crop irrigation. Every crop need water, but only within a specific range of physicochemical conditions. The subsequent water quality analysis findings were used to calculate the irrigation water parameters. There may be consequences if the crop’s water needs are not met, including poor development and quality (Moharir et al 2019). The irrigation water quality was evaluated using the parameters listed below.

Sodium adsorption ratio (SAR)

SAR evaluates the quantity of sodium (Na) in the water extracted from saturated soil paste in relation to calcium (Ca) and magnesium (Mg). As on the Agricultural Council of America’s SAR hazard chat, a water supply that is suitable for irrigation has a SAR value of less than 3 meq/L. To compute SAR, Eq. (8) was used.

$${\text{SAR}} = \frac{{{\text{Na}}^{ + } }}{{\sqrt {\frac{{{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } }}{2}} }}$$
(8)

Magnesium adsorption ratio (MAR)

An essential chemical need prior to using the water resource for irrigation is the MAR. This phenomenon characterizes the undesirable state of the Ca-Mg equilibrium. In this condition, the soil loses its quality and becomes more alkaline (Haritash et al. 2016). Eq. (9), which is given in meq/L, defines MAR.

$${\text{MAR}} = \left( {\frac{{{\text{Mg}}^{2 + } }}{{{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } }}} \right) \times 100$$
(9)

Soluble Sodium percentage (SSP) and Kelly’s ratio (KR)

The SSP and KR are taken into account in the research domain while defining the suitable use of groundwater for irrigation in agriculture. The use of Eqs. (10) and (11), in that order.

$${\text{Na}}\% = \frac{{\left( {{\text{Na}}^{ + } + {\text{K}}^{ + } } \right)}}{{\left( {{\text{Na}}^{ + } + {\text{K}}^{ + } + {\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } } \right)}}$$
(10)
$${\text{KR}} = \frac{{{\text{Na}}^{ + } }}{{\left( {{\text{Na}}^{ + } + {\text{Mg}}^{2 + } } \right)}}$$
(11)

Permeability index (PI)

The evaluated rates of vertical water movement from the ground surface through the unsaturated zone—the area between the water table and the land surface—are classified qualitatively by the PI. The long-term effects of irrigation on the permeability of the soil are what (Doneen, 1962) characterizes as the permeability index. Based on the following Eq. (12):

$${\text{PI}} = \left( {\frac{{{\text{Na}}^{ + } + \sqrt {{\text{HCO}}^{3 - } } }}{{{\text{Na}}^{ + } + {\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } }}} \right) \times 100$$
(12)

Potential salinity (PS)

Potential salinity is the determination of the risks of excessive salt concentrations due to the existence of Cl and SO42−, which can enhance the osmotic capacity of the soil solution when the soil’s total moisture content is below 50% (Delgado et al. 2010). Eq. (13).

$${\text{PS}} = {\text{Cl}}^{ - } + \frac{1}{2}{\text{SO}}^{2 - }$$
(13)

Residual sodium carbonate (RSC)

The RSC parameter, which shows the connection between weak acids and alkaline earth minerals found in groundwater, is used to assess the adequacy of irrigation water quality. Equation (14) (Eaton 1950) can be used to compute RSC values. Prolonged use of irrigation water with high RSC values can seriously harm alkali and have a detrimental effect on agricultural production. Consequently, while choosing water for agricultural irrigation, RSC values must be taken into account.

$${\text{RSC}} = \left( {{\text{HCO}}_{3}^{ - } + {\text{CO}}_{3}^{ - 2} } \right) - \left( {{\text{Ca}}^{2 + } + {\text{Mg}}^{2 + } } \right)$$
(14)

Irrigation water quality index (IWQI)

Electrical conductivity (EC), sodium adsorption ratio (SAR), sodium ion concentration (Na+), chloride ion concentration (Cl), and bicarbonate ion concentration (HCO3) are the five water quality parameters that were used to calculate the IWQI (Meireles et al. 2010; Aragaw and Gopalakrishnan 2021). Prior to beginning data analysis, the concentration units were converted using the conversion factors provided by (Lesch and Suarez 2009) from [mg/l] to [meq/l].

This stage assessed the IQWI, calculating the cumulative witness Wi and the water quality measurement parameter values qi. The factors for irrigation water quality and their suggested limiting levels are summarized in Table 6 (R. S. Ayers and Westcot, 1994; Meireles et al. 2010; Aragaw and Gopalakrishnan 2021; Batarseh et al. 2021). The qi value was computed using Eq. (15).

$${\text{qi}} = \left( {{\text{qi}}} \right)_{\max } - \left[ {\left( {X_{ij} - X_{{{\text{inf}}}} } \right) \times \frac{{\left( {{\text{qi}}} \right)_{{{\text{amp}}}} }}{{X_{{{\text{amp}}}} }}} \right]$$
(15)

where the \(\left( {qi} \right)_{\max }\) indicates the highest value of qi in the grading range that is given to the ith parameter. The lowest limit of the grading interval assigned to the ith parameter is represented by the variable \(X_{\inf }\), and the actual value of the ith sample for the ith parameter is represented by the variable \(X_{ij}\). The range of qi for the ith parameter, which is determined as the difference between the maximum and minimum value of qi within the grading range for that parameter, is referred to as \(\left( {qi} \right)_{{{\text{amp}}}}\). The ith parameter’s grading range in \(X_{{{\text{amp}}}}\) is referred to as \(X_{{{\text{amp}}}}\) is the difference between the highest and lowest values of that grading range is used to calculate it. But in the event when \(X_{ij}\) is more than the maximum graded upper limit, the difference between \(X_{ij}\) and the maximum graded higher limit is used to calculate \(X_{{{\text{amp}}}}\). In this case, the highest value obtained in the physicochemical analysis of the irrigation water samples was used as the upper limit for \(X_{{{\text{amp}}}}\) of the last class of any parameter.

Table 6 Parameters of irrigation water quality and suggested limitation values (Meireles et al. 2010)

Equation (15) was utilized to obtain the qi values for the five water quality parameters, which are qEC, qSAR, qNa+, qCl, and qHCO3. According to the value and impact of every parameter on the quality of irrigation water, Meireles’ model calculated the weighting value (Table 7). The IWQI is calculated by the formula below (Eq. (16)).

$${\text{IWQI}} = \mathop \sum \limits_{1}^{n} {\text{qi}} \times {\text{wi}}$$
(16)
Table 7 IWQI parameters weights according to (Meireles et al. 2010)

In this case n = 5. (Table 8) shows the results of the IWQI and the individual irrigation water quality parameters values.

Table 8 calculated of sub-index (SI) for the 5th water quality parameters and IWQI values

The IWQI can be used to estimate irrigation in five distinct classes (Table 5). Based on the criteria established by Ayers and Westcot (1999) (Table 6), the factors were deemed more important to the irrigation use.

GIS approach

The digital elevation model (DEM) was used for watershed delineation, extraction of stream networks, and characterization of watershed topography (elevation map, slope map, and aspect map) by using watershed tools in GIS software(Ni et al. 2010). The Shuttle Radar Topographic Mission (SRTM) DEM data with a resolution of 30 m for the study area were downloaded from the USGS Earth explorer web site.

The GIS environment was used by establishing a database geographically referenced to the UTM-Nord_Algerie_Ancienne projection. For mapping the spatial distribution of the water quality parameters in the study area, one of the most used techniques for interpolation is the inverse distance weighting (IDW), which is reserved. By measuring the values surrounding the projected place, it is utilized to forecast the value of each unmeasured location (Ajaj et al. 2018). It is mainly predicated on two suppositions: First, the near control point is directly influenced by the unknown value of a point than is the far point. Second, the degree of influence of a point is proportionate to the inverse of the distance between points. (Ajaj et al. 2018; Diongue et al. 2022).

Statistical analysis methods

The data collected in the field and the laboratory have been analyzed using descriptive and multivariate statistical methods which in turn allows for the recognition of eigenvalues and total variance through ϖϖcomponents analysis (PCA) and hierarchical clustering analysis (HCA). Several statistical software programs such as R studio and SPSS have been used to perform statistical analyses of the samples’ mean, maximum, and minimum hydrogeochemical parameter values. Additionally, this statistical software has created a correlation matrix to show the relationship between the hydrogeochemical variables. for groundwater variation detection and water type classification. (Table 9 and 10).

Table 9 Descriptive statistics of the four principal water clusters
Table 10 Factor loading matrix and IWQI weights for each parameter of PCA

Water geochemical modelling

To identify the probable source of the main components causing water salinization, the Gibbs diagram (1970) was employed. Furthermore, the Piper diagram was employed to ascertain the sorts of water. The lithological makeup of the reservoir and the local climate of the study area were taken into consideration when making this combination.

A simulation was done using the PHREEQC algorithm (Parkhurst et al., 1999) in order to understand the development of water chemistry via groundwater flow. The speciation of these minerals was taken into account when computing the saturation indices (SI) of dissolved minerals in water with this simulation. (Appelo and Postma, 2005) mentioned that this also enabled the evaluation of water’s saturation state, which regulates the chemical and the equilibrium conditions with solid phases.

At a specific temperature, the saturation index (SI) is defined as the logarithmic ratio of the ionic activity products (IAP) to solubility product (Ksp). (Eq. (17).

$${\text{SI}} = \log \frac{{{\text{IAP}}}}{{{\text{Ksp}}}}$$
(17)

The water–rock stability is typically reached when IS = 0. According to (Yidana and Yidana 2010), if IS < 0, the water is insufficiently saturated and requires the dissolution of minerals in order to achieve equilibrium. As a result, the minerals regulate the chemistry of these waters. If IS > 0, the water becomes highly saturated and requires the precipitation of minerals.

Results and discussion

Physicochemical parameters statistical analysis and water quality

Descriptive statistical analysis and correlation matrix

Based on the descriptive analyses of the physicochemical results (Tables 1 and 2), Fig. 4a and b, the groundwater’s low alkalinity is shown by the pH levels, which ranges from 6.46 to 8.3, with a mean of 7 and a standard deviation of 0.38. The temperature of the waters varies between 13.5 and 20.3 °C, with an average of 17.26 °C and a standard deviation of 1.7 °C. The electrical conductivities (EC) of these waters varied from 933 to 8680 μS/cm, with an average of 3186 μS/cm/l and a standard deviation of 2550 μS/cm; 97% of the EC values are outside the (WHO 2011) potability standard (1000 μS/cm). For major cations (Ca2+, Mg2+, Na+, and K+), Na+ ions are the most predominant and vary between 44.3 and 1019.3 mg/l, with an average of 246 mg/l and a standard deviation of 278 mg/l. Next comes the Mg2+ ions with a variation of 40 to 321 mg/l, an average of 120 mg/l, and a standard deviation of 80 mg/l. Ca2+ ions occupy the third position and varied between 27 and 277.1 mg/l, with a mean of 134 mg/l and a standard deviation of 81 mg/l. K+ ions occupy the last position and vary from 1.7 to 48.9 mg/l, with a mean of 7.9 mg/l and a standard deviation of 8.7 mg/l. Concerning the major anions (HCO3, Cl, SO42−), Cl ions predominate and varied from 74.2 to 1565.6 mg/l, with a mean of 449.5 mg/l and a standard deviation of 482 mg/l. Next comes SO42− ions with a variation of 28.8 to 1179.2 mg/l, a mean of 330 mg/l and a standard deviation of 330 mg/l. HCO3 ions occupy the third position and vary from 237.9 to 793 mg/l, with a mean of 418.8 mg/l and a standard deviation of 99.3 mg/l (Fig. 4b).

Fig. 4
figure 4figure 4

a Spatial distribution of major cation, EC and pH in the study area, b Spatial distribution of major anion, and temperature in the study area

Table 11 displays the percentage of linear correlation, as shown by a simple correlation coefficient (r), among any two water quality parameters value and the water quality indices (DWQI, IWQI, and NPI). The values of the EC and DWQI were highly significantly correlated (r = 0.99), Cl(r = 0.98), Ca2+(r = 0.89), Na+(r = 0.88), SO42−(r = 0.93), Mg2+(r = 0.94), and TH(r = 0.94), and moderate correlation with NO3(r = 0.47), however, doesn’t correlated with HCO3 -the bicarbonate don’t affect the water salinity in the study area, r = 0.2 between EC and HCO3. Once DWQI is compared to other parameters and ions, its greatest r value shows that these ions have an impact on the DWQI value. The groundwater pH and HCO3 correlation coefficients have the moderate positive correlation (r = 0.5).

Table 11 Correlation matrix of physicochemical parameters with them, WQI, IWQI, and NPI

Additionally, a highly important and strong positive correlation with r values ranging from 0.94 to 0.87 was discovered between EC, Cl, Ca2+, Na+, SO42−, Mg2+, and TH. Thus, the water’s salinity was demonstrated to be controlled by these ions.

There is a positive correlation between the contents of Ca2+, SO42−, Mg2+, and Na+, with correlation coefficients of 0.9, 0.87, and 0.68, respectively. The strong relationship between calcium and sulfate raises the possibility that weathering of the calcium sulfate mineral (CaSO4) may also contribute to certain levels of the SO42− and Ca2+. A strong correlation (r = 0.87 and 0.92, respectively) between magnesium and sulfate and chloride raises the possibility that parts of the Ca2+ and SO42−may be produced by the weathering of the magnesium sulfate mineral (MgSO4).

Indeed, strong negative correlation between the main previous parameters (EC, Cl, Ca2+, Na+, SO42−, Mg2+, and TH), while the r ranged between (-0.78) and (-0.9), and moderately negative correlation with NO3 ion (r =  − 0.5), indeed, these results are graphically represented in (Figs. 4a and 9), where the hight EC zones are the same as those with SR IWQI class.

The spatial distribution of major anion (Fig. 4a and b) demonstrates a positive correlation between Cl, Na2+ and NO3 owed to leaching of fertilizers, and animal wastes into alluvial aquifer which implies anthropogenic origin (Nkotagu 1996; Noshadi and Ghafourian 2016).

Moderate correlation between NPI, EC and the main ions (Cl and Na+), (r = 0.45, 0.5, 0.47), respectively. This correlation suggests that human activities have an impact on groundwater quality in addition to ion exchange and water–rock contact.

Cluster analysis and water types

By Ward’s method (Ward, 1963), the hydrochemical data were categorized using the hierarchical cluster analysis (HCA) technique in Q mode. 29 individuals and 12 variables (Ca2+, Mg2+, Na+, K+, Cl, SO42−, HCO3, NO3, EC, PO43−, SAR and pH. Following such treatment, the dendrogram (Fig. 5a) revealed that the region’s waters could be divided into four groups, with rising concentrations of electrical conductivity appearing to be a key differentiator across all groups. The Piper diagram’s graphical representation of these four groups enables the classification of the examined water samples by comparing the chemistry of the major ions in groups 1, 2, 3, and 4 (Fig. 6). This graphical tool makes it easier to comprehend the proportions and connections between various ion concentrations, which promotes insightful data analysis and interpretation. The World Health Organization’s standards were also compared to the measurement findings of physicochemical parameters and the descriptive statistics of water samples. This comparison aids in determining if the examined water samples comply with globally accepted norms and requirements for the safe and healthful water quality.

Fig. 5
figure 5

Cluster analysis dendrogram; a Q mode, b R mode

Fig. 6
figure 6

Piper and Durov diagrams for water samples

Nineteen sample points (P2, P4, P5, P6, P7, P8, P9, P10, P16, P17, P18, P19, P20, P21, P22, P24, P25, P26, and P27) make up Group 1, which is represented by “Cluster 1” in Fig. 5a. The group’s mean EC value is 1619.11 μS/cm (Table 9), which indicates low salinity. The major anions are SO42− and HCO3, while the dominant cation is Na+. Consequently, this group belongs to the mixed calcic and magnesian chloride facies (Mix Ca–Mg–Cl) and calcic chloride facies (Ca–Cl) (Fig. 7). They match samples collected close to the sites of recharge, which are the edge reliefs for Lower, Middle and Superior Marine Cretaceous waters (Fig. 1). The majority of the samples are higher than the recommended levels of bicarbonates (120 mg/L) and calcium (75 mg/L) in drinking water (World Health, 2022). Group 2 is represented by “Cluster 2” in Fig. 4a and consists of the water points P14 and P15. These points are indicated of waters with medium salinity (average = 2421 μS/cm, 2082 < EC < 2760 μS/cm), with Na+ and Ca2+ being the predominant cations. Magnesium exhibits an increase in these contents. The largest portion of this group’s anions comprises of bicarbonates (HCO3) and chloride (Cl). The individuals in this group represent the sodic and potassic bicarbonate facies (Na–K–HCO3). This group largely matches samples from the northernmost section of the Dj-Dyr formation carbonate, which explains how limestone formations (rock-water interaction) influence the rise in bicarbonate in this area. Every sample surpasses the WHO guidelines for the elements HCO3, Na+, and K+.

Fig. 7
figure 7

Chadha diagram of the groundwater samples

Group 3, which is represented as “Cluster 3” in (Fig. 4a), consists of three water samples (P23, P28, and P29) that have an average EC value of 5093 μS/cm, indicating that they are high salt waters. Compared to groups 1 and 2, there was an essential rise in the chloride and sulfate levels in this group, where Na+ cations predominated over Ca2+. The predominant anions in this group are chlorides (Cl). This group of members is representative of the mixed calcic and magnesian chloride facies (Mix Ca–Mg–Cl). This group is situated in the northwest, close to the dumpsite. Polluted streams and creeks are the sources of saltwater penetration. Another significant cause of groundwater pollution and increased salt in the water could come from leachate from the outlet of the Wadi El Kebir and Chabro dump site.

The final group, designated “Cluster 4” in (Fig. 4a), is made up of five water samples (P1, P3, P11, P12, and P13), all of which had the greatest salt contents, according to their average EC value of 8008 μS/cm. The levels of chloride and sulfate in this group increased significantly compared to groups 1, 2, and 3, with Na+ cations predominating over Ca2+. Chlorides (Cl) are the main anions in this group. This group of members represents the sodic and potassic bicarbonate (Na–K–HCO3) and calcic chloride facies (Ca–Cl). It is impacted by the eroding and leaching of argilo-gypso-saline Triassic evaporite rocks that are situated east of Tebessa town and near Jebel Djebissa (Fig. 1).

Increased sulfate levels are caused by two factors: fertilizer pollution from continuous cultivation on both sides of the main wadi (El Kebir and Chabro and changes in the facies of the Lower, Middle, and Superior Cretaceous formations, which are becoming more gypsum-rich and clayey.

However, by arranging these sample groups on (Chadha 1999) diagram, we are able to characterize the various types of water and identify the development of the hydrochemical processes that regulate the chemical structure of the groundwater in the study area. The data was plotted on this diagram (Fig. 7), which confirmed the findings of the Piper diagram and showed that the majority of the samples (59%) fall into the field (Ca–Mg–Cl/SO4 reverse ion exchange water type). This type of water is identified as Ca–Mg–Cl type waters, where alkaline earth (Ca2+  + Mg2+) dominates alkalis (Na+  + K+) and strong acids (Cl + SO42+) exceed weak acids (HCO3). On the other hand, 28% belong to the Ca-Mg-HCO3 recharge water. Plotting the remaining 14% of the samples in the field (Na–Cl Sea water) shows that strong acids dominate weak acids and alkalis dominate alkaline earth. It seems that the results from the Piper diagram and the Chadha plot are also similar.

The cluster analysis (R mode) yielded a dendrogram (Fig. 4b) from which we can identify four major variable groups. The first family is formed by the CE, which determines the degree of mineralization in the water; the second family is only composed of HCO3, which identifies the bicarbonate pole; the third family is made up of NO3, K+, pH, PO43−, and SAR, which represent nitrogenous and phosphorus compounds. Groundwater contamination with NO3 and P can come from a variety of sources, including agricultural, urban, and uncontrolled discharges; it can also come from the oxidation and/or decomposition of organic waste linked to human activities, as well as from the degradation of organic waste linked to human activity (G. Soro et al. 2019). This family is related to the diversity of mineralization processes that strongly depend on the pH of the water. The fourth family grouping of major ions has a high concentration (Cl, SO42−, Na+, Ca2+, and Mg +2), this cluster controls the water mineralization and can be affected by two primary sources: the first is natural from water–rock interactions and residence time in the aquifer, and the second source is due to surface inputs by infiltration of urban pollutants generated by human activities.

Principal component analysis (PCA)

The ability of the data for FA/CPA was evaluated through the use of the Kaisere–Meyere–Olkin (KMO) and Barrett’s sphericity tests. Bartlett’s Chisquare χ2 = 435.57, degree of freedom 66, and significance level < 0.001 are the overall results for the data set. The value of Kaiser–Meyer–Olkin (KMO) is 0.657. As a result, we discover that, although our KMO index is average -between 0.6 and 0.7- It is very significant compared to the Bartlett significance threshold (< 0.01). Thus, these tests demonstrate that our data is appropriate for factor analysis. The PCA was applied to determine the main factors that determine of the hydrochemical composition of groundwater in the study area. The data used major ions such as Na+, Ca2+, Mg2+, K+, Cl, SO4 2−, HCO3, NO3, PO43−, as well as EC, pH, and SAR. Table 10 and Fig. 8 exhibit the results of the PCA.

Fig. 8
figure 8

PCA plots. a Factor loadings for PC1 and PC2; b Scree plot

Table 6 presents the different parameters’ contributions to the three major components. 79.75% of the variance was explained by the identified principal components, all of which had eigenvalues larger than 1. PC1 displayed a substantial load of EC, Cl, Ca2+, Na+, SO42−, Mg2+, and SAR and had the largest percentage of variance (52.3%). This implies that the processes of natural mineral dissolution and precipitation have a major influence on these parameters. Given its correlation with most elements, PC 1 can be noticed as an axis defining the groundwater mineralization in the study area. This factor’s defining components originate from a delayed solution that complied with the water–rock contact (Meggiorin et al. 2022).PC2 constituted 17.41% of the overall variance with high pH, HCO3, and NO3. The study area’s high concentration of NO3 may be caused by human activities, including the developing industrial parks and a long history of agricultural practice. The pH and HCO3 are located in the same positive pole, indicating the presence of other source of bicarbonate. The fluctuation of pH in the groundwater maybe caused by the agricultural activity and through fertilizer use. The axis of PC3 represents 10.05% of the total variance; it is determined by K+ and PO43−, The chemical breakdown of silicates, particularly clay minerals, and sylvite (KCl) produces potassium. However, using fertilizer and breaking down animal or waste materials can add both phosphate and potassium to groundwater (Saha et al. 2019).

Drinking water quality index (DWQI)

Groundwater quality directly affects human health, and it is very significant. In accordance with World Health Organization guidelines (WHO 2011), the DWQI was utilized to define the groundwater’s quality status for drinking water consumption. Eleven chemical parameters, pH, electrical conductivity (EC), calcium, magnesium, sodium, potassium, chloride, sulfate, bicarbonate, nitrate, and phosphate, were employed for this evaluation.

As per Table 5, 38% of groundwater samples exhibit good quality, 43% are low-quality but may still be acceptable for consumption, especially in regions with dry climates in which certain salts like sodium, sulfate, and chloride content are less stringent; 10% of samples are extremely poor quality and are not recommended for domestic use in AEP, and 17% of samples are unfit for drinking. The four types of WQI’s spatial distribution are displayed in Fig. 9.

Fig. 9
figure 9

Spatial distribution of WQI and IWQI in the study area

Evaluation of groundwater quality for irrigation

Assessing the quality of irrigation water using fundamental hydrogeochemical indices

The indices shown in (Table 5) and (Fig. 11) were used to assess the groundwater quality for irrigation. Based on the sodium adsorption ratio, 97% of samples are rated excellent (SAR < 10), and 7% are categorized as good. In addition, the permeability index data showed that the water in 94% of the samples was good (PI = 75–25%), with only 3% of samples falling into the poor class and a small fraction (3%) in the poor class. The Kelly index produced similar findings; all samples are deemed suitable for irrigation (KR < 1). However, in 90% of the samples (MH > 50) and 10% of the samples (MH < 50), the risk of magnesium was categorized as inadequate for agriculture. According to the sodium percentage, 7% of the samples are excellent (%Na < 20) for irrigation, 72% are of good quality (20–40), 14% belong to the range suitable for irrigation (40–60), and 7% are doubtful. Based on potential salinity, 14% of the samples are excellent to good for agricultural use (PS < 5), 38% have good to injurious quality (5–10), and 38% are injurious to unsatisfactory (PS > 10) for irrigation. Modeled on the residual sodium carbonates, all samples (RSC < 1.25) can be used for irrigation practices.

According to the classification based on the USSL diagram (Richards 1954) (Fig. 10a), 62% of samples belong to class C3S1, which is defined as water suitable for irrigation of salt-tolerant crops on well-drained or good permeability soils with salinity control. A portion of the 24% was classified as (C4S1, C4S2), which are high mineralized waters with significant sodium levels that may be suitable for irrigating salt-tolerant species as well as well-drained and leached soils. The remaining 14% are not fit for irrigation. Based on EC and the percentage (%Na+) of sodium in water, the Wilcox diagram (Wilcox 1955) (Fig. 10b) indicates that 62% of the samples fall into the good to admissible class, 14% fall into the doubtful to inadequate category, and 24% of the points are unfit for irrigation use. The excessive conductivity and sodium levels in the wells that fall into the “doubtful and inadequate” class indicate high saline levels in the water, which makes it less suitable for irrigation and causes issues when used.

Fig. 10
figure 10

a Classification of irrigation water quality according to (Richards 1954)based on EC and SAR, b Wilcox plot of groundwater

Irrigation water quality index (IWQI)

Four major components were found after performing PCA on a particular collection of physicochemical parameters. EC, Na+, Cl, HCO3, and SAR had the components with higher loadings, demonstrating their significance in evaluating of water quality for irrigation. As a result, the IWQI was calculated using these five values as the primary parameters.

UCCC (Mukherjee et al. 2022) has identified the critical irrigation water characteristics that are defined in Table 6, which was created by Ayers and Westcot. The normalized weights for these particular parameters are listed in Table 7.

The findings in Table 5 and Fig. 9 demonstrate that the study area’s groundwater use for irrigation has detrimental effects on the soil and crops at all scales. Three main categories- severe, moderate, and low restriction- each having a similar percentage (31%)- while seven samples exhibit high restriction class.

Nitrate pollution index (NPI)

High nitrate concentrations can pollute water, and one way to measure this is via the Nitrate Pollutants Index (NPI). The average NPI in this study area is 1.28, with values ranging from -0.03 to 4.8. Due to the higher concentration of nitrate in samples, approximately 3% of samples have no pollution, 34% have low pollution, 48% have moderate pollution, and 13% have high to very high pollution (Table 5 and Fig. 11).

Fig. 11
figure 11

Spatial distribution of fundamental hydrogeochemical indices and NPI

According to the NPI geographical distribution map, most of the samples in the study area are nitrate-contaminated (Fig. 11). Point sources and diffuse sources are the two main categories of nitrate pollution sources in this study area. Open landfills, animal confinement, unprotected septic tanks, and waste dumping sites are point sources that are primarily responsible for the nitrate pollution in the study area. Conversely, widespread sources of nitrate pollution include using organic nitrogen fertilizers, excessive use of synthetic fertilizers, excessive use of pesticides, ongoing sewage system leaks, and irrigation with wastewater.

The health of humans is significantly impacted by an elevated nitrate content in groundwater; newborns and children are especially vulnerable to a condition called methemoglobinemia (Fewtrell 2004; Richard et al. 2014).

Geochemical modeling

The relative significance of the three main natural processes influencing the chemistry of water: (1) atmospheric precipitation; (2) mineral weathering; and (3) evaporation and fragmented crystallization, can be ascertained using the Gibbs diagrams (Gibbs 1970). Eleven groundwater samples plot in the rock dominance field or very near the line of separation between the rock dominance and evaporation dominance fields (Fig. 12). Five samples plot outside the three designated fields, while 13 samples plot inside the evaporation dominance field. Furthermore, samples that fall outside the assigned fields may demonstrate how human activity has impacted the chemistry of the groundwater. (Table 12).

Fig. 12
figure 12

The alluvial groundwater samples presented in the Gibbs diagrams

Table 12 WHO standards, weight (wi), calculated relative weight (Wi) for each parameter the groundwater samples in the area (WHO, 2011)

The interaction between the surrounding rocks and water results in the acquisition of water chemistry. The main mechanism behind this interaction is chemical reactions controlling solution or precipitation.

In general, the tendency of water to dissolve or precipitate is expressed using saturation indices. For carbonate minerals (calcite, dolomite, and aragonite) and evaporate minerals (gypsum, anhydrite, halite, and sylvite), the saturation index (SI) was determined using the PHREEQC geochemical model (Parkhurst et al., 1999).

Figure 13 demonstrates that groundwater is typically oversaturated in most mineral phases, which is most likely what determines the hydrochemical composition. Conversely, the groundwater samples exhibit undersaturation of halite and sylvite, indicating a prolonged period of interaction with the mineral to facilitate its disintegration throughout the groundwater flow path.

Fig. 13
figure 13

Saturation indices of certain formation minerals in the alluvial groundwater

Conclusion

Groundwater is an essential resource for home and agricultural use, and its quality is crucial in evaluating human societies’ health and development. Assessing groundwater quality for irrigation and drinking purposes was the main focus of the current study. This research and its approach improve our understanding of groundwater hydrochemistry in arid and semi-arid regions of the world. There are no previous studies on the region combining the arithmetic and analytical models to compare them with the results obtained and are important and reference for any serious resolution on the region in terms of its environmental and social development and all related to the water resources of the region. This study included 29 groundwater samples from various places to evaluate their qualities. According to Chadha’s plot and the Piper trilinear diagram, 69% fall into the mixed (Ca2+–Mg2+–Cl) water type, 17% into the Na+–K+–HCO3 category, and 14% into the Ca2+–Cl facies.

The findings of our research, which involved comparing the World Health Organization’s potability guidelines(World Health Organization, 2022) with the physicochemical parameters and main ions of the alluvial groundwater aquifer, are of significant importance. The water quality, as determined by the weighted arithmetic water quality index approach (WQI), meets the requirements for portability. However, it is crucial to note that the waters around the town of Tebessa’s northeast and east are extremely hard and extensively mineralized, with main element concentrations frequently exceeding advised levels. The computed values of the water quality index (WQI) range from 77.39 to 420.33, indicating that 38% of samples had good water quality, 34% had poor water quality, and 10% and 17%, respectively, had very poor and unsuitable water quality.

Two methods were used to assess the quality of agricultural water: the first way used irrigation water quality-related potential factors, and the second used the IWQI. The alluvial aquifer waters are categorized as follows: Kelly ratio (good 100%)), EC (doubtful (62%)) and unsuitable for irrigation (38%), SAR (excellent (73%) and good (7%)), Na% (excellent (7%), good (72%), permissible (14%) and doubtful (7%)), PI (excellent (3%), good (94%), and poor (3%)). RSBC (satisfactory (100%)) and MH (suitable (10%) and unsuitable (90%)). As to the findings of the IWQI, 31% of the groundwater samples are classified as severe restriction (SR), 7% as high restriction (HR), 31% as moderate restriction, and 31% as light restriction. According to the irrigation water quality index created for this study, Tebessa Town’s northeast and north have high EC and irrigation water quality SR class, which should only be utilized for salt-tolerant plants. A combination of remote sensing and GIS techniques is also suggested for better knowledge of groundwater’s geographical and temporal variations and availability in the area. Groundwater resources must be sustainably managed and continuously monitored to guarantee long-term usage. This requires preserving the quality of the resource and implementing best practices, especially in land-use planning and agriculture.