Next Article in Journal
Leveraging Advanced Data-Driven Approaches to Forecast Daily Floods Based on Rainfall for Proactive Prevention Strategies in Saudi Arabia
Next Article in Special Issue
Enhancing Photocatalytic Activity with the Substantial Optical Absorption of Bi2S3-SiO2-TiO2/TiO2 Nanotube Arrays for Azo Dye Wastewater Treatment
Previous Article in Journal
Performance of Combined Olive Mills Wastewater Treatment System: Electrocoagulation-Assisted Adsorption as a Post Polishing Sustainable Process
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrated Groundwater Quality Assessment for Irrigation in the Ras El-Aioun District: Combining IWQI, GIS, and Machine Learning Approaches

1
Laboratory of Mobilization and Resources Management, Department of Geology, Earth Sciences and Universe Institute, University of Batna 2—Algeria, Batna 05078, Algeria
2
Centre de Recherche en Aménagement du Territoire (CRAT), Campus Zouaghi Slimane, Route de Ain el Bey, Constantine 25000, Algeria
3
University of Kasdi Merbah Ouargla, Ouargla 30000, Algeria
4
Laboratory of Underground Reservoirs, Oil, Gas and Aquifer, Kasdi Merbah Ouargla University, Univouargla, Ouargla 30000, Algeria
5
College of Engineering, Imam Mohammad Ibn Saud Islamic University (IMSIU), Riyadh 11432, Saudi Arabia
6
College of Science, Imam Mohammad Ibn Saud Islamic University (IMSIU), Riyadh 11623, Saudi Arabia
7
Laboratory of Management and Valorization of Natural Resources and Quality Assurance, SNVST Faculty, Université de Bouira, Bouira 10000, Algeria
*
Author to whom correspondence should be addressed.
Water 2025, 17(11), 1698; https://doi.org/10.3390/w17111698
Submission received: 8 March 2025 / Revised: 23 May 2025 / Accepted: 26 May 2025 / Published: 3 June 2025
(This article belongs to the Special Issue Global Water Resources Management)

Abstract

This study focuses on assessing the hydrogeochemical characteristics and irrigation suitability of groundwater in the Ras El Aioun and Merouana districts, using an integrated approach that combines physicochemical analysis, machine learning (ML), and Geographic Information Systems (GISs). Thirty groundwater samples were collected in June 2023 and subjected to extensive analyses, including major ions (Ca2+, Mg2+, Na+, K+, HCO3, Cl, SO42−), pH, TDS, alkalinity, and hardness. Hydrochemical facies analysis revealed that the Ca-HCO3 type was dominant (93.33%), with some samples exceeding FAO limits, particularly for Na+, K+, SO42−, Cl, Mg2+, and HCO3. Assessment of groundwater irrigation suitability revealed generally favorable conditions based on three key parameters: all samples (100%) were classified as excellent based on the Sodium Adsorption Ratio (SAR < 10), 70% showed good-to-permissible status by Sodium Percentage (Na% < 60), and 83.3% were within safe limits for Residual Sodium Carbonate (RSC < 1.25 meq/L). However, the Permeability Index (PI > 75%) categorized 96.7% of samples as unsuitable for long-term irrigation due to potential soil permeability reduction. Additionally, Total Hardness (TH < 75 mg/L) indicated predominantly soft water characteristics (90% of samples), particularly in the central study area, suggesting possible limitations for certain agricultural applications that require mineral-rich water. GIS-based spatial analysis showed that irrigation suitability was higher in the eastern and western regions than in the central zone. Advanced machine learning algorithms provide superior predictive capability for water quality parameters by effectively modeling complex, non-linear feature interactions that conventional statistical approaches frequently fail to capture. Three ML models—Support Vector Regression (SVR), Random Forest (RF), and Extreme Gradient Boosting (XGBoost)—were used to predict the Irrigation Water Quality Index (IWQI). XGBoost outperformed the others (RMSE = 2.83, R2 = 0.957), followed by RF (RMSE = 3.12, R2 = 0.93) and SVR (RMSE = 3.45, R2 = 0.92). Integrating ML and GIS improved groundwater quality assessment and provided a robust framework for sustainable irrigation management. These findings provide critical insights for optimizing agricultural water use in water-scarce regions.

1. Introduction

Groundwater is a vital resource for agricultural irrigation, especially in arid and semi-arid regions where surface water is scarce. Nevertheless, the increasing intensification of agriculture, the excessive use of fertilizers, agrochemicals, and pesticides, and the high consumption of groundwater have led to significant degradation of water quality, posing a considerable risk to soil health, crop productivity, and water security in the medium and long term [1,2,3,4,5,6]. Groundwater quality is assessed based on hydrochemical indices and various ions such as cations (Ca2+, Mg2+, Na+, K+) and anions (HCO3, Cl, SO42−, NO3) [7]. It is important to note that higher concentrations of sodium contribute to water salinity, exert osmotic pressure on aquatic biota, and can induce hypertension in humans [8]. The quantity and composition of salts present determine the suitability of water for irrigation. Poor-quality water can lead to detrimental effects on soil and plants [9].
Traditional methods of assessing water quality for irrigation rely on physicochemical indicators such as the Sodium Adsorption Ratio (SAR), Permeability Index (PI), and Residual Sodium Carbonate (RSC). The Irrigation Water Quality Index (IWQI) addresses this limitation by integrating multiple parameters into a single, interpretable score [10,11]. Recent advances in Geographic Information Systems (GISs) have further enhanced water quality assessments by enabling spatial interpolation, hotspot identification, and dynamic monitoring [12,13,14,15,16].
Machine learning has proven to be a powerful tool for modeling complex environmental systems, providing highly informative predictions by identifying non-linear relationships in hydrochemical data [16,17]. Algorithms such as Support Vector Regression (SVR), Random Forest (RF), and XGBoost are now widely used for their effectiveness in predicting water quality, especially when combined with GIS for spatial analysis [18,19]. However, few studies have applied this integrated approach to assess the suitability of groundwater for irrigation in regions under heavy agricultural pressure.
Numerous water quality indices have been developed and described in the literature to address this issue and evaluate groundwater quality [20]. In a recent study by [21], the researchers focused on assessing irrigation water quality in the Abu Dhabi Emirate. They established an Irrigation Water Quality Index (IWQI) and utilized GIS-zoning maps to achieve this.
The study aimed to examine various key factors that contribute to the overall quality of irrigation water, such as the Sodium Adsorption Ratio (SAR), electrical conductivity (EC), sodium ratio (%Na), chloride concentration, and Permeability Index (PI). By analyzing these parameters, the researchers identified potential soil-related issues arising from current irrigation practices. Additionally, the IWQI visualization is a valuable tool for decision-makers to identify “Red Zones” characterized by excessive groundwater extraction.
This study investigates the use of machine learning in conjunction with Geographic Information Systems (GISs) to predict and monitor the quality of groundwater in Ras El Aioun, a region heavily reliant on agriculture. GIS enables the spatial analysis and visualization of water quality data, the identification of pollution sources, and the tracking of temporal variations [22,23,24]. Combining the Water Quality Index (WQI) with GIS-based techniques enhances the assessment of groundwater quality through advanced analytics. Machine learning models further improve the accuracy of predictions by uncovering complex hydrochemical patterns and offering a robust framework for the sustainable management of water resources. The proposed approach can be replicated in other groundwater-vulnerable regions.

2. Materials and Methods

2.1. Study Area

The Ras El-Aioun Plain is located in the Hodna Basin, in the eastern part of Algeria, approximately 100 km northwest of Batna. It covers an area of 265 km2 and is geographically bounded by several prominent mountain ranges. To the north lie Kef El Bioud and Dj. Tazila, to the northwest are Dj. Guetiane and Dj. Azekkar, and to the southwest Dj. El Gues forms a natural boundary. The region has a semi-arid climate, with an average annual precipitation of 417.7 mm, significantly lower than the evaporation rate of 688.17 mm. This creates an agricultural rainfall deficit of 1044.25 mm, making groundwater irrigation essential for agricultural activities.
Agriculture in the region relies heavily on irrigation, with crops such as cereals, legumes, and vegetables predominant. However, water scarcity and the increasing use of groundwater for irrigation have put considerable pressure on the aquifers in the area, leading to concerns over the long-term sustainability of groundwater resources.

2.2. Geology and Hydrogeology

