Next Article in Journal
High-Frequency Multi-Satellite Observations of Brahmaputra River Hydrology and Floodplain Dynamics
Previous Article in Journal
Hydrogeologic and Agricultural Drivers of Groundwater Salinity, Boron, Selenium, and Nitrate in Wister Unit, Eastern Salton Sea, California
Previous Article in Special Issue
Using High-Resolution Hydrodynamic Models to Assess the Environmental Status of Highly Modified Transitional Waters in Salt Marshes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Artificial Intelligence (AI) and Monte Carlo Simulation-Based Modeling for Predicting Groundwater Pollution Indices and Nitrate-Linked Health Risks in Coastal Areas Facing Agricultural Intensification

1
Laboratory of Process Engineering and Environment, Faculty of Science and Technology Mohammedia, University Hassan II of Casablanca, Mohammedia 28806, Morocco
2
Research Unit on Environment and Conservation of Natural Resources, Regional Center of Rabat, National Institute of Agricultural Research, AV. Ennasr, Rabat 10101, Morocco
3
International Center for Agricultural Research in the Dry Areas (ICARDA), Rabat 10100, Morocco
4
Geosciences and Natural Resources Laboratory, Department of Geology, Faculty of Sciences, Ibn Tofail University, Kenitra 14000, Morocco
5
Laboratory of Natural Resources and Sustainable Development, Department of Biology, Faculty of Sciences, Ibn Tofail University, Kenitra 14000, Morocco
*
Author to whom correspondence should be addressed.
Hydrology 2026, 13(2), 59; https://doi.org/10.3390/hydrology13020059
Submission received: 19 December 2025 / Revised: 15 January 2026 / Accepted: 23 January 2026 / Published: 3 February 2026

Abstract

This study assesses groundwater quality and nitrate-related health risks in the Skhirat coastal aquifer (Morocco) using a multidisciplinary approach. A total of thirty groundwater wells were sampled and analyzed for physico-chemical properties, including major ions and nutrients. Multivariate statistical analyses were employed to explore contamination sources. Pollution indices such as the Groundwater Pollution Index (GPI) and Nitrate Pollution Index (NPI) were computed, and Monte Carlo simulations (MCSs) were conducted to assess nitrate-related health risks through ingestion and dermal exposure. Furthermore, Random Forest (RF), Gradient Boosting Regression (GBR), Support Vector Regression (SVR) with radial basis function kernel, and Artificial Neural Networks (ANN) models were tested for predicting groundwater pollution indices. Results of hydrochemical facies revealed Na+-Cl dominance in 47% of the samples, suggesting strong marine influence, while nitrate concentrations reached up to 89.3 mg/L, exceeding World Health Organization (WHO) limits in 26.7% of the sites. Pollution indices indicated that 33.3% of samples exhibited moderate to high GPI values, with 36.7% of the samples exceeding the threshold for NPI. The MCS for nitrate health risk revealed that 43% of the samples posed non-carcinogenic health risks to children (Hazard Index (HI) > 1). RF outperformed other models in predicting GPI (R2 = 0.76) and NPI (R2 = 0.95). Spatial prediction maps visualized contamination hotspots aligned with intensive horticultural activity. This integrated methodology offers a robust framework to diagnose groundwater pollution sources and predict future risks.

1. Introduction

Groundwater is a vital freshwater resource supporting nearly 2.5 billion people globally, particularly in arid and semi-arid regions where surface water is scarce [1,2]. Coastal aquifers are especially critical due to their role in sustaining agricultural production, drinking water supply, and local ecosystems. However, these aquifers are among the most vulnerable to degradation due to seawater intrusion, over-extraction, and contamination from surface activities [3]. In coastal agricultural zones, intensive farming and irrigation practices often lead to significant stress on groundwater systems, accelerating salinization processes and deteriorating water quality [4]. The hydrogeological complexity of coastal systems makes them highly sensitive to both natural pressures (climate variability, sea-level rise) and anthropogenic activities (groundwater pumping, land use changes) [5]. As agricultural demand increases to meet food security objectives, the balance between groundwater quantity and quality becomes increasingly difficult to maintain [6]. This situation is exacerbated in regions with limited water governance or weak monitoring infrastructures, resulting in unsustainable exploitation of groundwater reserves and long-term environmental degradation [7].
The intensification of agricultural activities in coastal areas has significantly amplified the pressure on groundwater resources. Fertilizer application, use of organic and chemical manures, and excessive irrigation are major contributors to nitrate and salinity contamination in shallow aquifers [8]. Studies have shown that nitrate (NO3) is one of the most prevalent contaminants in agricultural groundwater worldwide, often exceeding the WHO permissible limit of 50 mg/L, posing health risks and environmental degradation [6,9]. In addition to nitrates, excessive sodium (Na+) and chloride (Cl) accumulation from saline irrigation practices can lead to soil sodicity and salinization, impairing soil structure, microbial activity, and nutrient availability [10]. This degradation of soil health not only reduces agricultural productivity but also alters the natural filtration capacity of the vadose zone, accelerating contaminant leaching into aquifers [11]. Furthermore, the long-term use of nitrogen-rich inputs without proper nutrient management leads to inefficient uptake by plants, increasing the risk of groundwater leaching [12]. This creates a feedback loop where poor water quality affects crop performance, which in turn drives the demand for more inputs, aggravating the contamination problem [13]. The cumulative effect of these practices undermines both agricultural sustainability and groundwater safety, particularly in vulnerable coastal zones with shallow water tables and limited aquifer recharge [14,15,16].
Groundwater plays a pivotal role in sustaining ecosystems, agricultural productivity, and drinking water supply across the globe [17]. It accounts for nearly 30% of the world’s freshwater resources and provides drinking water to over two billion people [18]. However, this vital resource is increasingly threatened by overexploitation, contamination, and climate-induced stresses [19,20]. In many regions, especially arid and semi-arid zones, declining water tables and deteriorating water quality raise serious concerns for long-term water security and sustainable development [21]. Morocco, located in North Africa, is no exception. The country faces critical groundwater challenges, particularly in coastal and agriculturally intensive zones, such as the Gharb and Chaouia plains [22]. In recent decades, Morocco has experienced significant pressure on its aquifers due to increasing irrigation demands, coupled with reduced rainfall and limited surface water availability [23]. Groundwater accounts for about 36% of total water consumption in Morocco, and over 70% in the agricultural sector [24]. The degradation of groundwater quality in Morocco is exacerbated by saline intrusion in coastal aquifers, intensive fertilizer usage, and the lack of integrated monitoring systems [25]. Additionally, seawater intrusion, driven by overpumping in coastal areas, threatens the potability and agricultural usability of groundwater resources. These challenges underscore the urgent need for innovative monitoring, modeling, and prediction tools to ensure the sustainable management of groundwater in vulnerable Moroccan agroecosystems [26].
In recent years, the integration of AI and Machine Learning (ML) into environmental geosciences has revolutionized the way complex and multidimensional datasets are analyzed, interpreted, and modeled [27,28]. These advanced computational techniques offer robust capabilities for predicting and classifying groundwater quality, identifying pollution sources, modeling hydrogeochemical processes, and supporting decision-making in water resource management [29]. Traditional methods alone often fall short when dealing with nonlinear relationships, sparse datasets, or spatial heterogeneity, which are common in environmental systems. ML algorithms, such as RF, ANN, GB, and SVM, have demonstrated strong performance in hydrogeochemical modeling, pollution index prediction, and spatial classification tasks [30]. Moreover, unsupervised learning approaches like Self-Organizing Maps (SOMs) and Principal Component Analysis (PCA) have provided new insights into pattern recognition and data dimensionality reduction in environmental datasets [2,31]. These methods facilitate the interpretation of large-scale groundwater quality monitoring networks and enhance the understanding of spatial and temporal variability.
Despite the growing body of research on groundwater quality degradation in coastal agroecosystems, existing studies largely adopt fragmented approaches that focus on hydrogeochemical characterization, pollution index computation, or ML prediction in isolation. In Morocco and comparable Mediterranean regions, groundwater assessments have predominantly emphasized salinity and seawater intrusion processes, while nitrate contamination driven by agricultural intensification is often treated as a secondary issue, rarely linked to probabilistic human health risk. Although recent advances demonstrate the potential of AI for groundwater quality prediction, most applications rely on limited statistical correlations or deterministic indices and seldom integrate pollution indices specifically designed to capture agricultural impacts, nor do they incorporate uncertainty-aware frameworks such as MCS to quantify exposure risk. Consequently, a critical gap remains in developing a unified, spatially explicit framework that simultaneously links hydrogeochemical processes, multivariate statistical structure, nitrate-driven pollution indices, probabilistic health risk assessment, and explainable ML modeling. This study addresses this gap by integrating ArcGIS-based spatial interpolation, hydrogeochemical diagnostics and ionic ratios, advanced multivariate techniques (Hierarchical Cluster Analysis (HCA), Canonical Discriminant Function Analysis (CDFA), Canonical Correlation Analysis (CCA), and Redundancy Analysis (RDA)), MCS for nitrate ingestion and dermal exposure, and Random Forest-based predictive modeling of the GPI and NPI. This multidisciplinary integration, still underutilized in Moroccan groundwater studies, moves beyond descriptive assessment toward predictive and decision-support capability, enabling the high-resolution identification of contamination hotspots, vulnerable populations, and priority intervention zones in intensively cultivated coastal regions. By coupling field-based monitoring with AI-driven spatial risk mapping, the proposed framework bridges the gap between groundwater quality assessment and actionable management strategies for sustainable groundwater protection in data-scarce agricultural systems.
The primary focus of this research is to evaluate the impact of agricultural activities and seawater intrusion on the groundwater quality of a coastal agricultural zone in Morocco using a multidisciplinary approach. The specific aims are as follows: (1) characterize groundwater hydrochemistry through physicochemical analysis and ionic ratios to identify salinization and contamination processes; (2) apply spatial interpolation techniques (IDW in ArcGIS) to visualize the distribution of key contaminants and water quality indices; (3) perform multivariate statistical analyses (HCA, DFA, CCA, and RDA) to classify groundwater samples and elucidate the relationship between parameters and pollution sources; (4) calculate and interpret the GPI and NPI to quantify contamination severity; (5) assess nitrate-related health risks using MCS for both ingestion and dermal exposure routes across adults and children; (6) develop AI-based predictive models (Random Forest) for the GPI and NPI using hydrochemical data and evaluate model performance using LOOCV and standard metrics (R2, RMSE, and MAE); and (7) generate spatial risk maps of the predicted GPI and NPI to support groundwater quality monitoring and management decisions.

2. Materials and Methods

2.1. The Survey Site of Groundwater Sampling and Laboratory Analysis

The present study was conducted in the Skhirat region, situated along Morocco’s Atlantic coastal Meseta, approximately 25 km south of Rabat and 65 km north of Casablanca (Figure 1). This coastal zone is bounded by the Ykem River to the northeast, the Cherrat River to the south, and the Atlantic Ocean to the west. Geographically, it lies within the Skhirat-Temara prefecture of the Rabat-Sale-Kenitra administrative region. The area experiences a Mediterranean climate with oceanic influence, marked by moderate annual temperatures averaging 17 °C. Rainfall is highly variable, averaging around 600 mm/year but ranging between 250 and 800 mm. Agriculture, especially intensive vegetable cultivation, dominates land use in the region and depends mainly on groundwater for irrigation. Geologically, the region exhibits a lithostratigraphic profile composed of two principal formations. The basement consists of Paleozoic rocks (shales, sandstones, and quartzites) characterized by low permeability and limited aquifer potential, except where fractures and weathering zones enhance water movement. Overlying these are Neogene and Quaternary deposits, primarily Miocene marls and Plio-Quaternary calcareous sandstones and limestones, which are generally permeable and host productive aquifers. Hydrogeologically, Skhirat is part of the subtabular coastal Meseta, where shallow unconfined aquifers exist. These are primarily recharged by runoff from adjacent catchments, particularly the Ykem and Cherrat basins, which span 430 km2 and 510 km2, respectively. The aquifer system is accessible via shallow wells and boreholes and is particularly vulnerable to both anthropogenic contamination and salinization due to its limited depth and proximity to the coast.
Groundwater monitoring was carried out in May 2025 across thirty strategically selected sites within the study area. These locations were chosen to represent various hydrogeological conditions, with particular emphasis on zones characterized by intensive agricultural activities and coastal proximity. The geographical position of the individual stations was captured using a Garmin Dakota 20 GPS. Field measurements of water quality parameters, including pH, electrical conductivity (EC), total dissolved solids (TDS), and dissolved oxygen (DO), were taken in situ using a Bante 900P portable multiparameter meter to ensure immediate data accuracy [7]. Groundwater depth was measured with a 200 m piezometric cable probe. Water samples were collected in 500 mL polyethylene bottles, previously rinsed with both distilled and site water, and filtered through 0.45 μm membranes to remove particulates. Samples were kept at ~4 °C during transportation in insulated containers to preserve their chemical integrity. All handling and sampling procedures conformed to established protocols described by Kaiser [32] and Rodier [33], and all analyses were performed in triplicate to guarantee reproducibility.
In the laboratory, a range of analytical techniques and instrumentation was employed to quantify water quality parameters. Flame photometry using a Jenway PFP7 unit was used to determine potassium (K+) and sodium (Na+) concentrations [7,33]. Chloride (Cl) levels were assessed using Mohr’s titrimetric method, while calcium (Ca2+) was measured via complexometric titration with EDTA [7].
Total hardness (TH), magnesium (Mg2+), and bicarbonate (HCO3) were also determined using standard titrimetric approaches [7,33]. Carbonate (CO32−) was quantified through classical acid–base titration. Nitrate (NO3) and ammonium (NH4+) levels were measured using Kjeldahl distillation techniques with a VELP Scientifica UDK 129 apparatus [7]. Phosphate (PO43−) was analyzed by UV–visible spectrophotometry at 880 nm using a JENWAY 6405 model, while sulphate (SO42−) concentrations were determined via the nephelometric method at 650 nm using the same spectrophotometer model [7,33].

2.2. Geospatial Mapping and Multivariate Statistical Techniques for Groundwater Characterization

