Submitted:
23 July 2026
Posted:
24 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials and Methods
2.1. The Study Area
2.2. Data Collection and First Step Pre-Processing
2.3. Exploratory Trend and Correlation Analysis
2.4. Pre-Processing and Feature Engineering
2.5. Forecasting Model
2.5.1. Auto Regressive Model with Exogenous Variables
2.5.2. Model Training (XGBoost)
2.5.3. Accuracy Assessment
3. Results and Discussion
3.1. Data Availability and Trend Analysis
3.2. Predictor Variables
3.3. Model Validation
3.4. Feature Relevance and Model Interpretability
3.5. Twelve-Month Groundwater Depth Forecasts
3.6. Operational Relevance and Limitations for Groundwater-Dependent Irrigation
4. Conclusions and Future Perspectives
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| APA | Portuguese Environment Agency |
| ARX | Autoregressive model with exogenous inputs |
| CRISP-DM | Cross-Industry Standard Process for Data Mining |
| e1, …, e12 | Forecast errors at each prediction horizon |
| EC | European Community |
| ECA&D | European Climate Assessment & Dataset |
| E-OBS | European Observation gridded dataset |
| f | Base single-step forecasting model |
| GIS | Geographic Information System |
| GWD | Groundwater depth |
| MAE | Mean Absolute Error |
| MK | Mann–Kendall |
| ND | Nitrates Directive |
| RMSE | Root mean square error |
| SMK | Seasonal Mann–Kendall |
| SNIRH | National Water Resources Information System |
| TVZ | Tagus Vulnerable Zone |
| XGBoost | Extreme Gradient Boosting |
| α | Significance level |
| ɛ | Random error term |
| Ct | Cosine seasonal term, cos(2πt/12) |
| Dt | River discharge at month t (m³ s⁻¹) |
| ETot | Reference evapotranspiration at month t |
| GWD*t | Estimated groundwater depth at time t (m) |
| GWDt | Groundwater depth at time t (m) |
| h | Forecast horizon |
| k | Rollback step in rolling-origin validation |
| KRS | Empirical radiation adjustment coefficient |
| Lag 1 | One month before |
| Lag 2 | Two months before |
| M | Number of rolling-origin iterations |
| N | Length of the time series |
| nobs | Number of observed groundwater-depth values |
| Pt | Precipitation at month t (mm) |
| Ra | Solar radiation (MJ m⁻² day⁻¹) |
| St | Sine seasonal term, sin(2πt/12) |
| t | Time index |
| Tmax | Daily maximum air temperature (°C) |
| Tmin | Daily minimum air temperature (°C) |
| ym | Year–month timestamp |
References
- Custodio, E. Aquifer overexploitation: what does it mean? Hydrogeology Journal 2002, 10. [CrossRef]
- Döll, P.; Müller Schmied, H.; Schuh, C.; Portmann, F.T.; Eicker, A. Global-scale assessment of groundwater depletion and related groundwater abstractions: Combining hydrological modeling with information from well observations and GRACE satellites. Water Resources Research 2014, 50(7), 5698–5720. [CrossRef]
- Baird, A.J.; Low, R.G. The water table: Its conceptual basis, its measurement and its usefulness as a hydrological variable. Hydrological Processes 2022, 36(6). [CrossRef]
- Kalbus, E.; Reinstorf, F.; Schirmer, M. Measuring methods for groundwater–surface water interactions: A review. Hydrology and Earth System Sciences 2006, 10(6), 873–887. [CrossRef]
- Serra, J.; Marques-dos-Santos, C.; Marinheiro, J.; Cruz, S.; Cameira, M.R.; De Vries, W.; Garnier, J. Assessing nitrate groundwater hotspots in Europe reveals an inadequate designation of Nitrate Vulnerable Zones. Chemosphere 2024, 355. [CrossRef]
- Council Directive 91/676/EEC of 12 December 1991 concerning the protection of waters against pollution caused by nitrates from agricultural sources. Official Journal of the European Communities 1991, 34, 1-8.
- Koreimann, C.; Grath, J.; Winkler, G.; Nagy, W.; Vogel, W.R. Groundwater monitoring in Europe; European Environment Agency: Copenhagen, Denmark, 1996.
- Cameira; M.R.; Rolim, J.; Valente, F.; Mesquita, M.; Dragosits, U.; Cordovil, C.M. Translating the agricultural N surplus hazard into groundwater pollution risk: Implications for effectiveness of mitigation measures in nitrate vulnerable zones. Agriculture, Ecosystems & Environment 2021, 306. [CrossRef]
- Dhapre, M.; Jadhav, S.; Das, D.; Khan, J.; Kim, Y.; Chiao, S.; Danielson, T. A systematic review of machine learning in groundwater monitoring. Environmental Modelling & Software 2025, 192. [CrossRef]
- Stigter, T.Y.; Miller, J.; Chen, J.; Re, V. Groundwater and climate change: threats and opportunities. Hydrogeology Journal 2023, 31(1), 7-10. [CrossRef]
- Brakenhoff, D.A.; Vonk, M.A.; Collenteur, R.A.; Van Baar, M.; Bakker, M. Application of time series analysis to estimate drawdown from multiple well fields. Frontiers in Earth Science 2022, 10. [CrossRef]
- Lin, H.; Gharehbaghi, A.; Zhang, Q.; Band, S.S.; Pai, H.T.; Chau, K.W.; Mosavi, A. Time series-based groundwater level forecasting using gated recurrent unit deep neural networks. Engineering Applications of Computational Fluid Mechanics 2022, 16(1), 1655-1672. [CrossRef]
- Wunsch, A.; Liesch, T.; Broda, S. Groundwater level forecasting with artificial neural networks: a comparison of long short-term memory (LSTM), convolutional neural networks (CNNs), and non-linear autoregressive networks with exogenous input (NARX). Hydrology and Earth System Sciences 2021, 25(3), 1671-1687. [CrossRef]
- Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Melbourne, Australia, 2018. Available on-line: https://otexts.com/fpp2/ (accessed on 14/03/2026).
- Aguilera, H.; Guardiola-Albert, C.; Naranjo-Fernández, N.; Kohfahl, C. Towards flexible groundwater-level prediction for adaptive water management: using Facebook’s Prophet forecasting approach. Hydrological Sciences Journal 2019, 64(12), 1504–1518. [CrossRef]
- Jones, A.S.; Horsburgh, J.S. Hydrologic information systems: An introductory overview. Environmental Modelling & Software 2025, 185. [CrossRef]
- Ljung, L. System identification: Theory for the user, 2nd ed.; PTR Prentice Hall: Englewood Cliffs, New Jersey.
- Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, United States of America, 13-17/08/2016. [CrossRef]
- Shearer, C. The CRISP-DM model: The new blueprint for data mining. Journal of Data Warehousing 2000, 5(4), 13–22.
- Wirth, R.; Hipp, J. CRISP-DM: Towards a standard process model for data mining. In Proceedings of the 4th International Conference on the Practical Applications of Knowledge Discovery and Data Mining, Manchester, England, 11-13/04/2000.
- Costa, D.; Santos, J.; Chambel, A. Five decades of groundwater change across a diverse Mediterranean climate region: Disentangling natural and human drivers of water quantity and quality. Science of the Total Environment 2025, 1006. [CrossRef]
- Galdelli, A.; Fronzi, D.; Narang, G.; Mancini, A.; Tazioli, A. Groundwater level forecasting using data-driven models and vadose zone: A comparative analysis of ARIMA, SARIMAX, Prophet, and NeuralProphet. Applied Computing and Geosciences 2025, 28. [CrossRef]
- Gelati, E.; Zajac, Z; Ceglar, A.; Bassu, S.; Bisselink, B.; Adamovic, M.; Bernhard, J.; Malagó, A.; Pastori, M.; Bouraoui, F.; de Roo, A. Assessing groundwater irrigation sustainability in the Euro-Mediterranean region with an integrated agro-hydrologic model. Advances in Science and Research 2020, 17, 227-253. [CrossRef]
- Chapman, P.; Clinton, J.; Kerber, R.; Khabaza, T.; Reinartz, T.; Shearer, C.; Wirth, R. CRISP-DM 1.0: Step-by-step data mining guide. SPSS inc 2000, 9(13), 1-73.
- APA. Plano de Gestão de Região Hidrográfica. Região hidrográfica do Tejo e Ribeiras do Oeste (RH5) 2016. Lisboa, Portugal.
- Almeida, C.; Lopo, M.; Jesus, M.; Gomes, A. Sistemas Aquíferos de Portugal. Centro de Geologia da Universidade de Lisboa: Lisbon, Portugal; Instituto Nacional da Água, Portugal: Lisboa, Portugal. 2000. [CrossRef]
- Cardoso, R.M.; Soares, P.M.M.; Lima, D.C.A.; Miranda, P.M.A. Mean and extreme temperatures in a warming climate: EURO CORDEX and WRF regional climate high resolution projections for Portugal. Climate Dynamics 2019, 52, 129–157. [CrossRef]
- Giorgi, F.; Lionell, P. Climate change projections for the Mediterranean region. Global and Planetary Change 2008, 63(2-3), 90-104. [CrossRef]
- Soares, P.M.M.; Cardoso, R.M.; Lima, D.C.A.; Miranda, P.M.A. Future precipitation in Portugal: high-resolution projections using WRF model and EUROCORDEX multi-model ensembles. Climate Dynamics 2017, 49, 2503–2530. [CrossRef]
- Sistema Nacional de Informação de Recursos Hídricos (SNIRH). Available on-line: https://apambiente.pt/agua/sistema-nacional-de-informacao-de-recursos-hidricos-snirh (accessed on 14/03/ 2026).
- Fortunato, A.B.; Freire, P.; Rilo, A.; Viseu, T.; Rodrigues, M. Mapping inundation of estuarine margins driven by ocean and fluvial forcings. In Proceedings of the 8th IAHR Europe Congress, Lisbon, Portugal, 4-7/06/2024.
- Dias, L.F.; Santos, F.; Carvalho, S.; Nunes, J.P.; Lima, D.; Cardoso, R.; Bento, V.; Rodrigues, M.; Matos Soares, P.; Santos, F.D. RNA2100 – Sectoral Impacts Modelling - Hydrological Balance & Agroforestry - Portugal Mainland. Agência Portuguesa do Ambiente: Lisbon, Portugal.
- Cornes, R.C.; Van Der Schrier, G.; Van Den Besselaar, E.J.; Jones, P.D. An ensemble version of the E-OBS temperature and precipitation data sets. Journal of Geophysical Research: Atmospheres 2018, 123(17), 9391-9409. [CrossRef]
- Hargreaves, G.H.; Samani, Z.A. Estimating potential evapotranspiration. Journal of the irrigation and Drainage Division 1982, 108(3), 225-230. [CrossRef]
- Allen, R.G.; Pereira, L.S.; Raes, D.; Smith, M. Crop Evapotranspiration-Guidelines for computing crop water requirements. FAO Irrigation and drainage paper 56 1998, 300(9). https://www.fao.org/4/x0490e/x0490e00.htm.
- Bosserelle, A.L.; Hughes, M.W. Groundwater monitoring infrastructure: Evaluation of the shallow urban and coastal network in Ōtautahi Christchurch. Journal of Hydrology: Regional Studies 2024, 55. [CrossRef]
- Evaluating groundwater monitoring data (Deliverable D5.2). Available on-line: https://repository.europe-geology.eu/egdidocs/hover/hover+d5_2+final+evaluating+groundwater+monitoring.pdf (14/03/2026).
- Mann, H.B. Nonparametric tests against trend. Econometrica 1945, 13(3), 245–259.
- Yue, S.; Pilon, P.; Phinney, B.; Cavadias, G. The influence of autocorrelation on the ability to detect trend in hydrological series. Hydrological Processes 2002, 16(9), 1807–1829. [CrossRef]
- Hirsch, R.M.; Slack, J.R. A nonparametric trend test for seasonal data with serial dependence. Water Resources Research 1984, 20(6), 727–732. [CrossRef]
- Sen, P.K. Estimates of the regression coefficient based on Kendall’s tau. Journal of the American Statistical Association 1968, 63(324), 1379–1389. [CrossRef]
- Bleidorn, M.T.; Pinto, W.P.; Schmidt, I.M.; Mendonça, A.S.F.; Reis, J.A.T. Methodological approaches for imputing missing data into monthly riverflow time series. Revista Ambiente & Água 2022, 17(2). [CrossRef]
- ARX timeseries model. Available on-line:. https://apmonitor.com/dde/index.php/Main/AutoRegressive (accessed on 14/03/2026).
- Taieb, S.B.; Hyndman, R. Boosting multi-step autoregressive forecasts. In Proceedings of the 31st International Conference on Machine Learning, Beijing, China, 21-26/06/2014.
- Regression evaluation metrics. Available on-line: https://apxml.com/courses/getting-started-with-scikit-learn/chapter-2-supervised-learning-regression/regression-evaluation-metrics (accessed on 14/03/2026).
- 3.4. Metrics and scoring: Quantifying the quality of predictions. Available on-line: https://scikit-learn.org/stable/modules/model_evaluation.html (accessed on 14/03/2026).
- Bergmeir, C.; Hyndman, R.J.; Koo, B. A note on the validity of cross-validation for evaluating autoregressive time series prediction. Computational Statistics & Data Analysis 2018, 120, 70-83. [CrossRef]
- 11. Common pitfalls and recommended practices. Available on-line: https://scikit-learn.org/stable/common_pitfalls.html (accessed on 14/03/2026).
- Alfio, M.R.; Pisinaras, V.; Panagopoulos, A.; Balacco, G. Groundwater level response to precipitation at the hydrological observatory of Pinios (central Greece). Groundwater for Sustainable Development 2024, 24. [CrossRef]
- Zhang, Y.; Li, H.; Zhong, Y.; Liu, W.; Chen, S.; Zhang, X.; Uddin, M.G.; Wang, Y.; Zhu, B.; Huang, X.; Wang, Y. Comparative assessment of machine-learning models for daily groundwater level prediction in a Metropolis, southwestern China. Journal of Hydrology: Regional Studies 2026, 64. [CrossRef]
- Chenjia, Z.; Xu, T.; Zhang, Y.; Ma, D. Deep learning models for groundwater level prediction based on delay penalty. Water Supply 2024, 24(2), 555-567. [CrossRef]
- Cyclical features in time series. Available on-line: https://skforecast.org/0.15.1/faq/cyclical-features-time-series.html (accessed on 14/03/2026).
- Recursive multistep forecasting. Available on-line: https://skforecast.org/0.15.1/user_guides/autoregresive-forecaster.html (accessed on 14/03/2026).