The Hodna Mountains form the northern outcrops surrounding the study area, with anticlines sheltering Jurassic limestone and dolomite formations. These geological structures serve as a natural barrier, separating the Setifian region to the north and east, where the Hodna River originates from the Belezma Mountains. The Hodna massifs, including Boutaleb, Guetiane, Hadjar Labiod, and Foural-Talkhempt, extend from west to east [25]. To the southeast of the study area lies the northern part of the Belezma Mountains, particularly the Bou Ari area. This area is notable for its hydrogeological significance and consists of sediments from the lower Cretaceous period. The boundary of Djebel Bou (Figure 1) Ari is characterized by a hydraulic gradient of approximately 3%, which influences the region’s groundwater reserves. The Ras El-Aioun Plain, or Synclinal of Oud Chair, is oriented in a NE–SW direction, marked by the upper Pliocene detrital formations that form the relief of Djebel Gues, which is located south of Djebel Guetiane. Jurassic Mestaoua-Messaouda formations have eroded the structure to the east, while Miocene deposits are found along the northern flank near Djebel Guetiane [26]. Above these, Albian limestone marls form an impermeable layer, while marly sandstone and Aptian limestone outcrop along the anticline from Belezma to Dj. Fourhal and Dj. Tazila. These fissured limestone sandstones are confined aquifers, suggesting significant groundwater potential around 140 m northwest of the Tazila anticline foothills.
Additionally, the Mio-Plio-Quaternary aquifer interacts with these calcareous layers. Lithostratigraphic analysis in the southern study area reveals two distinct aquifer systems: a 700 m thick fractured carbonate sandstone formation of Barremian age and a 250 m thick Mio-Plio-Quaternary alluvial unit characterized by interstitial porosity [27,28]. Groundwater chemistry in these aquifers is governed by competing hydrogeochemical processes, including carbonate dissolution, evaporite precipitation, and cation exchange reactions, which collectively control water quality evolution in production wells. The region’s agricultural sector, dominated by water-intensive cereal, legume, and vegetable crops, accounts for over 80% of groundwater abstraction. This demand, compounded by recurrent droughts and inadequate recharge, has led to unsustainable extraction, with observed piezometric declines of 1.5–2 m per year. Such over-exploitation threatens both aquifer sustainability and water quality, particularly through emerging saltwater intrusion in coastal areas, requiring urgent water management interventions.

2.3. Groundwater Sampling and Analytical Procedures

To assess water quality in the Ras El Aïoun plain, 30 water samples were collected from different sites distributed across the districts of Ras El Aïoun and Merouana, during the period of May–June 2023. Samples were rinsed and preserved in plastic bottles, and domestic and agricultural boreholes were pumped for 15 min before sampling. The samples were analyzed in the Chemistry Laboratory of the University of Batna 2, in accordance with the standardized procedures described in Rodier [29]. The physical and chemical parameters examined included pH, Total Hardness (TH), electrical conductivity (EC), and the concentrations of Mg2+, Ca2+, K+, Na+, HCO3, Cl, and SO42−. The concentrations of Ca and Mg were determined using the complexometric EDTA titration method. Chloride (Cl) was measured using the Mohr method, while sulfate (SO42−) was analyzed through conductimetric titration. Potassium (K+) and sodium (Na+) concentrations were measured using a flame photometer, and Bicarbonate (HCO3) was evaluated using the method of titration. Data collected in (mg/L) were converted to (meq/L).
To calculate the analytical error for each water sample, we divided the total cation and anion concentrations by the ratio of the difference between their sums. The inaccuracy in the ionic charge balance should be limited to a maximum of 5%. If the magnitude exceeds 5%, the analysis should be conducted again. The analytical error of the measured ion concentration was verified using the electroneutrality (charge-balance error) method [30] based on the following formula:
C B E ( % ) = Σ c a t i o n s Σ a n i o n s Σ c a t i o n s + Σ a n i o n s × 100
Across all samples, the maximum deviation observed was ±6%.
In the present study, the charge balance was calculated for each of the 30 water samples to validate the consistency and accuracy of the laboratory measurements. The maximum deviation observed was ±6%, slightly above the standard threshold in a few cases. However, most samples were within acceptable limits and the variation remained relatively small. As such, the dataset was considered generally reliable, and the small exceedances were attributed to natural variability and trace ion concentrations not always accounted for in the baseline analyses. Including this verification step reinforces the analytical integrity and quality assurance of the water chemistry dataset used in this research.
These procedures ensured that all collected data were accurate, reproducible, and suitable for assessing the irrigation suitability and geochemical status of groundwater in the Ras El-Aioun plain.

2.4. Multivariate Statistical Analysis

Multivariate statistical analysis is a quantitative and independent technique for classifying groundwater samples, facilitating sample grouping and the identification of correlations between metals and groundwater samples [31].
To analyze and interpret the hydrochemical parameters related to the chemical composition of each groundwater sample, we applied Principal Component Analysis (PCA) and Hierarchical Cluster Analysis (HCA) techniques using the R programming language [32]. We categorized the water samples into distinct hydrochemical facies and identified patterns within the data using HCA, which also helped trace the sources of groundwater contamination. Additionally, we employed Microsoft Excel to perform statistical analysis on the physicochemical properties, calculating the mean, standard deviation (variance), maximum, and minimum values. The diagram in Figure 2 illustrates the steps involved.

2.5. Water Quality Index for Agricultural Purposes

According to [33], the identification of optimal irrigation methods is influenced by various factors, such as water quality, soil types, and agricultural activities. The irrigation water quality assessment requires the determination of SO42− concentrations and parameters related to hardness and principal ions, including CO32−, HCO3, Ca2+, and Mg2+ [34]. In general, the assessment of the suitability of groundwater for irrigation primarily relies on analyzing the concentration of sodium ions (Na+) in relation to the overall cation content in the system [35]. Due to the significant impact of Na+ ions on soil permeability and water infiltration, they directly influence the quality of groundwater [36]. The assessment of water quality for agricultural purposes involved the utilization of different indices, including Kelly’s ratio (KR), Total Hardness (TH), the sodium percentage (Na%), the Sodium Adsorption Ratio (SAR), and Residual Sodium Carbonate (RSC) (Table 1).

2.6. GIS Analysis Mapping of Water Quality

Geographic Information Systems (GISs) are computer-based technological solutions specifically designed for processing digital representations of geographical data. Their principal functions include the acquisition, storage, manipulation, analysis, and presentation of diverse collections of spatial or geolocated data [43,44]. Ordinary kriging (OK) is a method that offers insights into spatial dependence and autocorrelation among sampling sites; this information is essential for accurate spatial estimation [45]. In our case, we used the default linear Kriging approach without explicitly applying a geostatistical model or conducting variogram modeling. This choice was made for simplicity and to allow for a preliminary spatial estimation without the need for model calibration. We generated kriging maps to achieve a comprehensive understanding of the spatial distribution of underground water quality indexes in the Ras El-Aioun plain, and we used ArcGIS 10.2. Groundwater quality parameter distribution maps were created based on thirty samples collected from the area under assessment.

2.7. Model Performance and Evaluation

Predicting the Irrigation Water Quality Index (IWQI) is crucial for assessing groundwater suitability for irrigation, allowing for informed water management decisions. Traditional methods are often limited in areas with restricted data and complex hydrogeochemical interactions, which makes machine learning (ML) an effective tool for water quality evaluation [46].
Five ML models were selected based on their regression capabilities: Support Vector Regression (SVR), Random Forest (RF), Gradient Boosting (GB), XGBoost, and K-Nearest Neighbors (KNNs).
Support Vector Regression (SVR) extends Support Vector Machines (SVMs) to regression by mapping input data into a high-dimensional space and fitting an optimal hyperplane. It was chosen for its effectiveness in handling complex relationships, resilience to outliers, and strong performance with limited data [47].
The SVR optimization problem is formulated as the optimization problem in SVR is formulated as follows:
1 2 Ϣ 2 + C k = 1 n p i + p i * , i = 1 , 2 , n
y i Ϣ . ϴ x b ɛ + p i *
Ϣ . ϴ x + b y i ɛ + p i . p i p i * 0
In this formulation, w represents the weight vector, ‖ Ϣ ‖ is the complexity referred term and C is the regularization parameter, θ(x) is the mapping function, and ε is the insensitive loss function.
Random Forest (RF) is an ensemble learning algorithm that constructs multiple decision trees and averages their outputs to enhance accuracy and mitigate overfitting. It was selected for its robustness to noise, ability to model intricate feature interactions, and effectiveness in capturing non-linear dependencies [48].
The prediction for Random Forest is given by
  • Prediction (Regression, mean of T trees):
    Ŷ ( x ) = 1 T t = 1 T h t ( x )
  • Split Criterion (Classification, Gini impurity):
    G = k = 1 K p k ( 1 p k )
    where pk is class proportion in the node.
Gradient Boosting (GB) sequentially builds decision trees, with each tree correcting the errors of its predecessors, thereby improving predictive accuracy. It was chosen for its ability to capture complex patterns, reduce bias, and refine IWQI predictions through iterative optimization [49].
  • Loss Function (Regression, MSE):
    L y , F x = 1 N i = 1 N ( y i F ( x i ) 2 )
  • Update Rule (Step t):
    Ft(x) = Ft−1(x) + ηht,   where ht(x) ≈ −∇FL(y,Ft−1(x))
  • Optimization: gradient descent on residuals
    rit = yiFt−1(xi).