To visualize the spatial variability of groundwater quality parameters across the study area, an Inverse Distance Weighted (IDW) interpolation method was employed using ArcGIS 10.8 software [34,35]. This deterministic geostatistical technique estimates values at unsampled locations based on proximity-weighted averages from surrounding data points, assuming spatial autocorrelation. IDW was selected for its robustness in representing concentration gradients, particularly in hydrochemical studies with moderate data density. The interpolation outputs allowed for the construction of thematic maps for each parameter, including major ions, salinity indicators, and pollution indices (GPI and NPI), providing a clear understanding of contaminant dispersion and hotspot zones.
In parallel, a suite of multivariate statistical analyses was applied to extract patterns, group similarities, and assess underlying hydrogeochemical processes using IBM SPSS v25. First, HCA was conducted to categorize sampling sites into distinct groups based on similarities in physicochemical characteristics and pollution indices [36,37]. To further validate and discriminate these clusters, a DFA was applied. DFA constructs canonical axes that maximize separation between predefined groups, enhancing the interpretability of cluster affiliations and identifying the most influential parameters responsible for group differentiation. Furthermore, a CCA was employed to explore the interrelationships between two sets of variables, one representing the physicochemical parameters and the other representing environmental or spatial factors. This technique allowed for the identification of paired linear combinations of variables that maximally correlate, providing insight into the interaction between water quality attributes and pollution sources. To complement the multivariate framework, RDA was also performed as a constrained ordination technique. RDA was particularly useful in explaining the proportion of variance in groundwater quality explained by anthropogenic (e.g., agricultural runoff) and natural factors (e.g., seawater intrusion), thereby highlighting key gradients influencing water chemistry [38].

2.3. Pollution Indices for Groundwater Quality Evaluation Using GPI and NPI

To assess the contamination levels of groundwater in the study area, two composite indices were utilized, the GPI and NPI [7,39]. The GPI approach, originally developed by Subba Rao [40], provides a structured framework for evaluating overall water quality by integrating the influence of key chemical parameters [41]. Each parameter is assigned a relative weight (Rw) based on its significance to water quality, and a weighted factor (Wp) is computed accordingly using Equations (1)–(4), as indicated in Table 1.
Based on the final GPI score, water quality is categorized into five pollution levels, including insignificant (<1), low (1–1.5), moderate (1.5–2), high (2–2.5) and very high pollution (>2.5) [7,43].
In parallel, the NPI was applied to specifically assess nitrate contamination, which is of major concern in agro-ecosystems [44,45]. The NPI is calculated by dividing the measured nitrate concentration (Cs) by the human-acceptable threshold (HAV), commonly set at 20 mg/L using Equation (5):
N P I = C s H A V H A V
The resulting values are classified into categories, including clean (<1), light (0–1), moderate (1–2), significant (2–3), and very significant (>3) [46]. This dual-index approach offers a comprehensive insight into both general groundwater contamination and nitrate-specific risks, thereby supporting targeted management and remediation strategies.

2.4. Human Health Risk Assessment of Nitrate Exposure Using MCS

In order to quantify the potential health risks associated with nitrate contamination in groundwater, a comprehensive health risk assessment was conducted using deterministic and probabilistic approaches [23,47]. The deterministic part involved computing the Chronic Daily Intake (CDI) via two exposure routes, including oral ingestion and dermal absorption [48,49]. The associated non-carcinogenic risk was expressed using the Hazard Quotient (HQ) and the HI [39]. For oral ingestion and dermal absorption, the chronic daily intake was calculated using Equations (6) and (7):
C D I i n g e s t i o n = C × I R × E F × E D B W × A T
C D I D e r m a l = C × S A × K p × E T × E F × E D × C F B W × A T
where “C” is nitrate concentration in groundwater (mg/L), “IR” is the ingestion rate (100 mg/day for adults; 200 mg/day for children), “EF” represent exposure frequency (180 days/year), “ED” is the exposure duration (24 years for adults; 6 years for children), “BW” is the body weight (70 kg for adults; 15 kg for children), “AT” represents averaging time (ED × 365 days), “SA” skin surface area (18,000 cm2 for adults; 6600 cm2 for children), “Kp” is the dermal permeability coefficient for nitrate (0.001 cm/h), “ET” is the exposure time (0.58 h/day), and CF = conversion factor (0.001 L/cm3) [50,51,52,53,54].
The Hazard Quotient (HQ) was computed for each pathway using Equation (8):
H Q = C D I R f D
where “RfD” is the reference dose for nitrate (1.6 mg/kg/day) [55]. The total HI was determined by summing the HQ values from ingestion and dermal exposure pathways using Equation (9):
H Q = H Q i n g e s t i o n + H Q d e r m a l
To account for uncertainty and inter-individual variability in nitrate exposure, an MCS with 10,000 iterations was implemented [2,23,56]. Nitrate concentration was modeled using a lognormal distribution to reflect its positively skewed environmental behavior, while exposure parameters, including body weight and ingestion rate, were represented by normal distributions based on standard health risk assessment guidelines. Exposure frequency and duration were treated as fixed values consistent with the deterministic assessment. The simulation generated probabilistic estimates of HQ and HI, summarized by the mean, median, and 95th percentile for both adults and children [57]. A sensitivity analysis embedded within the simulation consistently identified nitrate concentration and ingestion rate as the dominant contributors to overall health risk variability, confirming the robustness of the probabilistic framework. This approach enhances the reliability of nitrate health risk assessment by quantifying uncertainty and identifying high-risk populations and locations more effectively than deterministic methods alone.

2.5. AI-Based Modeling for Groundwater Pollution Indices Prediction

2.5.1. Input Dataset and Preprocessing

The ML framework was developed using a dataset derived from 30 groundwater sampling sites, where each sample represents a unique hydrogeochemical condition within the coastal aquifer system. The input feature matrix consisted exclusively of measured physicochemical parameters that are routinely monitored in groundwater quality assessments, including pH, EC, TDS, major cations (Ca2+, Mg2+, Na+, and K+), major anions (Cl, SO42−, and HCO3), and nutrient indicators (NO3, NH4+, and PO43−). The target variables were the computed GPI and NPI, which integrate multiple water quality attributes and represent composite indicators of groundwater degradation.
Prior to modeling, all input variables were subjected to a rigorous preprocessing workflow. Continuous variables were first screened for missing values and analytical inconsistencies; no imputation was required due to complete datasets. To ensure comparability among predictors with different physical units and magnitudes, min–max normalization was applied, scaling each feature to the [0–1] range. This step is particularly critical for distance-based and ensemble learning algorithms, as it prevents variables with larger numeric ranges (e.g., EC, TDS) from disproportionately influencing model learning [58]. Given the relatively small sample size, outlier detection was conducted using interquartile range (IQR) analysis. Identified extreme values were retained, as they represent environmentally meaningful conditions (e.g., high salinity or nitrate hotspots) rather than measurement artifacts. This decision preserves the hydrogeochemical variability necessary for robust pollution modeling.
To evaluate model generalization under data-scarce conditions, a Leave-One-Out Cross-Validation (LOOCV) strategy was adopted. Given the limited sample size (n = 30), conventional k-fold cross-validation would substantially reduce the number of training samples in each fold, potentially increasing variance and leading to unstable performance estimates. In contrast, LOOCV maximizes the use of available data by iteratively training the model on n − 1 samples and validating it on the remaining observation, ensuring that each sample contributes equally to both training and testing phases. This approach minimizes sampling bias and provides a nearly unbiased estimate of model predictive performance, particularly for small environmental datasets where data representativeness is critical. Although LOOCV can increase computational cost, this limitation is negligible for the dataset size used in this study. Consequently, LOOCV has been widely recommended and successfully applied in groundwater quality modeling to ensure robust and reproducible evaluation under limited data availability [59].

2.5.2. ML Algorithms and Experimental Design

Four supervised regression algorithms were implemented to predict GPI and NPI, including RF, GBR, SVR with radial basis function kernel, and ANN. These models were selected to represent different learning paradigms, including ensemble tree-based methods, kernel-based learners, and nonlinear connectionist models. Hyperparameter optimization for all models was conducted using grid-based tuning nested within the LOOCV framework to avoid information leakage (Table 2).
RF was designed as the primary model due to its proven robustness in hydrogeochemical applications, particularly under conditions of multicollinearity and nonlinear interactions [60,61]. The RF model constructs an ensemble of decision trees using bootstrap sampling, with random feature selection at each split, thereby reducing variance and improving generalization. GBR was implemented as a complementary ensemble method that builds trees sequentially, each correcting the residuals of the previous model. This approach is effective for capturing subtle nonlinear relationships but can be sensitive to overfitting when sample sizes are small. SVR was employed to explore kernel-based learning, capable of modeling complex nonlinear patterns through high-dimensional feature transformations. However, SVR performance strongly depends on kernel parameters and regularization, which can be difficult to optimize with limited data. ANNs were implemented using a multilayer perceptron architecture with a single hidden layer. While ANNs are powerful universal approximators, they require careful regularization and sufficient training data to avoid instability and overfitting.

2.5.3. Model Evaluation Metrics and Validation

Model performance was assessed using three complementary metrics: the coefficient of determination (R2), root mean square error (RMSE), and mean absolute error (MAE). R2 quantifies the proportion of variance explained by the model, while RMSE and MAE provide absolute measures of prediction error, with RMSE being more sensitive to large deviations [62,63].
Performance metrics were computed exclusively on LOOCV predictions, ensuring that reported values reflect true out-of-sample behavior rather than optimistic in-sample fits. This design strengthens the credibility of the predictive framework and aligns with best practices in environmental ML.

2.5.4. Model Performance Comparison, Interpretation, and Spatial Decision-Support Integration

The predictive performance of the four ML models was systematically evaluated using out-of-sample validation to ensure reliable comparison. Although all tested algorithms exhibited acceptable predictive accuracy for groundwater pollution indices, RF consistently outperformed the other models, achieving the highest coefficients of determination for both indices (R2 = 0.76 for GPI and R2 = 0.95 for NPI). This superior performance confirms the strong capability of RF to capture complex, nonlinear relationships between hydrogeochemical variables and composite pollution indices in coastal aquifer systems.
The comparatively higher accuracy of RF can be attributed to its ensemble structure, which reduces variance through bootstrap aggregation and random feature selection at each node. This design is particularly effective for groundwater datasets characterized by multicollinearity, heterogeneous processes, and limited sample sizes. In contrast, GBR and SVR, while capable of modeling nonlinearities, showed slightly reduced stability, likely due to their sensitivity to hyperparameter tuning under data-scarce conditions. ANN exhibited reasonable performance but required stronger regularization to avoid overfitting, underscoring the advantage of tree-based ensembles for hydrogeochemical applications.
Beyond prediction accuracy, RF offers a key methodological advantage through its interpretability. Variable importance analysis, quantified using the mean decrease in the impurity criterion, revealed that EC, NO3, Na+, and Cl were the most influential predictors for both GPI and NPI. These results provide process-level insight, confirming that salinity indicators linked to seawater intrusion and nutrient loading associated with agricultural activities jointly control groundwater pollution dynamics in the study area. The alignment between RF-derived importance rankings and established hydrogeochemical understanding strengthens confidence in the model and avoids the “black-box” limitation often associated with AI-based approaches.
To translate predictive modeling outcomes into operational decision support, the RF-predicted GPI and NPI values were spatially interpolated using IDW in a GIS environment. The resulting spatial distribution maps delineate clear pollution gradients and hotspot zones, particularly along the coastal fringe and intensively cultivated areas. These spatial outputs enable the identification of priority zones for groundwater protection, targeted monitoring, and remediation planning, thereby bridging the gap between data-driven modeling and practical groundwater management.
The flowchart of the procedures used in this study is shown in Figure 2.

3. Results and Discussion

3.1. Physicochemical Characteristics of Groundwater in the Coastal Area