| Data type | Units | Source | Temporal coverage | Original temporal resolution | Number of spatial points |
|---|---|---|---|---|---|
| Groundwater depth | m | SNIRH | 1974-10-01 20205-01-16 |
Irregular (monthly/daily) | 69 |
| River discharge | m3 s-1 | SNIRH | 1973-10-02 2025-03-13 |
Daily | 1 |
| Maximum and minimum air temperature | º C | E-OBS | 2000-2024 | Daily | 145 |
| Precipitation | mm | E-OBS | 2000-2024 | Daily | 145 |
| Solar radiation | MJ m-2 d-1 | Calculated | 2000-2024 | Daily | 145 |
| Well | Nobs | Completeness (%) | MAE | Sen’s slope (m yr-1) | Trend sign |
|---|---|---|---|---|---|
| 405/17 | 222 | 73.8 | 0.1590 | -0.0037 | |
| 377/94 | 232 | 77.1 | 0.2002 | -0.0515 | - |
| 418/4 | 192 | 79.3 | 0.2136 | -0.0162 | - |
| 391/437 | 176 | 67.4 | 0.2562 | 0.0189 | + |
| 377/86 | 206 | 75.7 | 0.3449 | -0.0228 | |
| 341/17 | 203 | 69.0 | 0.4441 | 0.0283 | + |
| 390/208 | 78 | 96.3 | 0.5041 | 0.0521 | + |
| 331/2 | 83 | 90.2 | 0.5137 | 0.0172 | |
| 405/34 | 84 | 62.7 | 0.5395 | -0.0390 | |
| 404/69 | 147 | 72.4 | 0.5661 | 0.0091 | |
| 391/243 | 107 | 71.8 | 0.6660 | -0.1479 | - |
| 391/33 | 233 | 77.4 | 0.6863 | 0.0667 | + |
| 330/183 | 226 | 75.1 | 0.8595 | -0.0392 | - |
| 377/84 | 51 | 100.0 | 0.8683 | 0.1709 | |
| 342/97 | 62 | 62.6 | 1.0027 | 0.1155 | + |
| 377/54 | 77 | 95.1 | 1.3052 | 0.0124 | |
| 342/78 | 95 | 68.3 | 1.4512 | -0.0909 | - |

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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).