XGBoost (Extreme Gradient Boosting) is an advanced implementation of Gradient Boosting that incorporates regularization, parallel processing, and efficient handling of missing data. It was selected for its superior accuracy, computational efficiency, and ability to model intricate hydrogeochemical relationships [50].
A key characteristic of objective functions is that they consist of two parts: training loss and a regularization term, as follows:
obj(θ) = L(θ) + Ω(θ)
where L denotes the empirical loss function quantifying model fidelity to the training data, while Ω represents the regularization term controlling model complexity. The loss function L evaluates the predictive performance on the training set, with Mean Squared Error (MSE) commonly as
L ( θ ) = ( Y i Ŷ i ) 2
Another frequently used loss function is logistic loss, applied for logistic regression as follows:
L ( θ ) = i [ y i   l n ( 1 + e Ŷ i ) + ( 1 y i ) l n ( 1 + e Ŷ i ) ]
Many practitioners overlook the critical importance of the regularization term in machine learning models. This term governs model complexity and is essential for preventing overfitting.
K-Nearest Neighbors (KNNs) is a distance-based algorithm that predicts values by averaging the closest data points in feature space. It was chosen for its simplicity, ability to detect local patterns, and non-parametric nature. KNNs served as a baseline model for comparison in IWQI prediction [51]. To identify the nearest neighbors, the algorithm uses a distance metric to calculate the distance between a new data point x and each data point xi in the training dataset [46].
  • Distance Metric:
    d ( x , x i ) = j = 1 p ( x j x i j ) 2
    where xi represents a training instance from our dataset, x denotes the novel query point requiring prediction, and p corresponds to the dimensionality of the feature space.
  • Regression (Mean of K neighbors):
    Ŷ ( x ) = 1 K i ϵ N K ( x ) y i
    where NK(x) = set of K-nearest points to x.
These models were trained on hydrogeochemical data from the Ras El-Aioun plain to determine the most accurate approach for IWQI estimation. Model performance was evaluated using Root Mean Square Error (RMSE), Mean Squared Error (MSE), Mean Absolute Error (MAE), and R-squared. R2 quantifies the proportion of variance explained, with values closer to 1 indicating better predictive capability. MSE and RMSE measure error magnitude, where lower values denote higher accuracy. MAE provides an intuitive measure of the average deviation between predicted and actual values. The mathematical formulations for these metrics are
R M S E = 1 n ( X i X ^ i ) 2 n
R 2 = 1 i = 1 n ( X ^ i X i ) 2 i = 1 n ( X i ¯ X i ) 2
M A E = 1 n ( X i X ^ i ) n
M S E = 1 n i = 0 n X i X ^ i
where Xi represents the measured value, X ^ i represents the predicted value, and n is the number of samples.

3. Results

3.1. Characterization of Groundwater

The physico-chemical parameters of the groundwater sampled at 30 sites are summarized in Table 2 and compared with Algerian regulatory standards and FAO irrigation guidelines [52]. pH values ranged from 6.7 to 7.47 (mean: 7.19), indicating neutral to slightly alkaline conditions which were all within the FAO recommended irrigation range (6.0–8.5). Electrical conductivity (EC) varied from 800 to 1700 μS/cm, which is consistent with acceptable irrigation limits (750–2000 μS/cm) [42]. Elevated EC values indicate higher dissolved mineral content, with spatial and temporal variations in total dissolved solids (TDSs) primarily attributed to salinization. While porosity, permeability, and weathering dominate TDS variability in natural aquifers, anthropogenic contributions appear to be secondary. TDS concentrations averaged 744 mg/L (range: 457–1219 mg/L), with 90% of samples classified as freshwater (TDS < 1000 mg/L) [53]. However, three samples (E2, E9, E16) exhibited brackish conditions (1000–10,000 mg/L), likely influenced by proximity to the Salt Lake (Sabkha Essoukhna). Calcium (Ca2+) concentrations ranged from 78 to 406.8 mg/L, with 13.3% of samples exceeding the WHO recommended limit. Magnesium (Mg2+) concentrations ranged between 20.16 and 240.5 mg/L, with 56.6% of samples exceeding the FAO irrigation threshold (60 mg/L) [52]. This is consistent with the typical geochemical behavior of natural waters, where calcium levels generally dominate magnesium.
The elevated concentrations of these divalent cations are primarily due to the dissolution of carbonate minerals, particularly in the western and southern regions of the study area where Albian limestone and dolomite formations predominate [54]. The dominant reaction for calcium release (CaCO3 + H2O + CO2 → Ca2+ + 2HCO3) also explains the observed bicarbonate (HCO3) enrichment (195.2–402.6 mg/L), reflecting slightly alkaline conditions [55]. Prolonged water–rock interactions in wells E2, E11, and E16 further enhanced this dissolution process due to extended groundwater residence times.
Alkali metal concentrations showed Na+ (44.4–181.6 mg/L) within acceptable irrigation limits, while K+ (0.43–3.64 mg/L) exceeded the FAO guideline (2 mg/L) at 11 sampling sites (E1, E5–E8, E12, E13, E16, E17, E21, E30), thereby reducing irrigation suitability [52]. Sodium enrichment likely occurs through base exchange reactions in clay-rich zones, where Na+ replaces Ca2+ in the aquifer matrix. Chloride (Cl: 20.59–102.24 mg/L) and sulfate (SO42−: 57.6–119.04 mg/L) had mean concentrations of 55.23 mg/L and 97.83 mg/L, respectively. Notably, site E16 showed a marked enrichment in Na+, K+, and Cl, suggesting saline intrusion or evaporite dissolution from the El-Hamiet region. These patterns highlight how lithological composition and hydrogeological conditions control groundwater chemistry and irrigation potential across the Ras El-Aioun plain.

3.2. Hydrochemical Facies Type of Groundwater

The Piper diagram is a widely used graphical tool for visualizing the relative concentrations of major ions in water and assessing their geochemical relationships [56]. Its classification system effectively highlights the influence of lithological facies on groundwater composition. As shown in the Piper trilinear diagram (Figure 3) [57], the groundwater samples were classified into four hydrochemical types: (1) Ca-Mg > Na-K, (2) Na-K > Ca-Mg, (3) HCO3 > Cl SO42−, and (4) Cl SO42− > HCO3. Geochemical analysis revealed a general cation dominance sequence of Ca2+ > Na+ > Mg2+ > K+, although in some cases, sodium was dominant (Na+ > Ca2+ > Mg2+ > K+). For anions, the dominant patterns were HCO3 > Cl > SO42− and HCO3 > SO42− > Cl. The groundwater samples were predominantly (93.3%) Ca-Mg-HCO3 facies, characteristic of calcium and magnesium bicarbonate waters. The remaining samples were classified as Na-K-HCO3 (3.33%) and Na-K-SO4 (3.33%) types, reflecting local variations in hydrochemical processes.

3.3. Hydrogeochemical Process

The Gibbs diagram [58] is instrumental in understanding the factors influencing water composition in different environments and visually represents these distinct hydrochemical processes. These processes control groundwater chemistry by determining the relationship between an aquifer’s lithological characteristics and the water’s composition [59,60]. Water composition is primarily influenced by evaporation, rock–water interactions, and atmospheric precipitation. When analyzing the dissolved chemical constituents, it is common to plot the cation ratio (I) and the anion ratio (II) against the TDS value [61,62]. The following equations for anions and cations were used to plot the major ion data from groundwater samples and construct the Gibbs diagram, as follows:
Gibbs   ratio   I   ( meq / L ) = ( N a + + K + / K + + N a + + C a 2 + )
Gibbs   ratio   II   ( meq / L ) = ( C l / C l + H C O 3 )
Figure 4 shows the groundwater samples on the Gibbs diagram. The ratio I ranges between 0.11 and 0.75, while the ratio II falls within the range of 0.05 to 0.3.
Aquifer and soil parameters are used to locate groundwater on the left or right side of the diagram. If carbonate minerals predominate, lower Na/(Na + Ca) ratios are expected to affect groundwater chemistry [63].
The water samples are mostly rock-dominated. These findings imply that sedimentary geological contexts are the primary factor influencing hydrogeochemistry. Several samples fall within the evaporation process.

3.4. Hierarchical Cluster Analysis

In hydrogeochemical studies, the hierarchical clustering approach has been successfully used to classify sampling sites and geochemical elements with similar properties influenced by comparable processes and sources [64,65,66]. In this study, the approach was implemented using two methods: R-mode HCA was used to analyze 10 hydrochemical variables (EC, TDS, Ca2+, Mg2+, K+, Na+, HCO3, Cl, SO42−, NO3) and Q-mode HCA was used to group 30 groundwater variables. The result of the hierarchical clustering is presented in a dendrogram (Figure 5), which shows three main clusters.
The first group, G1, comprises HCO3, Ca2+, and Na+, indicative of fossil groundwater. This group accounted for 86.6% of the sampled boreholes and was predominantly found in the northeast zone. These findings demonstrate that the Cretaceous aquifer can be considered a recharge zone. On the other hand, E2 and E9, situated in the east and west Ticherirt Flanks, respectively, exhibit higher TDS (average 1135.5 mg/L). The dissolved salts in these locations primarily comprise Ca2+, Mg2+, HCO3, and SO42−, suggesting that carbonate weathering is the prevailing factor.
The second subgroup (G2) includes HCO3, K+, and pH. This group represents 6.6% of water samples. The good statistical coherence between HCO3 and K+ can be explained regarding groundwater circulation and the water–rock interaction. In wells E20, E16, E27, and E28, there was an exchange of Na+ and K+ for Mg2+ or Ca2+ in the aquifer.
The effects of human activity, increasing rainfall, and increased regular groundwater and surface water exchange throughout the sampling period indirectly confirm that the origins of these ions are linked or comparable, such as mineral dissolution and silicate weathering dissolution [67].
By employing chloralk indices (CAI-I and CAI-II), one can analyze the cation exchange between the surrounding environment and groundwater [68]. These are computed using of the following formulas:
C A I - I = C l ( N a + + K + ) C l
C A I - I I = C l ( N a + + K + ) S O 4 2 + H C O 3 + N O 3
Positive cationic exchange values (CAI-I) indicate that the waters exchange sodium (Na) and potassium (K), release Ca, and capture K from the clay minerals (Figure 6).
The subgroup G3, representing the Cl-SO4-HCO3 water type characterized by E30, E21, and E20 samples, demonstrates a predominance of alkaline earth metals. This group reflects anthropogenic influences, such as the discharge of sewage effluents and unregulated waste management. The extensive use of chemical fertilizers is also prevalent.