Groundwater quality parameters revealed significant variability across the study region, reflecting both natural processes and anthropogenic influences (Figure 3). The pH values ranged from 6.91 to 7.73, with a mean of 7.33, indicating a slightly alkaline nature typical of carbonate-rich aquifers [7]. These values remained within the WHO permissible limits (6.5–8.5), suggesting stable acid–base conditions. The low (CV = 2.42%) confirmed minimal spatial fluctuation in pH, indicating relatively uniform buffering capacity throughout the aquifer system. EC and TDS, key indicators of salinity, demonstrated more pronounced variability [64].
EC ranged between 1.37 and 6.30 mS/cm (mean = 2.62 mS/cm), significantly surpassing the WHO threshold of 1 mS/cm in most samples. The high CV = 35.45% and strong positive skewness (1.92) point toward distinct salinity hotspots likely associated with seawater encroachment and evaporative concentration. TDS values, varying from 850.9 to 1521 mg/L (mean = 1183.81 mg/L), further corroborate widespread salinization, as all samples exceeded the WHO recommended limit (500 mg/L). This is consistent with the coastal hydrogeological setting, where marine intrusion is a prevailing threat. DO levels ranged from 0.50 to 3.36 mg/L, with a mean of 1.42 mg/L. These depressed values, well below the recommended 5 mg/L, indicate reducing redox conditions, which can enhance the solubility and mobility of redox-sensitive elements (e.g., Fe, Mn). The high variability (CV = 62.01%) and low kurtosis (–0.75) suggest site-specific influences, such as localized organic matter degradation or microbial respiration in agricultural zones.
K+, an indicator of fertilizer application and mineral weathering, exhibited concentrations from 0.6 to 17.3 mg/L (mean = 3.86 mg/L). The extreme CV of 91.27% and positive kurtosis (4.67) reflect significant anthropogenic input, particularly in intensively farmed plots. Although the WHO threshold is 10 mg/L, approximately 17% of the samples exceeded this limit, highlighting agrochemical pressures.
Na+ levels in the analyzed groundwater samples exhibited considerable spatial and numerical variation, ranging from 108.12 mg/L to 749.81 mg/L, with a mean concentration of 284.42 mg/L. All samples exceeded the WHO-recommended limit of 200 mg/L for drinking water, suggesting significant salinization. Sodium’s dominance in the ionic composition can deteriorate soil structure by promoting clay dispersion, thereby reducing infiltration and aeration, which ultimately impairs root development and crop productivity [65]. Cl, a conservative ion often used as a tracer of marine origin, followed a similar spatial pattern, with values ranging between 224.11 and 1775.26 mg/L. The mean value (643.26 mg/L) is more than double the WHO threshold (250 mg/L), with over 90% of the samples exceeding the guideline. The high Na+/Cl ratios in some locations further hint at complex hydrochemical processes, possibly involving cation exchange or anthropogenic contamination sources such as irrigation return flows [66].
Ca2+ and Mg2+, major contributors to total water hardness, showed concentrations that exceeded WHO acceptable limits in 80% of the samples. Ca2+ ranged from 64 to 340 mg/L (mean = 218.00 mg/L), while Mg2+ varied between 48 and 129.6 mg/L (mean = 96.20 mg/L). The presence of these cations can be attributed to both seawater mixing and carbonate rock weathering within the aquifer [67]. TH, a combined measure of Ca2+ and Mg2+, varied between 165.6 and 477.6 mg/L with a mean value of 314.20 mg/L. This classifies the water as “very hard” in more than 75% of the samples according to standard classifications. High TH levels compromise water suitability for domestic use and, in agricultural contexts, may lead to scale formation in irrigation equipment and reduce water infiltration rates in soils [68]. CO32− and HCO3, key indicators of the buffering capacity of groundwater, were also elevated. CO32− ranged from 123 to 283.5 mg/L (mean = 223.24 mg/L), and HCO3 from 260.45 to 630.2 mg/L (mean = 453.92 mg/L). These high values suggest significant interaction with carbonate-rich lithologies, such as limestone or dolomite [69].
NO3, an essential parameter indicating anthropogenic pollution, particularly from fertilizers and sewage, varied from 6.23 to 111.56 mg/L with a mean of 40.30 mg/L. Approximately 33% of the samples exceeded the WHO permissible limit of 50 mg/L. The mobility of NO3 in soils makes it a persistent threat to both human health and environmental quality. NH4+, a product of organic matter decomposition and potentially indicative of manure or sewage infiltration, ranged from 0.5 to 5.4 mg/L, far above the natural background concentration of 0.5 mg/L. P concentrations in groundwater ranged between 0.12 and 2.35 mg/L, with a mean value of 1.45 mg/L. Over half of the samples exceeded the typical natural concentration limit (0.1–0.3 mg/L). High P levels in groundwater are rare unless linked to anthropogenic sources such as fertilizer leaching, which seems to be the case in samples from high-input agricultural areas. Elevated phosphorus can contribute to eutrophication if discharged into surface water bodies. SO42−, often derived from both marine sources and agrochemicals like ammonium sulfate fertilizers, showed concentrations between 202.94 and 465.98 mg/L (mean = 367.07 mg/L). About 60% of samples exceeded the WHO limit of 250 mg/L. High sulfate concentrations can impart a bitter taste to water and affect crop performance by interfering with nutrient uptake.

3.2. Geospatial Patterns of Groundwater Contamination

The spatial distribution of groundwater quality parameters reveals clear geographical patterns influenced by seawater intrusion and intensive agricultural activity. The pH values were relatively stable across the region, showing neutral to slightly acidic conditions, with localized acidification in the southeastern inland area potentially linked to acidic fertilizers or natural soil leaching (Figure 4).
In contrast, EC and TDS exhibited pronounced gradients, with the highest concentrations detected in the northwestern and southwestern coastal zones. These elevated values are indicative of direct seawater intrusion, especially around sites P13 and P21 near the Atlantic margin.
DO concentrations were significantly lower in central and southeastern agricultural regions, suggesting oxygen depletion due to organic matter decomposition and fertilizer input, which creates reducing conditions that may mobilize trace metals [70]. Over 60% of the samples exceeded this threshold, especially in wells located in zones of intensive agricultural activity (e.g., P1, P4, and P20). These findings point to reducing conditions in the aquifer, which may enhance ammonium retention and accumulation. HCO3 concentrations were higher in the inland northeastern zone, reflecting geochemical buffering from carbonate-rich lithologies, while lower levels near the coast were likely due to seawater dilution. Notably, the highest HCO3 values were observed in inland zones (e.g., P2, P29), indicating a dominant influence from geological formations. Conversely, lower levels in coastal samples point to dilution by seawater, which typically has lower bicarbonate content. NH4+ showed spatial hotspots in intensively cultivated inland zones, likely resulting from manure leaching and reduced oxygen levels. Similarly, high Na+ and Cl concentrations in the northwestern zone are strong indicators of marine intrusion (Figure 5).
The elevated concentrations of Na+, especially in wells located near the coastal fringe (e.g., samples P5, P13, and P21), are indicative of seawater intrusion, a common process in overexploited coastal aquifers.
Cl concentrations peaked at sampling points closer to the Atlantic coastline (notably P13, P14, and P24), strongly supporting the hypothesis of marine encroachment into the freshwater aquifer. Ca2+ concentrations were higher in inland wells (e.g., P16, P24), likely influenced by lithology, while Mg2+ concentrations were higher along the coast (e.g., P13, P14), pointing to marine sources. TH was consistently high in both coastal and inland zones, exceeding acceptable thresholds due to high Ca2+ and Mg2+ content.
SO42− concentrations were notably elevated in central-western zones, pointing to a dual origin from seawater mixing and fertilizer use. The spatial distribution indicates sulfate enrichment in coastal locations (e.g., P13, P14) and central inland regions (e.g., P20), suggesting a dual influence of seawater mixing and agricultural return flows. Finally, nutrients such as NO3, PO43−, and K+ were more concentrated in inland agricultural areas, with the highest levels corresponding to zones of intense fertilizer application and leaching (Figure 6).
Elevated NO3 levels were mostly detected in samples from the inland agricultural zones (e.g., P1, P26, P27), confirming contamination from agrochemical inputs. Overall, the spatial patterns highlight two dominant pollution regimes, coastal salinization from seawater intrusion and inland agrochemical contamination, both of which pose serious threats to groundwater quality and agricultural sustainability.

3.3. Hydrogeochemical Characterization

3.3.1. Durov Diagram

The Durov diagram provides a comprehensive visual classification of groundwater chemistry by integrating the relative proportions of major cations (Ca2+, Mg2+, and Na+ + K+) and anions (Cl, SO42−, and HCO3 + CO32−), along with auxiliary indicators, such as pH and TDS (Figure 7).
The interpretation of the plotted samples revealed key insights into the hydrochemical processes governing the groundwater system in the study area.
The cation ternary plot shows that the majority of samples are clustered in the Mg2+-dominated region, indicating the influence of both lithological sources (e.g., dolomitic weathering) and possible marine inputs [71]. A smaller group of samples exhibited elevated proportions of Na+ + K+ (notably P5, P13, and P21), suggesting ion exchange processes or seawater mixing. In the anion ternary plot, the dominance of HCO3 + CO32− in most samples reflects active water–rock interaction and carbonate weathering, particularly in inland zones (e.g., P2, P29), whereas samples with high SO42− and Cl (e.g., P13, P14, and P24) point to seawater intrusion and agricultural inputs. The central matrix of the Durov diagram integrated both ionic compositions, with most samples falling within fields indicative of mixed water types and processes, such as simple dissolution, reverse ion exchange, and seawater mixing. Samples located in the upper-right quadrant, corresponding to high Na+ + K+ and Cl, demonstrate a clear marine signature, supporting previous findings from EC, TDS, and Cl spatial analysis. The pH vs. TDS plot shows a general trend of neutral to slightly alkaline pH values, with TDS ranging from 850 to 1500 mg/L. The highest TDS values correspond to samples influenced by seawater intrusion (P13, P21), while lower TDS levels reflect fresher recharge sources.
The Na+ + K+ vs. Cl plot confirms that samples with high Cl also exhibit elevated alkali metals, reinforcing the inference of salinization pathways.
Overall, the Durov diagram reinforces the interpretation that two dominant hydrochemical processes shape groundwater quality in the study area. First, seawater intrusion along the coastal margin, and second, carbonate dissolution and agricultural return flow in inland regions. This dual influence aligned with both the spatial distribution of physico-chemical parameters and the broader geological and land-use context of the region.

3.3.2. Hydrochemical Facies Evolution Diagram (HFE-D)

The HFE-D illustrates the dynamic geochemical processes affecting groundwater quality in the Skhirat coastal aquifer (Figure 8) [72].
Based on the RFE (Reverse-Facies Evolution) diagram presented, groundwater samples from the Skhirat coastal aquifer exhibit a distinct hydrochemical evolution pattern driven by seawater intrusion and mineral dissolution processes. According to the legend in the figure, the samples are primarily distributed across five major hydrochemical facies zones, including Ca-MixCl (15), MixCa-Cl (12), MixCa-MixCl (11), MixCa-MixHCO3/MixSO4 (10), MixNa-MixCl (7), and MixNa-Cl (8). This distribution reflects a clear progression from freshening-dominated facies to more saline and intrusion-influenced zones.
Most notably, a significant concentration of the samples plot within facies 15 (Ca-MixCl), facies 11 (MixCa-MixCl), facies 7 (MixNa-MixCl), and facies 8 (MixNa-Cl), located in the lower-right quadrant of the diagram. These zones indicate advanced stages of hydrochemical alteration due to marine water intrusion, with high proportions of calcium and chloride ions. These samples lie along or close to the intrusion curve, confirming strong marine influence and limited carbonate buffering, typically observed in overexploited coastal aquifers. In contrast, a few samples fall within facies 10 and 6, corresponding to MixCa-MixHCO3/MixSO4 and MixNa-MixHCO3/MixSO4, suggesting zones where freshwater recharge is more prevalent, or mixing is at an intermediate stage. These zones are found closer to the freshening trajectory in the diagram, suggesting partial buffering capacity from carbonate-rich geological formations and less exposure to marine intrusion.
In summary, the RFE diagram confirms a dual geochemical regime across the study area, with dominant intrusion-driven salinization in the central and coastal wells and minor freshening signatures in inland recharge-dominated zones. This diagnostic tool thus supports the findings from Durov and spatial analyses, reinforcing the need for targeted groundwater management and salinity control strategies in intrusion-affected agricultural zones.

3.3.3. Cl/HCO3 Ratio

The Cl/HCO3 ratio is a widely used hydrochemical indicator for assessing seawater intrusion in coastal aquifers. In this study, the diagram reveals a clear separation between groundwater samples influenced by marine water and those dominated by terrestrial sources (Figure 9).
Approximately 40% of the samples (P1, P2, P13, P14, P20, P21, P23, and P24) exhibited Cl/HCO3 ratios exceeding 1, indicating a significant intrusion of seawater into the freshwater aquifer. These points are predominantly located along the western and northwestern coastal margin, consistent with earlier observations from the EC, TDS, and Na+/Cl spatial patterns. Conversely, the majority of inland samples, such as P3, P5, P6, and P29, showed ratios well below 1, suggesting minimal or no marine influence and a dominance of bicarbonate from carbonate-rich lithological weathering. This distribution reinforces the dual pollution pattern in the study area, with seawater intrusion prevailing in the coastal fringe and geogenic or agricultural contamination inland.

3.4. Groundwater Pollution and Nitrate Contamination Assessment Using GPI and NPI Indices

The GPI values in the study area ranged from 0.80 to 2.66, with a mean value of 1.48, indicating varying degrees of pollution severity across sampling sites (Figure 10).
According to the classification scheme, 15 samples fell under the category of “low pollution”, 11 samples were categorized as “moderate pollution”, 3 samples exhibited “insignificant pollution”, and 1 sample was classified as experiencing “high pollution”. Notably, the maximum GPI value (2.66) was observed at sample P14, which was taken from the coastal fringe and was likely influenced by both seawater intrusion and anthropogenic inputs. These results emphasize the urgent need for integrated water quality monitoring and pollution control strategies, especially in zones with intensive agriculture and proximity to the Atlantic Ocean, where salinization and contaminant accumulation are most pronounced.
The NPI values across the samples ranged from a minimum of −0.69 (P2, P3) to a maximum of 3.96 (P1), with a mean value of 0.86. According to classification criteria, 10 samples (33.3%) were classified as “Clean”, including P2, P3, and P5, where nitrate concentrations were negligible or below health risk thresholds. In total, 30% of samples exhibited “Light pollution” levels, while two samples, namely, P15 and P16, were in the “Moderate” class. Additionally, five samples showed “Significant” nitrate contamination, and four samples were placed in the “Very Significant” class, including P1, which recorded the highest NPI value. The elevated NPI values in these areas point to intensive agricultural practices, particularly excessive nitrogen fertilization and poor irrigation management, as the primary sources of nitrate leaching. These results emphasize the urgent need for targeted nitrate pollution control in hotspot zones to prevent groundwater degradation and associated health risks.

3.5. Integrated Multivariate Analysis of Groundwater Chemistry and Risk Indices in Coastal Aquifers

3.5.1. Hierarchical Cluster Analysis (HCA) and Canonical Discriminant Function Analysis (DFA)