3.5. Irrigation Water Quality Assessment

This study evaluates the suitability of groundwater for agricultural irrigation in the Ras El Aioun region by analyzing several key water quality parameters, including the Sodium Adsorption Ratio (SAR), Kelly’s Ratio (KR), sodium percentage (Na%), Permeability Index (PI), Residual Sodium Carbonate (RSC), and Total Hardness (TH). The results of the Irrigation Water Quality Indices (IWQIs) are summarized in Table 3. A comprehensive assessment was also conducted using the USA salinity diagram and spatial distribution maps (Figure 7).

3.5.1. Sodium Absorption Ratio (SAR)

The evaluation of sodium concentration is crucial for determining the suitability of water for irrigation. Calcium and magnesium levels often reduce the toxicity of sodium, with moderate amounts of calcium shown to alleviate damage, while higher quantities provide a preventive effect. Due to the influence of salt and calcium on the SAR value, it is possible to assess the toxicity potential of irrigation water [69,70]. According to [64,71], SAR values are classified into four groups: low (<10), medium (10–18), high (18–26), and extremely high (>26).
The representation of the SAR index values on the Richards diagram [37] is based on the conductivity (Figure 8). In the Ras El Aioun region, SAR values ranged from 0.41 to 3.75, with all samples falling within the excellent quality range for irrigation. The spatial distribution of SAR, shown in the IWQI map, indicated the highest values in the central and western regions, whereas lower values were observed in the western plain. The dissolution of carbonates likely influenced the higher SAR values.

3.5.2. Sodium Percentage (%)

Irrigation water management relies heavily on accurate sodium percentage (%) assessments. Excessive sodium concentrations in water and soil can inhibit plant growth by decreasing soil permeability [72]. According to [38] and [37], the classification of Na% in irrigation water ranges from excellent (<20), good (20–40), acceptable (40–60), doubtful (60–80), to unsuitable (>80). In the study area, 70% of groundwater samples were classified as excellent, while 30% were classified as good, highlighting the region’s low salinity and minimal salt risks. The presence of calcium and magnesium carbonate in such waters can lead to the precipitation of these compounds. However, over time, the precipitation of calcium and magnesium carbonates may increase sodium concentrations, potentially degrading soil structure and negatively affecting plant growth.

3.5.3. Residual Sodium Carbonate (RSC)

RSC is a key parameter for assessing the impact of groundwater on soil structure during irrigation. RSC values are affected by evaporation and evapotranspiration processes, which concentrate on the soil solution and can lead to precipitation of sodium bicarbonate (NaHCO3), potentially altering soil permeability [73,74]. A negative RSC indicates an excess of sodium ions, which results in the displacement of calcium and magnesium. This causes the precipitation of calcium as CO2 and leaves sodium as the dominant cation. Conversely, a positive RSC value indicates a higher level of calcium and magnesium due to the formation of calcium bicarbonate and magnesium bicarbonate through the reaction with HCO3 [75].
In this study, RSC values ranged from −0.02 to 1.85, with 83.33% of samples classified as “good” and 16.6% as “doubtful.” The spatial map of RSC values (Figure 8) demonstrated regional variability, with RSC decreasing from the southeast to the center of the study area and increasing from the northeast. This variation suggests that increased salt absorption may occur in certain regions.

3.5.4. Permeability Index (PI)

Singh [76] studied the effects of mineral-rich water containing ions such as Ca2+, Mg2+, Na+, and HCO3 on soil permeability. They observed that utilizing this water for irrigation had a significant impact on the permeability of the soil. As a result, the Permeability Index is used to evaluate the water quality and its influence on agricultural soil degradation [77]. Based on criteria developed by [39,40], groundwater was classified into three categories: Class I (suitable), Class II (doubtful), and Class III (unsuitable). The results of PI (Table 3) showed that the Permeability Index (PI) varied between 8.20 and 29.2 for the groundwater of Ras El Aioun, with 96.6% of the samples classified as unsuitable and 3.3% as doubtful. Higher PI values were observed in the central and southwestern parts of the study area, indicating the potential degradation of soil permeability in these regions due to irrigation.

3.5.5. Kelly’s Index (KI)

Kelly’s Index (KI) is another important indicator for determining the suitability of groundwater for irrigation. A KI value below one indicates low salinity, while waters considered safe for irrigation have a KI below one. In contrast, waters with a KI value greater than one are classified as unsuitable [78,79]. Based on the KI results, all groundwater samples in this study were classified as unsuitable for irrigation, with values ranging from 3.43 to 21.04 (Table 3), indicating high salinity levels. The study by Goodarzi et al. [80]. emphasizes the importance of implementing Best Management Practices (BMPs) to enhance groundwater quality. These include reducing the use of agricultural fertilizers and pesticides, as well as ensuring effective waste management. Moreover, regulating anthropogenic activities such as mining, overexploitation of water resources, and landfilling is crucial in mitigating groundwater contamination and promoting long-term water quality sustainability.

3.5.6. Total Hardness (TH)

Total Hardness (TH) is determined by the concentrations of calcium and magnesium in groundwater. Water hardness is categorized into four classes: soft (<75 mg/L), moderately hard (75–150 mg/L), hard (150–300 mg/L), and very hard (>300 mg/L) [81]. In the Ras El Aioun region, TH ranges from 12 to 99 mg/L. Table 3 shows the classification of groundwater quality in the research area, determined by the hardness percentage. Notably, 90% of groundwater samples in the central region were categorized as soft (TH < 75 mg/L), while the remaining 10% fell into the moderately hard category (TH 75–150 mg/L).
The elevated TH (Table 4) values are attributed to the dissolution of bicarbonate salts of calcium and magnesium and the weathering of limestone in the region. These findings provide valuable insight into groundwater quality for irrigation in the Ras El Aioun region and underscore the importance of continuous monitoring and effective management practices to ensure sustainable agriculture.

3.6. Machine Learning Analysis and Modeling

This study evaluates the suitability of groundwater for irrigation in the Ras El-Aioun plain, northwestern Algeria, using four machine learning models: Support Vector Regression (SVR), Random Forest, Gradient Boosting, and KNNs. The primary goal is to predict the Irrigation Water Quality Index (IWQI) based on key groundwater quality parameters. The models were trained on 30 groundwater samples, and their predictive performances were assessed using key evaluation metrics, including Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-squared (R2). Table 5 presents the model training results for predicting the SAR, RSC, KR, Na%, PI, and TH as main parameters for IWQI assessment. For model development, our dataset (n = 30 samples) was partitioned into training (80%, n = 24) and testing (20%, n = 6) sets using a stratified random split to maintain parameter distributions, with the training set used for model fitting and hyperparameter optimization via five-fold cross-validation to prevent overfitting, while the independent test set was used for the final evaluation of model generalizability on unseen data, ensuring reliable performance assessment despite the moderate sample size.
The predictive performance of machine learning models for estimating water quality parameters—SAR, Na%, PI, RSC, KR, and TH—was evaluated through observed vs. predicted scatter plots (Figure 9). The results suggest that machine learning models can effectively predict certain water quality parameters, but their performance varies depending on the complexity of the variable. The strong correlation for SAR, Na%, and TH suggests that these parameters follow well-defined patterns that the models can learn effectively. However, the higher errors observed in PI, KR, and especially RSC indicate that these parameters may be influenced by additional, unaccounted-for factors or exhibit more complex, nonlinear relationships that the models struggle to capture.
In this study, the results indicate that SAR consistently achieved the lowest error metrics and the highest correlation values (r~0.96–1.00) in both the training and testing phases, making it the most reliable model. In contrast, the TH and RSC models exhibited significant overfitting, with high RMSE and MSE values and a drastic drop in correlation coefficients during testing (TH: r = −0.4876, RSC: r = −0.2189), indicating poor generalization. KR and Na% performed moderately well, maintaining relatively stable error metrics but showing slight declines in correlation.
In the study region, the Jurassic limestone and dolomite formations, particularly in the Hodna and Belezma Mountains, contribute significantly to groundwater hardness through carbonate weathering, as follows:
CaCO3 + H2CO3 → Ca2+ + 2HCO3
MgCO3 + H2CO3 → Mg2+ + 2HCO3
The aquifers in the Tazila anticline and the Foural-Talkhempt massif, composed of fractured limestone and sandstone, exhibit high TH due to enhanced rock–water interactions and longer residence times. Evaporite deposits (e.g., gypsum and anhydrite) can further increase hardness. However, impermeable layers such as Albian marls can restrict groundwater flow and limit mineral dissolution, contributing to spatial variability in TH. Machine learning models in the study showed overfitting in TH predictions, as indicated by a substantial drop in test phase correlation (r = −0.4876). This suggests unaccounted geological heterogeneity, such as localized dissolution processes or differential recharge from carbonate-rich formations. To improve TH prediction accuracy, it is essential to integrate additional hydrogeological parameters, including aquifer permeability, groundwater flow velocity, and residence time.
RSC is governed by bicarbonate-rich lithologies and is calculated as follows:
RSC = (CO32− + HCO3) − (Ca2+ + Mg2+)
The groundwater in Ras El-Aioun has distinct hydrochemical characteristics influenced by local geology and hydrological processes. Elevated Residual Sodium Carbonate (RSC) values occur predominantly in areas underlain by Cretaceous limestone and marl formations, where the dissolution of carbonate minerals leads to bicarbonate accumulation. However, machine learning models significantly overfitted RSC predictions (r = −0.2189), suggesting complex, non-linear hydrogeochemical interactions. These include cation exchange processes (Na+ replacing Ca2+ and Mg2+ in clay-rich aquifer sediments), evapotranspiration concentrating bicarbonate in shallow groundwater, and variable recharge dynamics periodically diluting carbonate concentrations.
Notably, high sodium percentage (Na%) values in certain wells indicate multiple contributing factors: dissolution of evaporite deposits, silicate weathering reactions, and enhanced cation exchange capacity in fine-grained Mio-Plio-Quaternary alluvial sediments. The abundance of clay minerals in these formations promotes sodium retention through exchange reactions, which can be represented by the following equation:
2Na2+ + Ca-X2 → 2Na-X + Ca+
where X represents clay exchange sites
Direct dissolution of halite and gypsum deposits releases sodium ions into groundwater, increasing Na% concentrations. Although the machine learning models predicted Na% with relative stability, slight declines in correlation coefficients suggest minor, unaccounted-for influences, possibly related to hydraulic gradients or anthropogenic sources such as irrigation return flows and fertilizer application.
In contrast, the SAR displayed exceptionally strong correlations with the observed data (r ≈ 0.96–1.00), indicating that dominant geochemical processes were effectively captured. These processes include carbonate weathering (particularly the dissolution of dolomite and limestone), which supplies Ca2+ and Mg2+ to counteract sodium effects, ion exchange reactions where Na+ replaces divalent cations in clay-rich sediments, and saline intrusion or evaporation, which can increase sodium dominance. The highest SAR values were observed in aquifers characterized by limited calcium input and elevated sodium content, such as in tertiary and quaternary alluvial deposits, with additional contributions from evaporite dissolution. The high predictive accuracy of the model for SAR demonstrates its effectiveness in capturing the principal hydrogeochemical processes that control sodium behavior in the study area.
The results of this research were compared with findings from previous studies to better understand groundwater quality trends. For example, a study conducted by Gaagai et al. [82] found that groundwater in similar arid and semi-arid regions showed moderate to high limitations for irrigation use. This aligns closely with our findings, where several water quality indicators also pointed to varying degrees of irrigation constraints. The comparison supports the idea that groundwater quality challenges in these regions are influenced by similar environmental and human factors.