The HCA classified the groundwater samples into three distinct clusters based on similarities in their physicochemical characteristics and pollution indices (GPI and NPI), revealing clear hydrogeochemical patterns in the coastal aquifer (Figure 11).
Cluster 1 (Red) includes the majority of the samples, and it is characterized by moderate to high values of EC, TDS, and salinity-related ions (Na+, Cl), reflecting the influence of seawater intrusion and agricultural inputs [73]. The relatively higher values of GPI and NPI within this group indicate deteriorated groundwater quality with both salinization and nitrate contamination. Cluster 2 (Blue) comprises samples P10, P11, P22, P23, and P24, which show intermediate chemical composition. These wells were likely affected by mixed processes, moderate agricultural activity, and partially buffered by geological formations, resulting in moderate GPI and NPI values and representing a transitional hydrochemical zone. Cluster 3 (Green) includes only P13 and P16, which are spatially located closer to the coastline and are clearly impacted by significant marine intrusion. These samples exhibited the highest EC and Cl concentrations, along with elevated GPI, indicating a severe degradation in groundwater quality and strong salinization. This clustering confirms the existence of distinct hydrochemical regimes within the aquifer system, linked to both natural (marine encroachment and lithology) and anthropogenic (fertilization and irrigation) factors.
The DFA effectively distinguished the groundwater samples into three clearly separated clusters in the reduced two-dimensional canonical space, validating the structure revealed in the HCA. The first canonical function (Canonical Variable 1) explains the major variation and separates Cluster 3 (green), including samples P13 and P16, far from the centroid of the other clusters, indicating a distinct hydrochemical and pollution signature. These samples are likely associated with elevated levels of pollutants or different geochemical controls. Cluster 2 (blue), consisting of samples P10, P11, P22, P23, and P24, forms a relatively tight group along the negative axis of Canonical Variable 1, suggesting shared moderate groundwater quality characteristics, potentially reflecting anthropogenic impacts like nitrate enrichment from agricultural sources, as seen from their GPI and NPI profiles. Cluster 1 (red), the largest group, occupies the central region with more dispersed points, reflecting intermediate to low pollution status. This cluster includes the majority of samples, such as P1, P2, P3, P4, and P30, representing relatively stable groundwater composition possibly under mixed natural and anthropogenic influence. This analysis confirms that both physicochemical parameters and pollution indices (GPI and NPI) jointly contribute to differentiating groundwater quality and potential risk zones across the aquifer system.

3.5.2. Canonical Correlation Analysis (CCA)

The CCA biplot offers valuable insight into the relationships between groundwater samples and hydrochemical variables by projecting their correlations onto two canonical axes (Figure 12). Canonical Axis 1, oriented horizontally, accounts for the majority of variation within the dataset and clearly separates samples based on salinity and seawater intrusion indicators, including EC, TDS, Cl, Na+, and Mg2+. Groundwater samples located in the upper-right quadrant of the biplot, specifically P13, P14, and P21, exhibit strong associations with these salinity parameters, indicating significant influence from seawater intrusion in these coastal zones. Canonical Axis 2, running vertically, captures the secondary gradient in the data, primarily influenced by nutrient-related pollution. Samples such as P1, P26, and P27 are positioned near the vectors of NO3, NH4+, and PO43−, suggesting elevated nutrient concentrations resulting from agricultural runoff and fertilizer leaching. These samples are predominantly located in the inland agricultural zones, where anthropogenic inputs are most intense. In the lower quadrants of the biplot, hydrochemical variables like Ca2+, HCO3, and pH show strong influence, indicating the effect of natural geochemical processes such as carbonate weathering and soil–water interaction in non-saline inland aquifers. The spatial orientation of these parameters relative to the samples suggests lithological control over groundwater chemistry in these regions. Interestingly, some parameters, such as Mg2+ and SO42−, are projected along diagonal vectors, indicating that their spatial variability may be attributed to both marine sources and anthropogenic activities. This dual origin aligns with their presence in both seawater and agrochemical inputs, reflecting complex interactions between natural and human-induced processes in shaping groundwater composition [74].
Overall, the CCA biplot effectively delineates two dominant pollution regimes: coastal salinization due to seawater intrusion and inland nutrient enrichment from agriculture, while also highlighting the transitional nature of hydrochemical processes in zones affected by both marine and lithological influences.

3.5.3. Redundancy Analysis (RDA)

The RDA biplot provides a comprehensive visualization of the key hydrogeochemical processes shaping groundwater quality across the study area. The orientation and magnitude of the vectors (representing variable loadings) illustrate the influence of both natural and anthropogenic factors (Figure 13).
Parameters such as Na+, Cl, EC, and TDS project strongly along the positive direction of RDA Axis 1. These variables are closely aligned with groundwater samples collected near the coastal margin, highlighting the dominant effect of seawater intrusion on groundwater chemistry in these zones. The strong loadings of Na+ and Cl, along with EC and TDS, confirm that salinity-related parameters are the primary contributors to spatial variation in coastal groundwater [75]. Conversely, nutrient-related parameters, including NO3, NH4+, and P, are oriented in a different direction and show close association with samples from the inland agricultural areas. This pattern reflects the influence of agrochemical inputs, particularly from fertilizer application and organic waste infiltration, which are common in intensively cultivated zones.
The distinct positioning of these samples relative to the nutrient vectors indicates localized contamination and groundwater enrichment due to anthropogenic land use. Moreover, hydrogeochemical parameters such as HCO3 and pH are moderately loaded along Axis 2 and are more centrally located in the biplot. Their positioning suggests that these variables contribute to buffering capacity and geochemical equilibrium, likely influenced by carbonate weathering and lithological characteristics in inland aquifers. These factors represent more natural geochemical controls, distinguishing them from the anthropogenic signals of salinity and nutrient enrichment. The overall distribution of the samples along the two RDA axes illustrates a clear geochemical and spatial gradient. Coastal wells cluster toward high salinity vectors, while inland wells are more closely associated with nutrient pollution indicators. Transitional samples are scattered between these two extremes, indicating overlapping influences from both seawater mixing and agricultural inputs. This RDA effectively differentiates groundwater contamination regimes and demonstrates that seawater intrusion and fertilizer-induced pollution are the two principal forces driving groundwater quality variability in the coastal aquifers of the study area [72].

3.6. Probabilistic Nitrate Health Risk Based on MCS

The MCS provided a probabilistic distribution of nitrate-related health risks through ingestion for both adults and children, assessed via the HQ [76]. The results are summarized using the 95th percentile to reflect a conservative risk estimate, as is standard in human health risk assessments. From the heatmap and bar graph visualization, a clear distinction emerges between the risk levels experienced by children compared to adults (Figure 14).
In terms of exceedance, 11 out of 30 samples (36.7%) showed HQ > 1 for children, indicating a potential health risk. In contrast, only three samples (10%) exceeded the HQ threshold for adults. The samples exceeding the threshold for adults were P1, P26, and P27, while for children, the high-risk samples were more widespread and included: P1, P4, P7, P9, P12, P22, P26, P27, P28, P29, and P30. This pattern strongly emphasizes the increased vulnerability of children, whose lower body weight and higher water intake per body mass resulted in a greater dose exposure [2]. The sample P1 recorded the highest HQ for both adults and children, highlighting a site of critical concern for nitrate contamination.
The HQ values reflect the influence of agricultural runoff, particularly in zones of intensive fertilizer application. The elevated nitrate levels in these zones, when combined with chronic exposure scenarios (modeled through 10,000 iterations), revealed a non-negligible risk of health effects, such as methemoglobinemia (blue baby syndrome), particularly in children [77].
The probabilistic health risk assessment using MCS revealed significant variability in the non-carcinogenic risks posed by nitrate exposure through groundwater consumption, particularly when comparing risk levels between children and adults [1]. The HI, which represents the cumulative risk from both ingestion and dermal pathways, indicates that several sampling sites in the study area exceed the critical threshold of HI = 1, particularly for children, highlighting potential health concerns (Figure 15).
For children, the 95th percentile HI values exceeded 1 in 11 sampling points (P1, P4, P7, P9, P12, P22, P26, P27, P28, P29, and P30), suggesting a high probability of adverse health effects associated with prolonged exposure to elevated nitrate levels in groundwater. This vulnerability is primarily due to children’s lower body weight, higher intake of water per body mass, and greater physiological sensitivity to nitrate toxicity [78]. For adults, the risk was comparatively lower, with only three samples (P1, P26, P27) showing HI values above the safety threshold. This pattern emphasizes the age-dependent variation in health risk, underscoring the importance of targeted risk assessment for sensitive populations. The elevated HI values across these samples are directly linked to nitrate concentrations exceeding the WHO’s recommended limits of 50 mg/L in several locations.
Spatially, these high-risk sites are concentrated in inland agricultural zones, where excessive application of nitrogen-based fertilizers, animal manure leaching, and poor irrigation management practices contribute to nitrate accumulation in shallow aquifers [79]. Additionally, the lack of vegetative buffer strips, inefficient drainage systems, and intensive cropping cycles exacerbate nitrate mobility, increasing its transport to the groundwater table [80]. From a hydrogeochemical perspective, these findings also correlate with other parameters, such as low DO and high NH4+ in the same areas, which indicate reducing conditions in the aquifer that further influence nitrogen transformations and nitrate persistence.
The consequences of chronic nitrate exposure through drinking water, particularly in children, include risks of thyroid dysfunction, impaired oxygen transport, developmental delays, and long-term metabolic issues [81]. In regions where groundwater is the sole source of drinking water, these health outcomes pose a serious public health threat. The Monte Carlo Simulation-based HI analysis provides a robust and probabilistic estimation of nitrate-related health risks. The results underscore the urgency of implementing nitrate mitigation strategies, especially in vulnerable inland zones.

3.7. Ion Ratios for Nitrate Pollution Source Identification

Ion ratios are a well-established approach to identify sources of nitrate pollution in groundwater, especially when natural and anthropogenic contributions overlap. The present study uses three diagnostic scatter plots to provide insights into the processes governing nitrate enrichment and its relationship with other major ions (Figure 16).

3.7.1. Cl/Na+ vs. NO3/Na+

This plot aims to distinguish between marine and non-marine sources of Cl and nitrate contributions. In pristine groundwater, Cl and Na+ are often found in equimolar concentrations due to halite dissolution or sea aerosol input, resulting in a Cl/Na+ ratio close to 1. However, elevated NO3/Na+ values at relatively stable or low Cl/Na+ ratios, as seen in several samples in this study, suggest nitrate contamination that is not linked to a marine origin. This strongly points toward anthropogenic sources, particularly agricultural activities, such as excessive use of nitrogen-based fertilizers, manure, and irrigation return flow [82]. The presence of nitrate at elevated levels without corresponding increases in Cl confirms this agricultural imprint.

3.7.2. Cl vs. NO3/Cl

This ratio is used to separate diffuse versus point-source pollution. In natural water, Cl behaves conservatively and is primarily of marine or atmospheric origin, while NO3 is typically from anthropogenic inputs. An inverse relationship, as observed here, where higher Cl corresponds to lower NO3/Cl ratios, suggests mixing processes and the dilution of nitrate in high-chloride waters. This could reflect areas affected by agricultural leaching with Cl input from fertilizers or saline irrigation, while NO3 is increasingly diluted. High NO3/Cl ratios at low Cl levels point to regions where nitrate pollution is dominant and not masked by salinity, again highlighting fertilizer overuse.

3.7.3. NO3/Na+ vs. SO42−/Na+

This ratio reflects co-contamination from agriculture, where both nitrate and sulfate can originate from the application of ammonium sulfate or manure. The strong co-variation in some samples, with elevated NO3/Na+ corresponding to high SO42−/Na+, indicates a common pollution source, likely agricultural runoff rich in both ions. Sulfate here serves as a conservative tracer of manure and fertilizer application. A few outlier samples with high ratios in both axes emphasize intensive input, possibly related to greenhouse cultivation or high livestock density.
The results of these ratio plots collectively indicate that nitrate pollution in the groundwater system is predominantly anthropogenic and largely driven by agricultural practices. This is supported by the disproportionate increase in NO3 relative to conservative ions like Cl and Na+, and the coupled behavior of NO3 with SO42−. These findings corroborate the earlier probabilistic health risk assessments (HQ and HI), reinforcing the conclusion that certain zones within the study area are at risk due to unsustainable nitrate loading. Spatial planning, nitrate budgeting, and fertilizer management strategies are urgently required to mitigate this pollution and reduce associated health risks, particularly for vulnerable groups, such as children.

3.8. Application of AI and ML Models for GPI and NPI Prediction

3.8.1. Model Selection and Performance

The prediction of groundwater pollution indices using AI and ML represents an innovative and powerful approach for environmental risk assessment. In this study, several ML algorithms were tested to predict the GPI and the NPI based on a dataset of groundwater samples. The models evaluated included RF, ANN, GBR, and SVR [1,83]. To ensure model robustness and minimize overfitting given the limited dataset size, we applied LOOCV, a reliable method when working with small sample sizes. This validation approach allowed for the systematic testing of each model’s generalization performance by training on a select number of samples and testing on the remaining ones, iterating this process 30 times [84]. Among the tested models, the RF Regressor consistently outperformed the others in terms of both prediction accuracy and error minimization. For NPI prediction, the model achieved a coefficient of determination (R2) of 0.95, indicating that 95% of the variance in observed nitrate pollution levels could be explained by the model (Figure 17).
For GPI prediction, the R2 was 0.76, a respectable value that still demonstrates substantial explanatory power. Error metrics further supported the model’s performance: the Root Mean Square Error (RMSE) and the Mean Absolute Error (MAE) values were lower for NPI than for GPI, suggesting tighter clustering of predicted values around actual observations, especially for nitrate contamination. The choice of the RF algorithm was guided by its unique capabilities and flexibility. RF is an ensemble learning technique that constructs a multitude of decision trees during training and outputs the average prediction of individual trees, thereby reducing overfitting and variance [60].
It is particularly effective for nonlinear relationships and datasets with multicollinearity or noise, as is often the case in environmental datasets. It also provides internal measures of variable importance, allowing for the interpretation of which physicochemical parameters most influenced the predictions. In this analysis, the model identified parameters such as EC, NO3, Na+, and Cl as key drivers of pollution indices. On the other hand, while ANN and SVR performed moderately well, their prediction errors were higher, and they required intensive parameter tuning, which did not lead to significant improvements. ANN models, in particular, are known for their sensitivity to hyperparameter initialization and are often prone to overfitting with small datasets unless regularized properly. SVR models showed good performance in certain cases but failed to generalize consistently across the cross-validation folds. The predicted values from the RF model were computed by training the model on groundwater samples and predicting the value for the excluded sample. This was repeated 30 times, yielding predicted GPI and NPI values for all sites. These predictions were then compared to actual measured indices, and performance metrics were computed based on the differences. The model’s ability to replicate the spatial and numerical trends in pollution indices highlights its potential for future groundwater monitoring and risk mapping, especially in regions lacking sufficient direct measurements.

3.8.2. Predictive Modeling and Spatial Mapping of GPI and NPI Using AI-Based Regression Approaches