4. Conclusions

This study presents a comprehensive assessment of groundwater suitability for irrigation in a semi-arid region by integrating geochemical characterization, water quality index (WQI) analysis, and machine learning (ML) modeling. Thirty groundwater samples were collected and analyzed to evaluate major ion chemistry, hydrochemical facies, and irrigation water quality parameters.
The dominant hydrochemical facies was identified as the SO4–Ca type, accounting for 93.3% of the samples. The average concentration order of ions was found to be HCO3 > Cl > SO42− for anions and Ca2+ > Na+ > Mg2+ > K+ for cations. Gibbs diagram analysis revealed that the rock–water interaction governed the geochemistry of 63.33% of the samples, whereas evaporation influenced the remaining 36.66%, indicating processes such as carbonate dissolution and salt accumulation due to high evaporation rates.
Most chemical parameters were within acceptable limits according to FAO [52] and WHO [83] guidelines for irrigation use. However, elevated concentrations of potassium (K+) and magnesium (Mg2+)—likely resulting from anthropogenic sources such as agricultural runoff—pose potential long-term risks of soil salinization and reduced permeability. Water quality indices, including SAR, RSC, TH, and KR, indicated spatial variability in irrigation suitability, ranging from excellent to marginal across the study area.
Among the applied machine learning models, XGBoost demonstrated the highest predictive accuracy in classifying irrigation suitability, followed by RF KNNs and SVR. These results underscore the value of integrating traditional hydrochemical methods with data-driven approaches to improve decision-making in groundwater resource management.
This study offers a transferable framework for sustainable groundwater management in agricultural regions facing similar water quality challenges. Future research should aim to enhance model generalizability through ensemble techniques, incorporating additional environmental variables such as climate data and land-use patterns, and validate predictions using field-based crop response studies.

Author Contributions

Paper design: Z.M.; Data collection and assembly: Z.M. and H.D.; Data analysis and interpretation: Z.M.; Paper formatting: Z.M., O.B. and A.A.A.; Critical revision: A.A.A., L.K., Z.M., H.D., A.B., O.B., L.M. and T.D.; Supervision: T.D. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported and funded by the Deanship of Scientific Research at Imam Mohammad Ibn Saud Islamic University (IMSIU) (grant number IMSIU-DDRSP2502).

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest. No financial or personal affiliation is claimed by the authors with the conclusions of this research.