The regression model used for GPI prediction demonstrates a strong fit between actual and predicted values, as shown in the bar plot where green bars (actual) closely follow blue bars (predicted) (Figure 18a). This close alignment suggests that the selected ML algorithm successfully captured the nonlinear relationships between input features (e.g., NO3, Na+, Cl, and SO42−) and GPI. Only minor discrepancies are observed in a few sites, such as P13 and P26, where GPI predictions slightly over- or underestimate actual values, yet the error remains within an acceptable scientific margin. The spatial distribution map of predicted GPI further supports the model’s robustness. High GPI values are mainly concentrated in the northwestern zone of the study area (around sampling sites 13–17, 19–21), characterized by intensive agriculture, proximity to shallow groundwater, and potential leaching of nitrate and salinity. This hot zone aligns with known vulnerable groundwater recharge zones influenced by anthropogenic inputs. The southern and eastern areas exhibit lower GPI values, corresponding to deeper groundwater tables, lower pollution loads, and possible natural attenuation. This spatial heterogeneity reinforces the need for site-specific management strategies and confirms the model’s capacity to identify environmental risk zones based on complex variable interactions.
The predicted vs. actual NPI bar plot shows exceptional alignment across most sampling points (Figure 18b).
The model predicted high NPI values with remarkable precision in severely impacted sites such as P1, P2, P25, and P30. This reflects the model’s ability to identify nitrate-dominant pollution trends driven by agricultural runoff, unregulated fertilizer use, and poor waste management. Although a few points, like P10 and P22, display minor deviations between actual and predicted values, the overall pattern reflects a high R2 of 0.95, indicating excellent predictive generalization. The negative or near-zero NPI values observed in some eastern and southern locations confirm that the aquifer there is less impacted by nitrates, possibly due to lower fertilizer application or dilution by clean recharge. The spatial interpolation map of predicted NPI mirrors this pattern: the highest NPI zones are centered around sites 1–3, 26–30, which likely coincide with areas of intensive horticulture, poor irrigation practices, and shallow aquifer depths. In contrast, the central and western regions show much lower NPI values, indicating either natural protection or effective pollutant dispersion.
While both the GPI and NPI models performed strongly, the NPI model outperformed the GPI in terms of R2 and reduced error (RMSE and MAE). This discrepancy can be attributed to the nature of the indices; the NPI is highly sensitive to nitrate concentrations, which are easier to predict based on fertilizer input patterns and land use. The GPI, however, integrates multiple variables, including ions like Cl and SO42−, making its variability more complex and possibly requiring larger datasets to improve its model’s precision. From a practical standpoint, the NPI predictions can serve as early warning indicators for agricultural nitrate contamination, while the GPI predictions offer broader insights into overall groundwater salinity and ion imbalance.

3.9. Implications of Agricultural Practices on Groundwater Quality and Agro-Ecosystems in Coastal Aquifers

The results of this study demonstrate that groundwater quality degradation in the Skhirat coastal aquifer is primarily driven by the combined effects of agricultural intensification and inherent coastal vulnerability to seawater intrusion. The integrated analysis of hydrogeochemical indicators, pollution indices (GPI and NPI), multivariate statistics, Monte Carlo-based health risk assessment, and ML-derived spatial predictions reveals a dual contamination regime including salinity-dominated degradation along the coastal fringe and nitrate-driven pollution in inland agricultural zones. This duality confirms that groundwater deterioration in Skhirat is not governed by a single process but by the interaction between marine encroachment and intensive farming practices, a pattern increasingly reported in Mediterranean and North African coastal agroecosystems [85].
Agricultural influence is particularly evident in the spatial distribution of nitrate concentrations and NPI values. Inland sites, such as P1, P26, P27, and P30, consistently emerge as contamination hotspots across multiple analytical layers, including NPI classification, Monte Carlo-derived health risk indices, and RF predictions. These findings indicate that nitrate pollution in Skhirat is structurally linked to fertilizer application, irrigation return flows, and shallow groundwater tables rather than sporadic contamination events [65]. Similar nitrate-driven groundwater degradation has been reported in coastal Tunisia [86] and drought-prone agricultural plains in North Africa [87], where intensive farming and seasonal recharge dynamics exacerbate nitrate leaching. However, unlike these studies, which primarily focus on irrigation suitability or seasonal variability, the present work extends the analysis by explicitly quantifying nitrate-related human health risks, showing that 43% of sampled wells pose non-carcinogenic risks to children (HI > 1).
In parallel, salinity-related parameters (EC, Na+, Cl, and SO42−) and elevated GPI values converged spatially in the northwestern coastal sector, particularly at sites such as P13 and P14. These wells exhibited Na–Cl hydrochemical facies, extreme salinity indices, and high GPI values, consistently identified by multivariate clustering and AI-based spatial mapping. The sharp contrast between P13 (severely impacted) and nearby inland wells, such as P17, highlights the pronounced spatial gradients characteristic of coastal aquifers, where small differences in distance from the shoreline, pumping intensity, and hydraulic connectivity can lead to disproportionately large changes in groundwater quality [88].
The novelty of the present study becomes particularly evident when compared with recent ML-based groundwater assessments. While studies in Saudi Arabia [89] and Northern China [90] successfully used ML to predict irrigation water quality indices, they focused primarily on irrigation suitability and did not incorporate probabilistic health risk assessment. Similarly, advanced deep learning frameworks for nitrate mapping [91], effectively identified nitrate hotspots using explainable AI and remote sensing, but did not integrate composite pollution indices or health risk metrics. In contrast, the present work explicitly links ML-predicted pollution indices (GPI and NPI) with Monte Carlo-based human health risk assessment, thereby connecting hydrogeochemical degradation to tangible public health implications.
Compared with earlier work in the same region [28], which primarily evaluated drinking and irrigation suitability under seawater intrusion, this study advances the knowledge frontier by shifting the focus toward agriculture-driven nitrate pollution and health vulnerability. By combining deterministic indices, probabilistic uncertainty analysis, and AI-based spatial prediction, the present framework moves beyond descriptive groundwater quality assessment toward a risk-oriented and management-relevant diagnosis of coastal aquifer degradation.
From an agro-ecosystem perspective, the documented convergence of high GPI, elevated NPI, and increased health risk indices identifies zones where groundwater degradation threatens soil structure, nutrient balance, crop productivity, and food safety. Elevated salinity promotes soil sodicity and reduced infiltration, while nitrate-rich irrigation water increases the likelihood of nutrient imbalance and nitrate accumulation in edible crops. Such feedback mechanisms reinforce a cycle of declining soil health and increasing fertilizer dependence, further exacerbating aquifer pollution, as widely reported in intensively irrigated coastal regions [92].
Overall, this study provides a spatially explicit, health-oriented, and methodologically integrative assessment of how agricultural practices interact with coastal hydrogeological vulnerability to drive groundwater degradation [6]. By embedding pollution indices within an AI–Monte Carlo framework, it offers a transferable approach for identifying priority intervention zones in data-scarce coastal agroecosystems, directly addressing knowledge gaps in the current groundwater management literature.

3.10. Study Limitations and Methodological Considerations

Although the integrated framework applied in this study provides robust and coherent insights into groundwater degradation in the Skhirat coastal aquifer, certain methodological limitations should be acknowledged. The relatively limited sample size (n = 30), while adequate for hydrogeochemical characterization, index computation, and exploratory spatial analysis, constrains the generalization potential of ML models, particularly ANN. To mitigate this, conservative validation strategies such as LOOCV, early stopping, and constrained model architectures were adopted, with RF showing greater stability under small-sample conditions. Nevertheless, model performance, especially the high accuracy obtained for the NPI, should be interpreted as indicative within the sampled domain rather than universally transferable.
The use of deterministic pollution indices (GPI and NPI) as targets in ML introduces a potential circularity; however, ML was employed here as a complementary tool to capture nonlinear interactions and enhance spatial estimation, not to replicate index formulations. The differentiated predictive performance across indices supports the interpretation that the models reflect process-driven variability rather than purely mathematical structure. Similarly, IDW interpolation was selected as a pragmatic approach suitable for sparse datasets; while it does not explicitly account for spatial autocorrelation, the consistency between IDW outputs and independent hydrogeochemical and statistical analyses provides confidence in the identified spatial trends.
Finally, the absence of explicit land-use intensity, pumping rates, and temporal variability data limits finer attribution of agricultural pressures. Despite these constraints, the present study remains a valid and valuable proof-of-concept, demonstrating the added value of integrating hydrogeochemistry, pollution indices, probabilistic risk assessment, and ML in data-scarce coastal agroecosystems. Future work incorporating expanded datasets and ancillary information will further strengthen model robustness and management applicability.

3.11. Region-Specific Policy and Management Recommendations for the Skhirat Coastal Aquifer

The results of this study provide actionable insights that can directly inform groundwater and agricultural management policies in the Skhirat coastal region. The spatial convergence of high GPI, NPI, and health risk indices in specific zones, particularly along the northwestern coastal fringe (e.g., P13, P14, and P21) and intensively cultivated inland areas (e.g., P1, P26, and P27), highlights the need for targeted, location-specific interventions rather than uniform aquifer-wide measures.
First, groundwater abstraction in coastal wells identified as high-risk zones should be regulated through spatially differentiated pumping limits. Wells located within the seawater intrusion front, as delineated by SMI > 1 and AI-predicted salinity maps, should be prioritized for abstraction control or seasonal pumping restrictions, particularly during peak irrigation periods. In Skhirat, this approach could help stabilize hydraulic gradients and limit further inland migration of saline water, complementing the existing water allocation policies [93].
Second, the nitrate-driven health risk hotspots identified inland call for revised fertilizer and irrigation management practices. Precision agriculture strategies—such as split nitrogen application, fertigation optimization, and real-time soil moisture monitoring—should be promoted in areas where the NPI and Monte Carlo-derived HI values exceed safe thresholds [94]. Extension services in the Skhirat region can use the spatial outputs of this study to identify priority farms for intervention, reducing nitrate leaching without compromising crop productivity [95].
Third, the integration of AI-based prediction into routine groundwater monitoring frameworks offers a practical pathway for early warning and adaptive management [96]. Rather than relying solely on dense sampling networks, local water authorities could use periodically updated hydrochemical data to recalibrate ML models and generate predictive risk maps, enabling proactive responses to emerging contamination trends [97]. This is particularly relevant in data-scarce contexts such as Skhirat, where monitoring resources are limited but agricultural pressures are high.
At the aquifer scale, managed aquifer recharge (MAR) using excess runoff or treated wastewater could be strategically implemented in inland recharge zones identified as less affected by seawater intrusion [36,98]. Coupled with AI-guided site selection, MAR could act both as a dilution mechanism for nitrate contamination and as a hydraulic barrier against saline encroachment [99].
Finally, policy implementation should be supported by stakeholder engagement and regulatory integration. The results of this study can inform local water basin agencies in defining vulnerability maps, revising well-licensing criteria, and aligning agricultural subsidies with groundwater protection objectives. By explicitly linking hydrogeochemical degradation, human health risk, and predictive modeling, the proposed framework provides decision-makers in Skhirat with a scientifically grounded basis for transitioning from reactive groundwater management to preventive and risk-informed governance.

4. Conclusions

This study aimed to assess groundwater quality in a coastal agricultural zone by evaluating physicochemical parameters, nitrate contamination, and associated ecological and health risks. A total of 30 groundwater samples were analyzed, revealing high spatial variability in major ions, especially EC, NO3, Cl, Na+, and SO42−, with several samples exceeding WHO thresholds. Spatial interpolation maps confirmed contamination hotspots near intensive horticultural activities. Multivariate analyses indicated that nitrate, sodium, and chloride were primarily linked to fertilizer use, animal manures, and saline irrigation return flows. Health risk assessment through HQ and HI showed elevated risks in several sites, particularly for children, with Monte Carlo simulation enhancing the robustness of the uncertainty evaluation. Two indices, GPI and NPI, were modeled using AI and ML. Among the tested models, RF provided the best predictive performance for both indices, offering reliable spatial prediction maps to identify critical zones. In light of these findings, it is imperative to implement integrated groundwater protection strategies that prioritize precision agriculture, nutrient management, and regular water quality monitoring. Capacity building among farmers on sustainable irrigation practices, promotion of organic amendments, and investment in agro-environmental technologies are critical steps toward mitigating pollution risks. Policymakers should consider embedding groundwater quality indices into national environmental assessment frameworks to guide interventions in vulnerable agro-ecological regions. This research contributes to the growing body of evidence advocating for data-driven, science-based approaches to groundwater sustainability under the pressures of agricultural intensification and climate variability.

Author Contributions

Conceptualization, H.S.; Methodology, H.S.; Software, H.S.; Resources, H.S., Y.M. and K.M.; Validation, H.S., A.Z., L.M. and H.D.; Formal analysis, H.S., Writing—original draft preparation, H.S., A.Z., L.M., M.O.L. and H.D.; Writing—review and editing, H.S., R.M., A.Z., L.M., M.O.L., H.D., Y.M. and K.M.; Visualization, H.S. and M.O.L.; Supervision, A.Z., L.M. and H.D.; Funding acquisition, R.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Data Availability Statement

The data is available on request from the corresponding author.

Acknowledgments

The authors extend their gratitude to all collaborators involved in field sampling, laboratory analysis, and manuscript preparation. The authors also acknowledge the financial support provided by the “MCGP INRA-ICARDA” and “EiA” projects.

Conflicts of Interest

The authors state they have no known conflicting financial interests or personal relationships that would appear to affect the work reported in this manuscript.

References

  1. Zhang, H.; Lv, Y.; Zhang, T.; Zhang, L.; Ma, X.; Liu, X.; Lian, S. Characteristics of Groundwater Microbial Community Composition and Environmental Response in the Yimuquan Aquifer, North China Plain. Water 2024, 16, 459. [Google Scholar] [CrossRef]
  2. Eid, M.H.; Saeed, O.; Székács, A.; Abukhadra, M.R.; Alqhtani, H.A.; Kovács, A.; Szűcs, P. Integrating Unsupervised Machine Learning, Statistical Analysis, and Monte Carlo Simulation to Assess Toxic Metal Contamination and Salinization in Non-Rechargeable Aquifers. Results Eng. 2025, 26, 104989. [Google Scholar] [CrossRef]
  3. Agbasi, J.C.; Abu, M.; Pande, C.B.; Uwajingba, H.C.; Abba, S.I.; Egbueri, J.C. Groundwater Salinization in Coastal Regions and the Control Mechanisms: Insights for Sustainable Groundwater Development and Management. In Sustainable Groundwater and Environment: Challenges and Solutions; Springer: Berlin/Heidelberg, Germany, 2025; pp. 165–191. [Google Scholar]
  4. Panday, D.P.; Kumari, A.; Kumar, M. Alkalinity-Salinity-Sustainability: Decadal Groundwater Trends and Its Impact on Agricultural Water Quality in the Indian Peninsula. Sci. Total Environ. 2025, 978, 179459. [Google Scholar] [CrossRef]
  5. Passarella, G.; Masciale, R.; Menichini, M.; Doveri, M.; Portoghese, I. Decoding Salinization Dynamics in Mediterranean Coastal Aquifers: A Case Study from a Wetland in Southern Italy. Environments 2025, 12, 227. [Google Scholar] [CrossRef]
  6. Sanad, H.; Oueld lhaj, M.; Zouahri, A.; Saafadi, L.; Dakak, H.; Mouhir, L. Groundwater Pollution by Nitrate and Salinization in Morocco: A Comprehensive Review. J. Water Health 2024, 22, 1756–1773. [Google Scholar] [CrossRef]
  7. Sanad, H.; Mouhir, L.; Zouahri, A.; Moussadek, R.; El Azhari, H.; Yachou, H.; Ghanimi, A.; Oueld Lhaj, M.; Dakak, H. Assessment of Groundwater Quality Using the Pollution Index of Groundwater (PIG), Nitrate Pollution Index (NPI), Water Quality Index (WQI), Multivariate Statistical Analysis (MSA), and GIS Approaches: A Case Study of the Mnasra Region, Gharb Plain, Morocco. Water 2024, 16, 1263. [Google Scholar] [CrossRef]
  8. Ning, J.; Li, P.; Wu, J.; Yuan, Z.; Xu, F.; Zheng, L. Source Apportionment of Groundwater Nitrate Pollution in Irrigation Districts along the Jing River, Guanzhong Basin: Insights from Hydrochemistry, Isotopes, and the MixSIAR Model. J. Environ. Chem. Eng. 2025, 13, 116231. [Google Scholar] [CrossRef]
  9. Asimullah, S.; Afridi, J.; Hayat, S. Environmental Impacts of Marble Industrial Effluents on Water and Soil in Tehsil Shabqadar, Khyber Pakhtunkhwa. Indus J. Biosci. Res. 2025, 3, 370–376. [Google Scholar] [CrossRef]
  10. Manhou, K.; Moussadek, R.; Yachou, H.; Zouahri, A.; Douaik, A.; Hilal, I.; Ghanimi, A.; Hmouni, D.; Dakak, H. Assessing the Impact of Saline Irrigation Water on Durum Wheat (cv. Faraj) Grown on Sandy and Clay Soils. Agronomy 2024, 14, 2865. [Google Scholar] [CrossRef]
  11. Sanad, H.; Moussadek, R.; Mouhir, L.; Oueld Lhaj, M.; Dakak, H.; El Azhari, H.; Yachou, H.; Ghanimi, A.; Zouahri, A. Assessment of Soil Spatial Variability in Agricultural Ecosystems Using Multivariate Analysis, Soil Quality Index (SQI), and Geostatistical Approach: A Case Study of the Mnasra Region, Gharb Plain, Morocco. Agronomy 2024, 14, 1112. [Google Scholar] [CrossRef]
  12. Chinthalapudi, D.P.; Kingery, W.; Ganapathi Shanmugam, S. A Review of Plant-Mediated and Fertilization-Induced Shifts in Ammonia Oxidizers: Implications for Nitrogen Cycling in Agroecosystems. Land 2025, 14, 1182. [Google Scholar] [CrossRef]
  13. Oueld Lhaj, M.; Moussadek, R.; Zouahri, A.; Sanad, H.; Saafadi, L.; Mdarhri Alaoui, M.; Mouhir, L. Sustainable Agriculture Through Agricultural Waste Management: A Comprehensive Review of Composting’s Impact on Soil Health in Moroccan Agricultural Ecosystems. Agriculture 2024, 14, 2356. [Google Scholar] [CrossRef]
  14. Richardson, C.; Davis, K.; Ruiz-González, C.; Guimond, J.A.; Michael, H.; Paldor, A.; Moosdorf, N.; Paytan, A. The Impacts of Climate Change on Coastal Groundwater. Nat. Rev. Earth Environ. 2024, 5, 100–119. [Google Scholar] [CrossRef]
  15. Gharnate, A.; Cox, R.; Sanad, H.; Taouali, O.; Oueld Lhaj, M.; Mhammdi, N. Hydrodynamic Modelling and Morphometric Assessment of Supratidal Boulder Transport on the Moroccan Atlantic Coast: A Dual-Site Analysis. Earth 2025, 6, 124. [Google Scholar] [CrossRef]
  16. Gharnate, A.; Sanad, H.; Oueld Lhaj, M.; Mhammdi, N. A Comprehensive Review of Polygenetic Signatures, Methodological Advances, and Implications for Coastal Boulder Deposits (CBDs) Assessment. GeoHazards 2025, 6, 69. [Google Scholar] [CrossRef]
  17. Shaikh, M.; Birajdar, F. Groundwater and Public Health: Exploring the Connections and Challenges. Int. J. Innov. Sci. Res. Trends Innov. 2024, 9, 1351–1361. [Google Scholar]
  18. Loaiciga, H.A.; Doh, R. Groundwater for People and the Environment: A Globally Threatened Resource. Groundwater 2024, 62, 332–340. [Google Scholar] [CrossRef] [PubMed]
  19. Oueld Lhaj, M.; Moussadek, R.; Mouhir, L.; Mdarhri Alaoui, M.; Sanad, H.; Iben Halima, O.; Zouahri, A. Assessing the Evolution of Stability and Maturity in Co-Composting Sheep Manure with Green Waste Using Physico-Chemical and Biological Properties and Statistical Analyses: A Case Study of Botanique Garden in Rabat, Morocco. Agronomy 2024, 14, 1573. [Google Scholar] [CrossRef]
  20. Manhou, K.; Taghouti, M.; Moussadek, R.; Elyacoubi, H.; Bennani, S.; Zouahri, A.; Ghanimi, A.; Sanad, H.; Oueld Lhaj, M.; Hmouni, D.; et al. Performance, Agro-Morphological, and Quality Traits of Durum Wheat (Triticum turgidum L. ssp. durum Desf.) Germplasm: A Case Study in Jemâa Shaïm, Morocco. Plants 2025, 14, 1508. [Google Scholar] [CrossRef]
  21. Srivastava, A.; Chinnasamy, P. Watershed Development Interventions for Rural Water Safety, Security, and Sustainability in Semi-Arid Region of Western-India. Environ. Dev. Sustain. 2024, 26, 18231–18265. [Google Scholar] [CrossRef]
  22. Sanad, H.; Moussadek, R.; Dakak, H.; Zouahri, A.; Oueld Lhaj, M.; Mouhir, L. Ecological and Health Risk Assessment of Heavy Metals in Groundwater within an Agricultural Ecosystem Using GIS and Multivariate Statistical Analysis (MSA): A Case Study of the Mnasra Region, Gharb Plain, Morocco. Water 2024, 16, 2417. [Google Scholar] [CrossRef]
  23. Sanad, H.; Moussadek, R.; Mouhir, L.; Lhaj, M.O.; Dakak, H.; Manhou, K.; Zouahri, A. Monte Carlo Simulation for Evaluating Spatial Dynamics of Toxic Metals and Potential Health Hazards in Sebou Basin Surface Water. Sci. Rep. 2025, 15, 29471. [Google Scholar] [CrossRef]
  24. Abbad, M.; Hadri, A.; El Khalki, E.M.; Ouatiki, H.; Hanadé Houmma, I.; Jaffar, O.; El Ghazlani, T.; Qachar, M.; Bouchaou, L.; El-Azhari, A. Evaluation of GRACE and GRACE-FO Derived-Products for Water Storage Assessment in Moroccan Aquifers: Analysis of Drought and Human-Induced Impacts. Geocarto Int. 2025, 40, 2521829. [Google Scholar] [CrossRef]
  25. El Alaoui, A.; Haidara, I.; Bouya, N.; Moussaid, B.; Faqeih, K.Y.; Alamri, S.M.; Alamery, E.R.; AlAmri, A.R.; Moussaid, Y.; Ait Haddou, M. Sustainable Groundwater Management in the Coastal Aquifer of the Témara Plain, Morocco: A GIS-Based Hydrochemical and Pollution Risk Assessment. Sustainability 2025, 17, 5392. [Google Scholar] [CrossRef]
  26. Shaikh, M.; Birajdar, F. Artificial Intelligence in Groundwater Management: Innovations, Challenges, and Future Prospects. Int. J. Sci. Res. Arch. 2024, 11, 502–512. [Google Scholar] [CrossRef]
  27. Alotaibi, E.; Nassif, N. Artificial Intelligence in Environmental Monitoring: In-Depth Analysis. Discov. Artif. Intell. 2024, 4, 84. [Google Scholar] [CrossRef]
  28. Sanad, H.; Moussadek, R.; Zouahri, A.; Lhaj, M.O.; Mouhir, L.; Dakak, H. Machine Learning-Integrated Hydrogeochemical and Spatial Modeling of Groundwater Quality Indices for Seawater Intrusion and Irrigation Sustainability in Coastal Agroecosystems of Skhirat Region, Morocco. J. Hydrol. Reg. Stud. 2025, 62, 102848. [Google Scholar] [CrossRef]
  29. Sham, F.F.; El-Shafie, A.; Jaafar, W.Z.B.W.; Adarsh, S.; Ahmed, A.N. Machine Learning-Based Model for Groundwater Quality Prediction: A Comprehensive Review and Future Time–Cost Effective Modelling Vision. Arch. Comput. Methods Eng. 2025, 32, 3593–3608. [Google Scholar] [CrossRef]
  30. Karunanidhi, D.; Raj, M.R.H.; Roy, P.D.; Subramani, T. Integrated Machine Learning Based Groundwater Quality Prediction through Groundwater Quality Index for Drinking Purposes in a Semi-Arid River Basin of South India. Environ. Geochem. Health 2025, 47, 119. [Google Scholar] [CrossRef]
  31. Costa, E.L.; Braga, T.; Dias, L.A.; de Albuquerque, É.L.; Fernandes, M.A. Self-Organizing Maps Applied to the Analysis and Identification of Characteristics Related to Air Quality Monitoring Stations and Its Pollutants. Neural Comput. Appl. 2024, 36, 11643–11657. [Google Scholar] [CrossRef]
  32. Kaiser, H.F. The Varimax Criterion for Analytic Rotation in Factor Analysis. Psychometrika 1958, 23, 187–200. [Google Scholar] [CrossRef]
  33. Rodier, J. L’analyse de l’Eau, Eaux Naturelles, Eaux Résiduaires, Eau de Mer, 7th ed.; Dunod: Paris, France, 1985. [Google Scholar]
  34. Rasoul, K. The Introduction of ArcGIS Pro Software. Sci.-Cult. J. Ecosphere 2024, 7, 71–76. [Google Scholar]
  35. Abadi, H.T.; Asresie, T.; Mihretu, A.; Gebrehiwot, W. Assessment of Groundwater Quality for Drinking Purposes Using Water Quality Index in Volcanic Rock Areas of Axum, Northern Ethiopia. Appl. Water Sci. 2025, 15, 227. [Google Scholar] [CrossRef]
  36. Oueld Lhaj, M.; Moussadek, R.; Mouhir, L.; Sanad, H.; Manhou, K.; Iben Halima, O.; Yachou, H.; Zouahri, A.; Mdarhri Alaoui, M. Application of Compost as an Organic Amendment for Enhancing Soil Quality and Sweet Basil (Ocimum basilicum L.) Growth: Agronomic and Ecotoxicological Evaluation. Agronomy 2025, 15, 1045. [Google Scholar] [CrossRef]
  37. Sanad, H.; Moussadek, R.; Mouhir, L.; Lhaj, M.O.; Zahidi, K.; Dakak, H.; Manhou, K.; Zouahri, A. Ecological and Human Health Hazards Evaluation of Toxic Metal Contamination in Agricultural Lands Using Multi-Index and Geostatistical Techniques across the Mnasra Area of Morocco’s Gharb Plain Region. J. Hazard. Mater. Adv. 2025, 18, 100724. [Google Scholar] [CrossRef]
  38. Souza, T. Redundancy Analysis (RDA). In Advanced Statistical Analysis for Soil Scientists; Springer: Berlin/Heidelberg, Germany, 2025; pp. 57–77. [Google Scholar]
  39. Barkat, A. Integrated Assessment of the Groundwater Resources of the Northwest Sahara Aquifer System: Case of the Oued Souf Valley. Ph.D. Thesis, University of Debrecen, Debrecen, Hungary, 2024. [Google Scholar]
  40. Subba Rao, N. PIG: A Numerical Index for Dissemination of Groundwater Contamination Zones. Hydrol. Process. 2012, 26, 3344–3350. [Google Scholar] [CrossRef]
  41. Al-Aizari, H.S.; Aslaou, F.; Al-Aizari, A.R.; Al-Odayni, A.-B.; Al-Aizari, A.-J.M. Evaluation of Groundwater Quality and Contamination Using the Groundwater Pollution Index (GPI), Nitrate Pollution Index (NPI), and GIS. Water 2023, 15, 3701. [Google Scholar] [CrossRef]
  42. WHO World Health Organization. Guidelines for Drinking-Water Quality: Fourth Edition Incorporating First Addendum; World Health Organization: Geneva, Switzerland, 2017; ISBN 978-92-4-154995-0. [Google Scholar]
  43. Egbueri, J.C. Groundwater Quality Assessment Using Pollution Index of Groundwater (PIG), Ecological Risk Index (ERI) and Hierarchical Cluster Analysis (HCA): A Case Study. Groundw. Sustain. Dev. 2020, 10, 100292. [Google Scholar] [CrossRef]
  44. Panneerselvam, B.; Karuppannan, S.; Muniraj, K. Evaluation of Drinking and Irrigation Suitability of Groundwater with Special Emphasizing the Health Risk Posed by Nitrate Contamination Using Nitrate Pollution Index (NPI) and Human Health Risk Assessment (HHRA). Hum. Ecol. Risk Assess. Int. J. 2021, 27, 1324–1348. [Google Scholar] [CrossRef]
  45. Sanjupriya, S.; Poonkothai, M.; Karunanidhi, D.; Rao, N.S.; Subramani, T.; Marghade, D. Evaluating Nitrate Contamination in Groundwater and Its Health Threats from a Semi-Arid Province of Southern India Using GIS Techniques with a Special Focus on Entropy Water Quality Index. Environ. Geochem. Health 2025, 47, 346. [Google Scholar] [CrossRef] [PubMed]
  46. Akpataku, K.V.; Halder, J.; Rai, S.P.; Bawa, L.M.; Djaneye-Boundjou, G.; Gnazou, D.-T.M.; Faye, S. Tracing Nitrate Sources and Denitrification Potential Using Chemical, Multi-Isotopic, and Bayesian Mixing Model Approaches in the Plateaux Region of Togo, West Africa. J. Environ. Chem. Eng. 2025, 13, 117170. [Google Scholar] [CrossRef]
  47. Sanad, H.; Moussadek, R.; Mouhir, L.; Lhaj, M.O.; Dakak, H.; Zouahri, A. Geospatial Analysis of Trace Metal Pollution and Ecological Risks in River Sediments from Agrochemical Sources in Morocco’s Sebou Basin. Sci. Rep. 2025, 15, 16701. [Google Scholar] [CrossRef]
  48. Shi, H.; Du, Y.; Xiong, Y.; Deng, Y.; Li, Q. Source-Oriented Health Risk Assessment of Groundwater Nitrate by Using EMMTE Coupled with HHRA Model. Sci. Total Environ. 2024, 934, 173283. [Google Scholar] [CrossRef]
  49. Lin, S.; Zhang, P.; Xu, Y.; Yuan, Y.; Hui, K.; Su, J.; Tan, W. Seasonal Variations in Health Risks Associated with Nitrates and Heavy Metals in Groundwater: A Case Study of Typical Regions along the Riverside Plain in China. Process Saf. Environ. Prot. 2025, 196, 106949. [Google Scholar] [CrossRef]
  50. Zhang, Y.; Chu, C.; Li, T.; Xu, S.; Liu, L.; Ju, M. A Water Quality Management Strategy for Regionally Protected Water through Health Risk Assessment and Spatial Distribution of Heavy Metal Pollution in 3 Marine Reserves. Sci. Total Environ. 2017, 599–600, 721–731. [Google Scholar] [CrossRef] [PubMed]
  51. Edokpayi, J.N.; Enitan, A.M.; Mutileni, N.; Odiyo, J.O. Evaluation of Water Quality and Human Risk Assessment Due to Heavy Metals in Groundwater around Muledane Area of Vhembe District, Limpopo Province, South Africa. Chem. Cent. J. 2018, 12, 2. [Google Scholar] [CrossRef]
  52. Idris, A.M.; Alqahtani, F.M.S.; Said, T.O.; Fawy, K.F. Contamination Level and Risk Assessment of Heavy Metal Deposited in Street Dusts in Khamees-Mushait City, Saudi Arabia. Hum. Ecol. Risk Assess. Int. J. 2020, 26, 495–511. [Google Scholar] [CrossRef]
  53. Christian Suh, G.; Aloysius, A.N.; Tiabou, A.; Kouankap, D.; Rene, A.; Yiika, L. Source Apportionment, Ecological and Toxicological Risk Assessment of Trace Metals in Agricultural Soils of Wabane, South West Region, Cameroon. J. Trace Elem. Miner. 2025, 12, 100218. [Google Scholar] [CrossRef]
  54. Mbongue, J.; Cyrille, S.; Omar, E.; Yiika, L.; Eseya Mengu, E., Jr. Geochemical and Gold-Ore Potential Assessment in Stream Sediments of Bindiba Gold District, Eastern Cameroon: Implications for Gold Exploration, Sediment Provenance, Paleoenvironment, and Tectonic Setting. Min. Metall. Explor. 2025, 42, 2415–2439. [Google Scholar] [CrossRef]
  55. Tarki, M.; Ghouili, N.; Dassi, L. New Insights on the Hydrochemistry, Geothermometry, and Isotopic Characteristics of the Hydrothermal Groundwater of the SASS Basin: Case Study of the Jérid Geothermal Field, Southern Tunisia. Environ. Monit. Assess. 2024, 196, 908. [Google Scholar] [CrossRef]
  56. Du, J.; Jia, C.; Ding, Y.; Yang, X.; Feng, K.; Wei, M. Advancing Wetland Groundwater Pollution Zoning: A Novel Integration of Monte Carlo Health Risk Modeling and Machine Learning. J. Hazard. Mater. 2025, 494, 138412. [Google Scholar] [CrossRef]
  57. Borgohain, D.; Lanong, S.; Jaishi, H.P. Heavy Metal Contamination and Health Risks in Ground Water at Byrnihat Industrial Area: Urgent Need for Remediation and Public Health Safeguards. Proc. Indian Natl. Sci. Acad. 2024, 90, 931–942. [Google Scholar] [CrossRef]
  58. Guo, Q.; Wang, F.; Cheng, S.; Wang, K.; Zhang, Y. Fault Location and Isolation Technology for Power Grid Automation Based on Intelligent Algorithms. Energy Inform. 2025, 8, 88. [Google Scholar] [CrossRef]
  59. Lumumba, V.W.; Kiprotich, D.; Lemasulani Mpaine, M.; Grace Makena, N.; Daniel Kavita, M. Comparative Analysis of Cross-Validation Techniques: LOOCV, K-Folds Cross-Validation, and Repeated K-Folds Cross-Validation in Machine Learning Models. Am. J. Theor. Appl. Stat. 2024, 13, 127–137. [Google Scholar] [CrossRef]
  60. Sakthivel, D.; Radha, B. Network Traffic Analysis of Anomaly Detected Attacks Using Random Forest Algorithm in Cloud Environment. Nat. Camp. 2024, 28, 1762–1772. [Google Scholar]
  61. Salman, H.A.; Kalakech, A.; Steiti, A. Random Forest Algorithm Overview. Babylon. J. Mach. Learn. 2024, 2024, 69–79. [Google Scholar] [CrossRef]
  62. Taffese, W.Z.; Zhu, Y.; Chen, G. Ensemble-Learning Model Based Ultimate Moment Prediction of Reinforced Concrete Members Strengthened by UHPC. Eng. Struct. 2024, 305, 117705. [Google Scholar] [CrossRef]
  63. Nandal, P.; Dahiya, M.; Singh, M.; Dagur, A.; Kumar, B. Progressive Computational Intelligence, Information Technology and Networking; CRC Press: Boca Raton, FL, USA, 2025; ISBN 978-1-040-42391-2. [Google Scholar]
  64. Nourani, V.; Khajeh, E.B.; Paknezhad, N.J.; Dąbrowska, D.; Sharghi, E. Temporal Evaluation of Seawater Intrusion Vulnerability in Shabestar Plain Using GALDIT and AI Techniques. Environ. Sci. Pollut. Res. 2025, 32, 10855–10876. [Google Scholar] [CrossRef]
  65. Hagage, M.; Abdulaziz, A.M.; Elbeih, S.F.; Hewaidy, A.G.A. Monitoring Soil Salinization and Waterlogging in the Northeastern Nile Delta Linked to Shallow Saline Groundwater and Irrigation Water Quality. Sci. Rep. 2024, 14, 27838. [Google Scholar] [CrossRef]
  66. Lal, R. Managing Soil Drought; CRC Press: Boca Raton, FL, USA, 2024; ISBN 978-1-003-84486-0. [Google Scholar]
  67. Irfaudin, M.; Putra, D.P.E.; Taufiq, A. Groundwater Hydrogeochemistry in the Southern Part of Pujut Sub-District, West Nusa Tenggara, Indonesia. IOP Conf. Ser. Earth Environ. Sci. 2024, 1419, 012027. [Google Scholar] [CrossRef]
  68. Bera, A.; Dutta, L.; Pal, S.K.; Kumar, R.; Shukla, P.K.; Alkhuraiji, W.S.; Đurin, B.; Zhran, M. A Hybrid Approach for Assessing Aquifer Health Using the SWAT Model, Tree-Based Classification, and Deep Learning Algorithms. Water 2025, 17, 1546. [Google Scholar] [CrossRef]
  69. 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. [Google Scholar] [CrossRef]
  70. Han, B.; Chen, W.-Q.; Jiao, Y.-Q.; Yang, R.; Niu, L.-L.; Chen, X.-R.; Ji, C.-Y.; Yin, D.-X. Effects of Nitrogen Fertilizer Application on Soil Properties and Arsenic Mobilization in Paddy Soil. Sustainability 2024, 16, 5565. [Google Scholar] [CrossRef]
  71. Wang, T.; Ling, K.; Wei, R.; Dong, L. Dynamic Climate Influence on Magnesium Isotope Variation in Saline Lacustrine Dolomite: A Case Study of the Qianjiang Formation, Jianghan Basin. Minerals 2024, 14, 459. [Google Scholar] [CrossRef]
  72. Ayari, J.; Ouelhazi, H.; Charef, A.; Barhoumi, A. Delineation of Seawater Intrusion and Groundwater Quality Assessment in Coastal Aquifers: The Korba Coastal Aquifer (Northeastern Tunisia). Mar. Pollut. Bull. 2023, 188, 114643. [Google Scholar] [CrossRef]
  73. Alvando, P.V.; Rohmat, D.; Rohmat, F.I.W.; Irawan, D.E.; Husna, A.; Harjupa, W.; Rohmat, F.I.W.; Rohman, M.I.N. Integrating GIS-Based AHP and Groundwater Quality Assessment to Delineate Groundwater Potential Zones in the Rontu Watershed, West Nusa Tenggara, Indonesia. Results Earth Sci. 2025, 3, 100110. [Google Scholar] [CrossRef]
  74. Shokri, N.; Hassani, A.; Sahimi, M. Multi-Scale Soil Salinization Dynamics from Global to Pore Scale: A Review. Rev. Geophys. 2024, 62, e2023RG000804. [Google Scholar] [CrossRef]
  75. Das, A. Prediction of Urban Surface Water Quality Scenarios Using Water Quality Index (WQI), Multivariate Techniques, and Machine Learning (ML) Models in Water Resources, in Baitarani River Basin, Odisha: Potential Benefits and Associated Challenges. Earth Syst. Environ. 2025, 9, 1–37. [Google Scholar] [CrossRef]
  76. Sarma, R.; Singh, S.K. Assessment of Groundwater Quality and Human Health Risks of Nitrate and Fluoride Contamination in a Rapidly Urbanizing Region of India. Environ. Sci. Pollut. Res. 2023, 30, 55437–55454. [Google Scholar] [CrossRef]
  77. Huang, Y.; Li, Y.; Knappett, P.S.K.; Montiel, D.; Wang, J.; Aviles, M.; Hernandez, H.; Mendoza-Sanchez, I.; Loza-Aguirre, I. Water Quality Assessment Bias Associated with Long-Screened Wells Screened across Aquifers with High Nitrate and Arsenic Concentrations. Int. J. Environ. Res. Public Health 2022, 19, 9907. [Google Scholar] [CrossRef]
  78. Wróblewski, M.; Miłek, J.; Godlewski, A.; Wróblewska, J. The Impact of Arsenic, Cadmium, Lead, Mercury, and Thallium Exposure on the Cardiovascular System and Oxidative Mechanisms in Children. Curr. Issues Mol. Biol. 2025, 47, 483. [Google Scholar] [CrossRef]
  79. Li, P.; Elumalai, V. Groundwater Quality Under Agricultural Activities—Cases from China and South Africa; Springer Nature: Berlin/Heidelberg, Germany, 2025; ISBN 3-031-98993-7. [Google Scholar]
  80. Rashmi, I.; Karthika, K.; Roy, T.; Shinoji, K.; Kumawat, A.; Kala, S.; Pal, R. Soil Erosion and Sediments: A Source of Contamination and Impact on Agriculture Productivity. In Agrochemicals in Soil and Environment: Impacts and Remediation; Springer: Berlin/Heidelberg, Germany, 2022; pp. 313–345. [Google Scholar]
  81. Torres, E.G.; Morales, R.P.; Zamora, A.G.; Sánchez, E.R.; Calderón, E.O.; Romero, J.A.; Rincón, E.C. Consumption of Water Contaminated by Nitrate and Its Deleterious Effects on the Human Thyroid Gland: A Review and Update. Int. J. Environ. Health Res. 2022, 32, 984–1001. [Google Scholar] [CrossRef] [PubMed]
  82. Şener, Ş. Groundwater Quality, Heavy Metal Pollution, and Health Risk Assessment Using Geospatial Techniques and Index Methods in Eber Wetland and Surroundings (Afyonkarahisar/Turkey). Environ. Sci. Pollut. Res. 2023, 30, 51387–51411. [Google Scholar] [CrossRef] [PubMed]
  83. Dagur, A.; Singh, K.; Mehra, P.S.; Shukla, D.K. Intelligent Computing and Communication Techniques. In Proceedings of the International Conference on Intelligent Computing and Communication Techniques (ICICCT 2024), New Delhi, India, 28–29 June 2024; CRC Press: Boca Raton, FL, USA, 2025; Volume 3, ISBN 1-040-37969-9. [Google Scholar]
  84. Michelucci, U. Model Validation and Selection. In Fundamental Mathematical Concepts for Machine Learning in Science; Springer: Berlin/Heidelberg, Germany, 2024; pp. 153–184. [Google Scholar]
  85. Shapna, K.J.; Li, J.; Kabir, M.H.; Salam, M.A.; Khandker, S.; Hossain, M.L. Strengthening Adaptation in Coastal Bangladesh: Community-Based Approaches for Sustainable Agriculture and Water Management. Disaster Prev. Resil. 2024, 3, 5. [Google Scholar] [CrossRef]
  86. Hfaiedh, E.; Gaagai, A.; Moussa, A.B.; Petitta, M.; Mlayah, A.; Elsayed, S.; Elsherbiny, O.; Eid, M.H.; Tariq, A.; Athamena, A.; et al. An Innovative ML and GIS-Integrated Approach for Predicting Irrigation Water Quality in Coastal Aquifers. Earth Syst. Environ. 2025, 9, 1–22. [Google Scholar] [CrossRef]
  87. Laoufi, A.; Guettaia, S.; Boudjema, A.; Derdour, A.; Almalki, A.S.; Bojer, A.K.; El-Nagdy, K.A.; Ali, E. Seasonal Groundwater Quality Analysis in a Drought Prone Agricultural Region Using GIS and IWQI for Nitrate Contamination Insights. Sci. Rep. 2025, 15, 22948. [Google Scholar] [CrossRef]
  88. Thepbandit, W.; Athinuwat, D. Rhizosphere Microorganisms Supply Availability of Soil Nutrients and Induce Plant Defense. Microorganisms 2024, 12, 558. [Google Scholar] [CrossRef]
  89. EL Osta, M.; Masoud, M.; Niyazi, B.; Al-Amri, N.; Alqarawy, A.; El-baki, M.S.A.; Elsayed, S. Utilizing Machine Learning Algorithms to Improve Predictions of Groundwater Quality Indices for Irrigation in an Arid Environment of Saudi Arabia. Environ. Earth Sci. 2025, 84, 389. [Google Scholar] [CrossRef]
  90. Tian, J.; Yang, J.; Liu, W.; Zhang, M.; Daskalopoulou, K.; Zou, Y.; Xu, N.; Liao, Z.; Huo, Y.; Zhu, Y.; et al. Assessing Groundwater Quality for Drinking and Irrigation Using Hydrogeochemistry and Machine Learning in Northern China. Agric. Water Manag. 2025, 322, 109975. [Google Scholar] [CrossRef]
  91. Chahid, M.; El-Messari, J.E.S.; Hilal, I.; Abdi, N.; Ali, T.; Chakrabortty, R.; Faqeih, K.Y.; Alamri, S.M.; Alamery, E.R.; Tariq, A.; et al. Deep Learning Framework for Mapping Nitrate Pollution in Coastal Aquifers under Land Use Pressure. Sci. Rep. 2025, 15, 34946. [Google Scholar] [CrossRef]
  92. Zhou, S.; Xiong, H.; Song, X.; He, Z.; Peng, Q.; Guo, X.; Xiong, R.; Yang, S.; Ma, C.; Wang, Y. Spatial Prediction of Groundwater Nitrate by Explainable Machine Learning Models and Remote Sensing Indicators under Conditions of Imbalanced Datasets. Geocarto Int. 2025, 40, 2557953. [Google Scholar] [CrossRef]
  93. Sanad, H.; Moussadek, R.; Zouahri, A.; Oueld Lhaj, M.; Dakak, H.; Manhou, K.; Mouhir, L. Heavy Metal-Induced Variability in Leaf Nutrient Uptake and Photosynthetic Traits of Avocado (Persea americana) in Mediterranean Soils: A Multivariate and Probabilistic Modeling of Soil-to-Plant Transfer Risks. Plants 2026, 15, 205. [Google Scholar] [CrossRef] [PubMed]
  94. Shidayaichenbi, D.; Singh, S.; Thokchom, S.; Singh, A.K.; Singh, S.K.; Ningombam, A.; Sekhar, G.; Brestic, M. Precision Nutrient Management for Reducing Environmental Impacts Due to Non-Judicial Use of Inputs. In Climate-Smart Agricultural Technologies: Approaches for Field Crops Production Systems; Springer: Berlin/Heidelberg, Germany, 2025; pp. 117–135. [Google Scholar]
  95. Oueld Lhaj, M.; Moussadek, R.; Sanad, H.; Manhou, K.; Oueld Lhaj, M.; Mdarhri Alaoui, M.; Zouahri, A.; Mouhir, L. Ecological and Microbial Processes in Green Waste Co-Composting for Pathogen Control and Evaluation of Compost Quality Index (CQI) Toward Agricultural Biosafety. Environments 2026, 13, 43. [Google Scholar] [CrossRef]
  96. Sood, T.; Kapoor, S.; Kaur, J.; Hussain, N.; Sood, S. Fertigation: A Paradigm Shift in Nutrient Delivery for Sustainable Agriculture. In Agricultural Nutrient Pollution and Climate Change: Challenges and Opportunities; Springer: Berlin/Heidelberg, Germany, 2025; pp. 135–164. [Google Scholar]
  97. Liu, Y.; Yang, W.; Bass, B.; Rao, Y.R. Effectiveness of Agricultural BMPs on Phosphorus Load Reduction for the Canadian Lake Erie Basin: A Literature Review. Environ. Rev. 2025, 33, 1–24. [Google Scholar] [CrossRef]
  98. Manhou, K.; Moussadek, R.; Dakak, H.; Zouahri, A.; Ghanimi, A.; Sanad, H.; Oueld Lhaj, M.; Hmouni, D. Effect of Irrigation with Saline Water on Germination, Physiology, Growth, and Yield of Durum Wheat Varieties on Silty Clay Soil. Agriculture 2025, 15, 2364. [Google Scholar] [CrossRef]
  99. Gebreslassie, H.; Berhane, G.; Gebreyohannes, T.; Hagos, M.; Hussien, A.; Walraevens, K. Water Harvesting and Groundwater Recharge: A Comprehensive Review and Synthesis of Current Practices. Water 2025, 17, 976. [Google Scholar] [CrossRef]
Figure 1. Maps illustrating sampling site and its geology and elevation.
Figure 1. Maps illustrating sampling site and its geology and elevation.
Hydrology 13 00059 g001
Figure 2. ML experimental flow-chart for groundwater indices (GPI and NPI) prediction, illustrating data preprocessing, model training and validation (LOOCV), hyperparameter tuning, model evaluation, best-model selection, and spatial prediction using GIS.
Figure 2. ML experimental flow-chart for groundwater indices (GPI and NPI) prediction, illustrating data preprocessing, model training and validation (LOOCV), hyperparameter tuning, model evaluation, best-model selection, and spatial prediction using GIS.
Hydrology 13 00059 g002
Figure 3. Plots of physico-chemical parameters variation in groundwater samples.
Figure 3. Plots of physico-chemical parameters variation in groundwater samples.
Hydrology 13 00059 g003
Figure 4. Spatial analysis of physico-chemical parameters (a) pH, (b) EC, (c) TDS, (d) DO, (e) HCO3, and (f) NH4.
Figure 4. Spatial analysis of physico-chemical parameters (a) pH, (b) EC, (c) TDS, (d) DO, (e) HCO3, and (f) NH4.
Hydrology 13 00059 g004
Figure 5. Spatial analysis of physico-chemical parameters (a) Na+, (b) Cl, and (c) Ca2+.
Figure 5. Spatial analysis of physico-chemical parameters (a) Na+, (b) Cl, and (c) Ca2+.
Hydrology 13 00059 g005
Figure 6. Spatial analysis of physico-chemical parameters: (a) Mg2+, (b) TH and (c) SO42−, (d) K+, (e) PO43−, and (f) NO3.
Figure 6. Spatial analysis of physico-chemical parameters: (a) Mg2+, (b) TH and (c) SO42−, (d) K+, (e) PO43−, and (f) NO3.
Hydrology 13 00059 g006
Figure 7. Durov diagram illustrating the hydrochemical facies and dominant geochemical processes of groundwater samples in the Skhirat coastal region.
Figure 7. Durov diagram illustrating the hydrochemical facies and dominant geochemical processes of groundwater samples in the Skhirat coastal region.
Hydrology 13 00059 g007
Figure 8. RFE diagram.
Figure 8. RFE diagram.
Hydrology 13 00059 g008
Figure 9. Cl/HCO3 ratio diagram for groundwater samples in the coastal aquifer.
Figure 9. Cl/HCO3 ratio diagram for groundwater samples in the coastal aquifer.
Hydrology 13 00059 g009
Figure 10. Comparison of GPI and NPI values.
Figure 10. Comparison of GPI and NPI values.
Hydrology 13 00059 g010
Figure 11. Groundwater samples clustering based on physicochemical parameters and pollution indices (GPI and NPI) using (a) HCA dendrogram and (b) DFA.
Figure 11. Groundwater samples clustering based on physicochemical parameters and pollution indices (GPI and NPI) using (a) HCA dendrogram and (b) DFA.
Hydrology 13 00059 g011
Figure 12. CCA biplot of groundwater parameters.
Figure 12. CCA biplot of groundwater parameters.
Hydrology 13 00059 g012
Figure 13. RDA biplot of physicochemical parameters and groundwater samples.
Figure 13. RDA biplot of physicochemical parameters and groundwater samples.
Hydrology 13 00059 g013
Figure 14. Adult vs. children risk comparison using (a) HQ 95th values and (b) HQ values.
Figure 14. Adult vs. children risk comparison using (a) HQ 95th values and (b) HQ values.
Hydrology 13 00059 g014
Figure 15. The graph illustrates the HI values (95th percentile) for both adults and children across the samples in comparison to the safety threshold of HI = 1.
Figure 15. The graph illustrates the HI values (95th percentile) for both adults and children across the samples in comparison to the safety threshold of HI = 1.
Hydrology 13 00059 g015
Figure 16. Scatter plots of (a) Cl/Na+ vs. NO3/Na+, (b) Cl vs. NO3/Cl, and (c) NO3/Na+ vs. SO42−/Na+ ratios in groundwater samples.
Figure 16. Scatter plots of (a) Cl/Na+ vs. NO3/Na+, (b) Cl vs. NO3/Cl, and (c) NO3/Na+ vs. SO42−/Na+ ratios in groundwater samples.
Hydrology 13 00059 g016
Figure 17. Graphs represent (a) comparison of performance metrics (R2, RMSE, and MAE) using RF and (b) actual vs. predicted values for GPI and NPI using Random Forest.
Figure 17. Graphs represent (a) comparison of performance metrics (R2, RMSE, and MAE) using RF and (b) actual vs. predicted values for GPI and NPI using Random Forest.
Hydrology 13 00059 g017
Figure 18. Comparison of actual and predicted of (a) GPI and (b) NPI values with spatial interpolation map of predicted values.
Figure 18. Comparison of actual and predicted of (a) GPI and (b) NPI values with spatial interpolation map of predicted values.
Hydrology 13 00059 g018
Table 1. GPI quality indicators and calculation formula.
Table 1. GPI quality indicators and calculation formula.
ParametersWHO (2017)Relative Weight (Rw)Weight (Wi)WQI ParametersEquationsNo.
pH6.5–8.540.065“Wp” represents the weight parameter, and “Rw” is the relative weight W p = R w i = n n R w (1)
EC100050.081
DO (mg/L)530.049
TDS (mg/L)50050.081
K+ (mg/L)1030.049“Sc” is the concentration status, “C” is the measured concentration of the parameter, and “WQS” drinking water quality standard [42] S c = C W Q S (2)
Na+ (mg/L)20050.081
Cl (mg/L)25050.081
Ca2+ (mg/L)7530.049
Mg2+ (mg/L)5030.049“Ow” is the overall chemical quality of water O w = W p × S c (3)
TH (mg/L)40030.049
HCO3 (mg/L)12030.049
NO3 (mg/L)5050.081“GPI” is the groundwater pollution index G I P = i = n n O w (4)
NH4+ (mg/L)3530.049
PO43− (mg/L)530.049
SO42− (mg/L)25050.081
Total weight 581
Table 2. Hyperparameters used for AI-based prediction of GPI and NPI.
Table 2. Hyperparameters used for AI-based prediction of GPI and NPI.
ModelKey HyperparametersOptimized Values
RFNumber of trees (n_estimators)500
Maximum tree depth (max_depth)None
Minimum samples per leaf2
Maximum features√(p)
GBRNumber of estimators300
Learning rate0.05
Maximum depth3
SVRKernelRBF
Regularization parameter (C)10
Kernel width (γ)0.1
ANNHidden layer size(10)
Activation functionReLU
SolverAdam
Maximum iterations1000
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