References

  1. Ayers, R.S.; Westcot, D.W. Water Quality for Agriculture. Irrigation and Drainage; paper No. 29; Food and Agriculture Organization of the United Nations: Rome, Italy, 1985; pp. 1–117. [Google Scholar]
  2. Rowe, D.R.; Abdel-Magid, I.M. Handbook of Wastewater Reclamation and Reuse; CRC Press: Boca Raton, FL, USA, 1995. [Google Scholar]
  3. Singh, S.K.; Srivastava, P.K.; Pandey, A.C.; Gautam, S.K. Integrated assessment of groundwater influenced by a confluence river system: Concurrence with remote sensing and geochemical modelling. Water Resour. Manag. 2013, 27, 4291–4313. [Google Scholar] [CrossRef]
  4. Gautam, S.K.; Maharana, C.; Sharma, D.; Singh, A.K.; Tripathi, J.K.; Singh, S.K. Evaluation of groundwater quality in the Chotanagpur Plateau region of the Subarnarekha River Basin, Jharkhand State, India. Sustain. Water Qual. Ecol. 2015, 6, 57–74. [Google Scholar] [CrossRef]
  5. Gautam, S.K.; Singh, A.K.; Tripathi, J.K.; Singh, S.K.; Srivastava, P.K.; Narsimlu, B.; Singh, P. Appraisal of surface and groundwater of the Subarnarekha River Basin, Jharkhand, India: Using remote sensing, irrigation indices, and statistical techniques. In Geospatial Technology for Water Resource Applications; Srivastva, P.K., Pandey, P.C., Kumar, P., Raghubanshi, A.S., Eds.; CRC Press: Boca Raton, FL, USA, 2016; pp. 144–169. [Google Scholar]
  6. Nemčić-Jurec, J.; Singh, S.K.; Jazbec, A.; Gautam, S.K.; Kovač, I. Hydrochemical investigations of groundwater quality for drinking and irrigational purposes: Two case studies of Koprivnica-Križevci County (Croatia) and district Allahabad (India). Sustain. Water Resour. Manag. 2017, 5, 467–490. [Google Scholar] [CrossRef]
  7. Refat, N.; Humayan, A. Groundwater geochemistry and hydrogeochemical processes in the Lower Ganges-Brahmaputra-Meghna River Basin areas, Bangladesh. J. Asian Earth Sci. 2021, 6, 100062. [Google Scholar] [CrossRef]
  8. Kattan, Z. Using hydrochemistry and environmental isotopes in the assessment of groundwater quality in the Euphrates alluvial aquifer, Syria. Environ. Earth Sci. 2018, 77, 45. [Google Scholar] [CrossRef]
  9. Singh, S.; Ghosh, N.C.; Gurjar, S.; Krishan, G.; Kumar, S.; Berwal, P. Index-based assessment of suitability of water quality for irrigation purposes under Indian conditions. Environ. Monit. Assess. 2018, 190, 29. [Google Scholar] [CrossRef]
  10. Horton, R.K. An index number system for rating water quality. J. Water Pollut. Control Fed. 1965, 37, 300–306. [Google Scholar]
  11. Abbasi, S.A. Water Quality Indices; Elsevier: Amsterdam, The Netherlands, 2002. [Google Scholar]
  12. Sener, S.; Sener, E.; Davraz, A. Evaluation of water quality using the water quality index (WQI) method and GIS in Aksu River (SW-Turkey). Sci. Total Environ. 2017, 584–585, 131–144. [Google Scholar] [CrossRef]
  13. Jamali, M.Z.; Solangi, G.S.; Keerio, M.A.; Keerio, J.A.; Bheel, N. Assessing and mapping the groundwater quality of Taluka Larkana, Sindh, Pakistan using water quality indices and geospatial tools. Int. J. Environ. Sci. Technol. 2023, 20, 8849–8862. [Google Scholar] [CrossRef]
  14. Khan, M.; Almazah, M.M.A.; Elahi, A.; Niaz, R.; Al-Rezami, A.Y.; Zaman, B. Spatial interpolation of water quality index based on Ordinary kriging and Universal kriging. Geomat. Nat. Hazards Risk 2023, 14, 2190853. [Google Scholar] [CrossRef]
  15. Vadiati, M.; Asghari-Moghaddam, A.; Nakhaei, M.; Adamowski, J.; Akbarzadeh, A.H. A fuzzy-logic-based decision-making approach for identification of groundwater quality based on groundwater quality indices. J. Environ. Manag. 2016, 184, 255–270. [Google Scholar] [CrossRef] [PubMed]
  16. Frincu, R.M. Artificial intelligence in water quality monitoring: A review of water quality assessment applications. Water Qual. Res. J. 2025, 60, 164–176. [Google Scholar] [CrossRef]
  17. Pérez-Beltrán, C.H.; Robles, A.D.; Rodríguez, N.A.; Ortega-Gavilán, F.; Jiménez-Carvelo, A.M. Artificial intelligence and water quality: From drinking water to wastewater. TrAC Trends Anal. Chem. 2024, 172, 117597. [Google Scholar] [CrossRef]
  18. Judeh, T.; Bian, H.; Shahrour, I. GIS-based spatiotemporal mapping of groundwater potability and palatability indices in arid and semi-arid areas. Water 2021, 13, 1323. [Google Scholar] [CrossRef]
  19. Abboud, I.A. Geochemistry and quality of groundwater of the Yarmouk basin aquifer, North Jordan. Environ. Geochem. Health 2017, 40, 1405–1435. [Google Scholar] [CrossRef]
  20. Arslan, H. Determination of temporal and spatial variability of groundwater irrigation quality using geostatistical techniques on the coastal aquifer of Çars¸amba Plain, Turkey, from 1990 to 2012. Environ. Earth Sci. 2017, 76, 1–12. [Google Scholar] [CrossRef]
  21. Bodrud-Doza, M.; Islam, A.R.M.T.; Ahmed, F.; Das, S.; Saha, N.; Rahman, M.S. Characterization of groundwater quality using water evaluation indices, multivariate statistics, and geostatistics in central Bangladesh. Water Sci. 2016, 30, 19–40. [Google Scholar] [CrossRef]
  22. Chabuk, A.; Jahad, U.A.; Majdi, A.; Majdi, H.S.; Hadi, A.A.; Hadi, H.; Al-Ansari, N.; Isam, M. Integrating WQI and GIS to assess water quality in Shatt Al-Hillah River, Iraq using physicochemical and heavy metal elements. Appl. Water Sci. 2023, 13, 147. [Google Scholar] [CrossRef]
  23. Zafar, M.M.; Kumari, A. Spatio-temporal evaluation of the impact of anthropogenic stressors on physicochemical characteristics and water quality of the River Ganga using GIS-based approach in the middle Gangetic Plains at Patna, Bihar, India. Water Sci. Technol. 2024, 89, 1382–1400. [Google Scholar] [CrossRef]
  24. Zafar, M.M.; Sulaiman, M.A.; Prabhakar, R.; Kumari, A. Evaluation of the suitability of groundwater for irrigational purposes using irrigation water quality indices and geographical information systems (GIS) at Patna (Bihar), India. Int. J. Energy Water Resour. 2022, 8, 241–254. [Google Scholar] [CrossRef]
  25. Boutaleb, A.; Aïssa, D.E.; Touahri, B. Les gîtesplombo-zincifères du Hodna: Minéralisationscomparables au type «Vallée du Mississippi» (Nord-Est Algérien). Bull. Du Serv. Géologique De L’algérie 1999, 10, 55–71. [Google Scholar]
  26. Bellion, Y.J. Étude géologique et hydrogéologique de la terminaison occidentale des Monts de Bellezma (Algérie). Doctor’s Thesis, 3ème Cycle, Université de Paris, Paris, France, 1972; pp. 145–169. [Google Scholar]
  27. Belkhiri, L.; Boudoukha, A.; Mouni, L.; Baouz, T. Statistical categorization geochemical modeling of groundwater in Ain Azel plain (Algeria). J. Afr. Earth Sci. 2011, 59, 140–148. [Google Scholar] [CrossRef]
  28. Boutaleb, A. Les minéralisations à Pb–Zn du domaineSétifien-Hodna: Gitologie, pétrographie des dolomies, microthermométrie et implications métallogéniques. Ph.D. Thesis, Statement in Mining Geology, IST, USTHB, Algiers, Algeria, 2001. [Google Scholar]
  29. Rodier, J.; Bazin, C.; Broutin, J.P.; Chambon, P.; Rodi, L.; Vernier, M. L’analyse de l’eau: Eaux naturelles, eaux résiduaires, eau de mer, 9th ed.; Dunod: Malakoff, France, 2009. [Google Scholar]
  30. Domenico, P.A.; Schwartz, F.W. Physical and Chemical Hydrogeology, 2nd ed.; Wiley: New York, NY, USA, 1998. [Google Scholar]
  31. Cloutier, V.; Lefebvre, R.; Therrien, R.; Savard, M. Multivariate statistical analysis of geochemical data as indicative of the hydrogeochemical evolution of groundwater in a sedimentary rock aquifer system. J. Hydrol. 2008, 353, 294–313. [Google Scholar] [CrossRef]
  32. Belkhiri, L.; Boudoukha, A.; Mouni, L.; Baouz, T. Application of multivariate statistical methods and inverse geochemical modeling for characterization of groundwater—A case study: Ain Azel plain (Algeria). Geoderma 2010, 159, 390–398. [Google Scholar] [CrossRef]
  33. Gad, M.; El-Hendawy, S.; Al-Suhaibani, N.; Tahir, M.U.; Mubushar, M.; Elsayed, S. Combining hydrogeochemical characterization and a hyperspectral reflectance tool for assessing quality and suitability of two groundwater resources for irrigation in Egypt. Water 2020, 12, 2169. [Google Scholar] [CrossRef]
  34. Belkhiri, L.; Tiri, A.; Mouni, L. Spatial distribution of the groundwater quality using kriging and Co-kriging interpolations. Groundw. Sustain. Dev. 2020, 11, 100473. [Google Scholar] [CrossRef]
  35. Mammeri, A.; Tiri, A.; Belkhiri, L.; Salhi, H.; Brella, D.; Lakouas, E.; Tahraoui, H.; Amrane, A.; Mouni, L. Assessment of Surface Water Quality Using Water Quality Index and Discriminant Analysis Method. Water 2023, 15, 680. [Google Scholar] [CrossRef]
  36. Ajayi, F.; Nduru, M.; Oningue, A. Halting the salt that kills crops. Afr. Farmer 1990, 4, 10–12. [Google Scholar]
  37. Richards, L. Diagnosis and improvement of saline and alkali soils. Soil Sci. 1954, 78, 154. [Google Scholar] [CrossRef]
  38. Wilcox, L. Classification and Use of Irrigation Waters; USDA: Washington, DC, USA, 1955. [Google Scholar]
  39. Raghunath, I. Groundwater, 2nd ed.; Wiley Eastern Ltd.: New Delhi, India, 1987; pp. 344–369. [Google Scholar]
  40. Doneen, L.D. Notes on Water Quality in Agriculture; Water Science and Engineering Paper 4001; Department of Water, University of California: Davis, CA, USA, 1964. [Google Scholar]
  41. Kelley, W.P. Use of saline irrigation water. Soil Sci. 1963, 95, 385–391. [Google Scholar] [CrossRef]
  42. Todd, D.K. Groundwater Hydrology, 2nd ed.; Wiley: New York, NY, USA, 1980. [Google Scholar]
  43. Singh, V.P.; Fiorentino, M. Geographic Information System in Hydrology; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1996. [Google Scholar]
  44. Karim, M.R.; Arham, M.A.; Shorif MJ, U.; Ahsan, A.; Al-Ansari, N. GIS based geostatistical modelling and trends analysis of groundwater quality for suitable uses in Dhaka division. Sci. Rep. 2024, 14, 17449. [Google Scholar] [CrossRef] [PubMed]
  45. Theodossiou, N.; Latinopoulos, P. Evaluation and optimization of groundwater observation networks using the kriging methodology. Environ. Model. Softw. 2006, 21, 991–1000. [Google Scholar] [CrossRef]
  46. Maleky, S.; Faraji, M.; Hashemi, M.; Esfandyari, A. Investigation of groundwater quality indices and health risk assessment of water resources of Jiroft city, Iran, by machine learning algorithms. Appl. Water Sci. 2025, 15, 1–22. [Google Scholar] [CrossRef]
  47. Abbas, F.; Cai, Z.; Shoaib, M.; Iqbal, J.; Ismail, M.; Alrefaei, A.F.; Albeshr, M.F. Machine learning models for water quality prediction: A comprehensive analysis and uncertainty assessment in Mirpurkhas, Sindh, Pakistan. Water 2024, 16, 941. [Google Scholar] [CrossRef]
  48. Hussein, E.E.; Derdour, A.; Zerouali, B.; Almaliki, A.; Wong, Y.J.; Santos, M.B.-D.L.; Ngoc, P.M.; Hashim, M.A.; Elbeltagi, A. Groundwater Quality Assessment and Irrigation Water Quality Index Prediction Using Machine Learning Algorithms. Water 2024, 16, 264. [Google Scholar] [CrossRef]
  49. Sangwan, V.; Bhardwaj, R. Machine learning framework for predicting water quality classification. Water Pract. Technol. 2024, 19, 4499–4521. [Google Scholar] [CrossRef]
  50. Krishnan, S.; Manikandan, R. Water quality prediction: A data-driven approach exploiting advanced machine learning algorithms with data augmentation. J. Water Clim. Change 2023, 15, 431–452. [Google Scholar] [CrossRef]
  51. Sharma, A.; Sharma, R.; Rana, R.; Kalia, A. Water quality prediction using Machine Learning Models. In Proceedings of the E3S Web of Conferences, Paris, France, 16–19 October 2024; EDP Sciences: Les Ulis, France, 2024; Volume 596, p. 01025. [Google Scholar]
  52. FAO. Water Quality for Agriculture. Food and Agriculture Organization. 1985. Available online: http://www.fao.org/docrep/003/T0234E/T0234E00.htm (accessed on 24 May 2025).
  53. Freeze, R.A.; Cherry, J.A. Groundwater; Prentice-Hall: Englewood Cliffs, NJ, USA, 1979. [Google Scholar]
  54. Mansouri, Z.; Menani, M.R. The study of the hydrodynamic characteristics and the vulnerability of the plain alluvionnaire of KsarBelezma (Algerian northeast). Larhyss J. 2016, 26, 237–247. [Google Scholar]
  55. WHO. Guidelines for Drinking-Water Quality: Fourth Edition Incorporating the First Addendum; World Health Organization: Geneva, Switzerland, 2017. [Google Scholar]
  56. Merino, L.; Aguilera, H.; González-Jiménez, M.; Díaz-Losada, E. D-Piper: A modified Piper diagram to represent big sets of hydrochemical analyses. Environ. Model. Softw. 2021, 138, 104979. [Google Scholar] [CrossRef]
  57. Piper, A.M. A graphic procedure in the geochemical interpretation of water analyses. EOS Trans Am. Geophys. Union 1944, 25, 914–928. [Google Scholar] [CrossRef]
  58. Gibbs, R.J. Mechanisms controlling world water chemistry. Science 1970, 170, 1088–1090. [Google Scholar] [CrossRef]
  59. Kumar, S.K.; Logeshkumaran, A.; Magesh, N.S.; Godson, P.S. Hydro-geochemistry and application of water quality index (DWQI) for groundwater quality assessment, Anna Nagar, part of Chennai city, Tamil Nadu, India. Appl. Water Sci. 2015, 5, 335–343. [Google Scholar] [CrossRef]
  60. Abdelbaki, H.; Belkendil, A.; Maazouzi, A.; Mekkaoui, A. Assessment of hydrochemical properties of groundwater in the alluvial aquifer of the arid zone of the Igli Region, South-West of Algeria. Desalination Water Treat. 2022, 268, 153–169. [Google Scholar] [CrossRef]
  61. Polemio, M.; Limoni, P.P.; Mitolo, D.; Santaloia, F. Nitrate pollution and quality degradation of Ionian coastal groundwater (Southern Italy). In Nitrates in Groundwater; CNR: Roma, Italia, 2005. [Google Scholar]
  62. Petrucci, O.; Polemio, M. Flood risk mitigation and anthropogenic modifications of a coastal plain in southern Italy: Combined effects over the past 150 years. Nat. Hazards Earth Syst. Sci. 2007, 7, 361. [Google Scholar] [CrossRef]
  63. Banks, D.; Frengstad, B. Evolution of groundwater chemical composition by plagioclase hydrolysis in Norwegian anorthosites. Geochim. Et Cosmochim. Acta 2006, 70, 1337–1355. [Google Scholar] [CrossRef]
  64. Saleh, A.; Al-Ruwaih, F.; Shehata, M. Hydrogeochemical processes operating within the main aquifers of Kuwait. J. Arid. Environ. 1999, 42, 195–209. [Google Scholar] [CrossRef]
  65. Pacheco Castro, R.; Pacheco Ávila, J.; Ye, M.; Cabrera Sansores, A. Groundwater quality: Analysis of its temporal and spatial variability in a karst aquifer. Groundwater 2017, 56, 62–72. [Google Scholar] [CrossRef] [PubMed]
  66. Belkendil, A.; Habi, M.; Morsli, B. Evaluation of the physico-chemical quality of groundwater in arid areas: Case study (watershed of the Oued Bechar) in Bechar-Kenadsa Region. Desalination Water Treat. 2018, 107, 136–146. [Google Scholar] [CrossRef]
  67. Liu, Y.; Li, M.; Zhang, Y.; Wu, X.; Zhang, C. Analysis of the Hydrogeochemical Characteristics and Origins of Groundwater in the Changbai Mountain Region via Inverse Hydrogeochemical Modeling and Unsupervised Machine Learning. Water 2024, 16, 1853. [Google Scholar] [CrossRef]
  68. Schoeller, H. Qualitative evaluation of groundwater resources. In Methods and Techniques of Groundwater Investigation and Development; Water Resource Series No. 33; UNESCO: Paris, France, 1967. [Google Scholar]
  69. Bakelli, O.; Hadj-Said, S.; Mahmood, T.H.; Zeddouri, A.; Hamdi-Aissa, B.; Kharroubi, M. Hydrogeochemistry and Spatial–Temporal Groundwater Quality Assessment of the Alluvial Aquifer in the Guerrara Region (Algeria). In Proceedings of the Euro-Mediterranean Conference for Environmental Integration, Sousse, Tunisia, 1–4 November 2022; Springer Nature: Cham, Switzerland, 2022; pp. 423–426. [Google Scholar] [CrossRef]
  70. Hoffman, G.J.; Shannon, M.C. Salinity. In Micro Irrigation for Crop Production; Lamm, F.R., Ayars, J.E., Nakayama, F.S., Eds.; Elsevier: New York, NY, USA, 2007; pp. 131–160. [Google Scholar]
  71. Thomas, J.; Joseph, S.; Arunkumar TM MK, S. Seasonal Variation in Major Ion Chemistry of a Tropical Mountain River, the Southern Western Ghats, Kerala, India. Environ. Geol. 2014, 71, 2333–2351. [Google Scholar] [CrossRef]
  72. Ghalib, H.B. Groundwater chemistry evaluation for drinking and irrigation utilities in east Wasit province, Central Iraq. Appl. Water Sci. 2017, 7, 3447–3467. [Google Scholar] [CrossRef]
  73. Eaton, F.M. Significance in carbonate in irrigation water. Soil Sci. 1950, 69, 123–134. [Google Scholar] [CrossRef]
  74. Subba Rao, N.; Surya Rao, P.; Venktram Reddy, G.; Nagamani, M.; Vidyasagar, G.; Satyanarayana NL, V.V. Chemical characteristics of groundwater and assessment of groundwater quality in Varaha River Basin, Visakhapatnam District, Andhra Pradesh, India. Environ. Monit. Assess. 2012, 184, 5189–5214. [Google Scholar]
  75. Chitsazan, M.; Aghazadeh, N.; Mirzaee, Y.; Golestan, Y.; Mosavi, S. Hydrochemical characteristics and quality assessment of urban groundwater in Urmia City, NW Iran. Water Supply 2017, 17, 1410–1425. [Google Scholar] [CrossRef]
  76. Singh, A.K.; Mondal, G.C.; Kumar, S.; Singh, T.B.; Tewary, B.K.; Sinha, A. Major ion chemistry, weathering processes and water quality assessment in upper catchment of Damodar River basin, India. Environ. Geol. 2008, 54, 745–758. [Google Scholar] [CrossRef]
  77. Obiefuna, G.I.; Sheriff, A. Assessment of shallow groundwater quality of Pindiga Gombe Area, Yola Area, NE, Nigeria for irrigation and domestic purposes. Res. J. Environ. Earth Sci. 2011, 3, 131–141. [Google Scholar]
  78. Paliwal, K.V. Effects of gypsum application on the quality of irrigation water. Madras Agric. J. 1967, 59, 646–647. [Google Scholar]
  79. Jalali, M. Salinization of groundwater in arid and semi-arid zones: An example from Tajarak, western Iran. Environ. Geol. 2007, 52, 1133–1149. [Google Scholar] [CrossRef]
  80. Goodarzi, M.R.; Niknam, A.R.R.; Barzkar, A.; Niazkar, M.; Zare Mehrjerdi, Y.; Abedi, M.J.; Heydari Pour, M. Water Quality Index Estimations Using Machine Learning Algorithms: A Case Study of Yazd-Ardakan Plain, Iran. Water 2023, 15, 1876. [Google Scholar] [CrossRef]
  81. Sawyer, C.N.; McCarty, P.L. Chemistry for Sanitary Engineers; McGraw Hill: New York, NY, USA, 1967. [Google Scholar]
  82. Gagai, A.; Aouissi, H.A.; Bencedira, S.; Hinge, G.; Athamena, A.; Heddam, S.; Gad, M.; Elsherbiny, O.; Elsayed, S.; Eid, M.H.; et al. Application of Water Quality Indices, Machine Learning Approaches, and GIS to Identify Groundwater Quality for Irrigation Purposes: A Case Study of Sahara Aquifer, Doucen Plain, Algeria. Water 2023, 15, 289. [Google Scholar] [CrossRef]
  83. WHO. Hardness in Drinking-Water; WHO: Geneva, Switzerland, 2011; p. 5. [Google Scholar]