Sanad, H.; Moussadek, R.; Mouhir, L.; Zouahri, A.; Oueld Lhaj, M.; Monsif, Y.; Manhou, K.; Dakak, H. Artificial Intelligence (AI) and Monte Carlo Simulation-Based Modeling for Predicting Groundwater Pollution Indices and Nitrate-Linked Health Risks in Coastal Areas Facing Agricultural Intensification. Hydrology 2026, 13, 59. https://doi.org/10.3390/hydrology13020059

AMA Style

Sanad H, Moussadek R, Mouhir L, Zouahri A, Oueld Lhaj M, Monsif Y, Manhou K, Dakak H. Artificial Intelligence (AI) and Monte Carlo Simulation-Based Modeling for Predicting Groundwater Pollution Indices and Nitrate-Linked Health Risks in Coastal Areas Facing Agricultural Intensification. Hydrology. 2026; 13(2):59. https://doi.org/10.3390/hydrology13020059

Chicago/Turabian Style

Sanad, Hatim, Rachid Moussadek, Latifa Mouhir, Abdelmjid Zouahri, Majda Oueld Lhaj, Yassine Monsif, Khadija Manhou, and Houria Dakak. 2026. "Artificial Intelligence (AI) and Monte Carlo Simulation-Based Modeling for Predicting Groundwater Pollution Indices and Nitrate-Linked Health Risks in Coastal Areas Facing Agricultural Intensification" Hydrology 13, no. 2: 59. https://doi.org/10.3390/hydrology13020059

APA Style

Sanad, H., Moussadek, R., Mouhir, L., Zouahri, A., Oueld Lhaj, M., Monsif, Y., Manhou, K., & Dakak, H. (2026). Artificial Intelligence (AI) and Monte Carlo Simulation-Based Modeling for Predicting Groundwater Pollution Indices and Nitrate-Linked Health Risks in Coastal Areas Facing Agricultural Intensification. Hydrology, 13(2), 59. https://doi.org/10.3390/hydrology13020059

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