Figure 1. Geological map of the research region and sample sites.
Figure 1. Geological map of the research region and sample sites.
Water 17 01698 g001
Figure 2. Diagram illustrating the adopted methodology.
Figure 2. Diagram illustrating the adopted methodology.
Water 17 01698 g002
Figure 3. Piper diagram (color indication indicates sample number).
Figure 3. Piper diagram (color indication indicates sample number).
Water 17 01698 g003
Figure 4. The Gibbs plot showing ratio I (Na+ + K+)/(Na+ + K+ + Ca+) and ratio II (Cl + NO3)/(Cl + NO3 + HCO3) vs. of TDS.
Figure 4. The Gibbs plot showing ratio I (Na+ + K+)/(Na+ + K+ + Ca+) and ratio II (Cl + NO3)/(Cl + NO3 + HCO3) vs. of TDS.
Water 17 01698 g004
Figure 5. Dendrograms showing (A) the clustering of variables and (B) the clustering of water samples.
Figure 5. Dendrograms showing (A) the clustering of variables and (B) the clustering of water samples.
Water 17 01698 g005
Figure 6. Chloralk indices.
Figure 6. Chloralk indices.
Water 17 01698 g006
Figure 7. Spatial distribution maps of IWQI for Ras El Aioun plain (A): Kelley’s index (KR), (B): Sodium percentage, (C): Total Hardness, (D): Sodium absorption ratio, (E): Residual Sodium Carbonate (F): Permeability Index.
Figure 7. Spatial distribution maps of IWQI for Ras El Aioun plain (A): Kelley’s index (KR), (B): Sodium percentage, (C): Total Hardness, (D): Sodium absorption ratio, (E): Residual Sodium Carbonate (F): Permeability Index.
Water 17 01698 g007
Figure 8. Richard’s diagram shows the suitability of groundwater quality for irrigation purposes.
Figure 8. Richard’s diagram shows the suitability of groundwater quality for irrigation purposes.
Water 17 01698 g008
Figure 9. Model predicted vs. observed WQI; (a) SAR; (b) Na%; (c) PI; (d) RSC; (e) KR; (f) TH.
Figure 9. Model predicted vs. observed WQI; (a) SAR; (b) Na%; (c) PI; (d) RSC; (e) KR; (f) TH.
Water 17 01698 g009
Table 1. Irrigation groundwater quality.
Table 1. Irrigation groundwater quality.
ParametersEquationsReference
Sodium Adsorption Ratio (meq/L) S A R = N a + C a 2 + + M g 2 + 2 [37]
Sodium Hazard N a % = N a + + K + C a + + M g + + N a + + K + × 100 [38]
Residual Sodium Carbonate (meq/L) RSC= [HCO3 +CO32−] − [Ca2+ + Mg+][39]
Permeability Index P I = N a + + H C O 3 C a 2 + + M g 2 + + N a + × 100 [40]
Kelly’s Ratio K R = N a 2 + C a 2 + + M g 2 + [41]
Total HardnessTH = 2.497 Ca2+ + 4.11 Mg2+[42]
Table 2. Parameter analysis of groundwaters.
Table 2. Parameter analysis of groundwaters.
Parameters UnitMinMedianMaxDrinking Water StandardsIrrigation Water Standards
pH 6.77.197.476.5–8.56.0–8.5
ECµs/cm12008001700500–15003000
Ca2+mg/L49.3278.09406.8975–200400
Mg2+mg/L29.1648.60240.5730–15060
Clmg/L20.5920.59102.242501100
HCO3mg/L195.20317.20402.60300–500600
Na+mg/L44.46123.03181.60200900
K+mg/L0.431.233.64122
SO42−mg/L57.6077.57119.042501000
TDSmg/L4577441219500–10002000
Table 3. Irrigation water quality of the plain Ras El Aioun.
Table 3. Irrigation water quality of the plain Ras El Aioun.
WellsSAR (meq/L)RSC (meq/L)Na%PITHKR
E11.77−10.5720.2720.49788.89
E20.41−32.2524.6824.799921.04
E30.82−19.5020.3120.496413.96
E41.35−0.7310.0310.69184.64
E52.80−1.6019.0819.60225.45
E63.22−0.6817.6218.27164.24
E71.72−10.2220.2220.46409.1
E81.32−18.1223.5323.676013.15
E90.79−23.3222.5922.747415.98
E100.52−28.1722.3822.508418.01
E111.431.859.6210.47164.24
E122.19−5.0219.9020.26317.27
E132.47−0.0714.8315.51174.44
E142.97−2.2620.4721.01235.65
E151.02−4.1511.3611.79276.46
E161.63−21.5429.0829.196914.97
E172.048−4.5016.9017.29266.26
E181.24−0.028.429.19154.03
E190.69−14.1415.3115.524910.92
E202.93−0.5215.6316.36154.03
E212.071.6511.4912.36143.83
E222.31−0.8812.4413.18143.83
E232.30−1.7514.5015.10184.64
E240.96−0.736.527.29133.63
E251.260.957.318.27123.43
E261.151.307.278.20133.63
E272.521.2513.9014.74154.03
E281.97−3.0616.6817.29207.07
E292.46−0.7315.2515.90184.64
E303.75−1.6418.5019.08143.83
Table 4. Irrigation water classification according to SAR, KR, Na%, and TH values [37,41,81].
Table 4. Irrigation water classification according to SAR, KR, Na%, and TH values [37,41,81].
ValueClass
SAR<10Excellent
10–18Good
18–26Fair
Total Hardness (TH)
mg/L
<75Soft
75–150
150–300Hard
KRKR > 1Unsuitable
KR < 1Safe
PI>75Good
25–75%Doubeful
<25Unsuitable
RSC<1.25Good
1.25–2.5Doubeful
>25Unsuitable
Na%<20Excellent
20–40Good
40–60Permissible
60–80Doubtful
>80Unsuitable
Table 5. Training model performance results.
Table 5. Training model performance results.
ParametersSVRRandom Forest
RMSER2MSEMAERMSER2MSEMAE
TrainKR2.85760.5348.16581.11640.52440.98430.2750.2422
SAR0.16510.96170.02730.12730.17570.95660.03090.1337
RSC6.71810.335945.13293.3981.10670.9821.22470.6338
TH22.49330.0321505.948712.21714.5640.960220.82982.1571
Na%2.06850.80714.27861.33980.35720.99420.12760.2762
PI1.93260.81583.73481.24250.3810.99280.14520.2892
TestKR5.42670.146729.4494.21971.18990.9591.41590.8923
SAR0.21290.81430.04530.17360.40060.34240.16050.3636
RSC12.9647−0.2189168.08369.23052.81670.94257.93392.125
TH36.8698−0.48761359.384727.57684.4520.978319.82023.7867
Na%5.32520.560628.35824.31022.69020.88797.23721.7011
PI5.05220.575625.52494.09032.78440.87117.75291.9272
Gradient BoostingKNNs
RMSER2MSEMAERMSER2MSEMAE
TrainKR0.0005100.00031.86610.80133.48221.0581
SAR0.0048100.0040.37910.79790.14370.2999
RSC0.020610.00040.0173.44210.825711.8482.0071
TH0.0048100.003410.57750.786111.8835.8167
Na%0.0005100.00031.59690.8852.55011.1928
PI0.0009100.00061.52120.88592.31411.1102
TestKR1.27630.95281.62910.94132.36820.83755.60861.971
SAR0.43220.23470.18680.35390.47860.06180.2290.4547
RSC1.97340.97183.89421.54664.56270.84920.81873.2015
TH6.16620.958438.02174.78149.37480.903887.88676.1
Na%2.34190.9155.48461.59383.3130.829910.97622.3841
PI2.40170.90415.76811.65473.28570.820510.7962.3724
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mansouri, Z.; Dinar, H.; Belkendil, A.; Bakelli, O.; Drias, T.; Assadi, A.A.; Khezami, L.; Mouni, L. Integrated Groundwater Quality Assessment for Irrigation in the Ras El-Aioun District: Combining IWQI, GIS, and Machine Learning Approaches. Water 2025, 17, 1698. https://doi.org/10.3390/w17111698

AMA Style

Mansouri Z, Dinar H, Belkendil A, Bakelli O, Drias T, Assadi AA, Khezami L, Mouni L. Integrated Groundwater Quality Assessment for Irrigation in the Ras El-Aioun District: Combining IWQI, GIS, and Machine Learning Approaches. Water. 2025; 17(11):1698. https://doi.org/10.3390/w17111698

Chicago/Turabian Style

Mansouri, Zineb, Haythem Dinar, Abdeldjalil Belkendil, Omar Bakelli, Tarek Drias, Amine Aymen Assadi, Lotfi Khezami, and Lotfi Mouni. 2025. "Integrated Groundwater Quality Assessment for Irrigation in the Ras El-Aioun District: Combining IWQI, GIS, and Machine Learning Approaches" Water 17, no. 11: 1698. https://doi.org/10.3390/w17111698

APA Style

Mansouri, Z., Dinar, H., Belkendil, A., Bakelli, O., Drias, T., Assadi, A. A., Khezami, L., & Mouni, L. (2025). Integrated Groundwater Quality Assessment for Irrigation in the Ras El-Aioun District: Combining IWQI, GIS, and Machine Learning Approaches. Water, 17(11), 1698. https://doi.org/10.3390/w17111698

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop