Next Article in Journal
Spatiotemporal Patterns, Characteristics, and Ecological Risk of Microplastics in the Surface Waters of Shijiu Lake (Nanjing, China)
Previous Article in Journal
Entropy-Generation-Based Optimization of Elbow Suction Conduit for Mixed-Flow Pumps
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs

by
Alejandro González Barberá
1,2,
Sergio Iserte
3,
Maribel Castillo
2,
Jaume Luis-Gómez
1,
Raúl Martínez-Cuenca
1,
Guillem Monrós-Andreu
1 and
Sergio Chiva
1,*
1
Department of Mechanical Engineering and Construction, Universitat Jaume I, 12071 Castelló de la Plana, Comunitat Valenciana, Spain
2
Department of Computer Science and Engineering, Universitat Jaume I, 12071 Castelló de la Plana, Comunitat Valenciana, Spain
3
Barcelona Supercomputing Center (BSC), 08034 Barcelona, Spain
*
Author to whom correspondence should be addressed.
Water 2025, 17(22), 3225; https://doi.org/10.3390/w17223225
Submission received: 10 October 2025 / Revised: 28 October 2025 / Accepted: 3 November 2025 / Published: 11 November 2025

Abstract

Forecasting influent flow in Wastewater Treatment Plants (WWTPs) is critical for managing operational risks during flash floods, especially in Spain’s Mediterranean coastal regions. These facilities, essential for public health and environmental protection, are vulnerable to abrupt inflow surges caused by heavy rainfall. This study proposes a data-driven approach combining historical flow and rainfall data to predict short-term inflow dynamics. Several models were evaluated, including Random Forest, XGBoost, CatBoost, and LSTM, using metrics such as Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R-squared (R2). XGBoost outperformed the others, particularly under severe class imbalance, with only 1% of the data representing rainfall events. Hyperparameter tuning and input window size analysis revealed that accurate predictions are achievable with just 14 days of training data from a 10-year (2012–2022) dataset sourced from a single WWTP and on-site weather station. The proposed framework supports proactive WWTP management during extreme weather events.
Keywords: WWTP; influent flow forecasting; machine Learning; Mediterranean climate WWTP; influent flow forecasting; machine Learning; Mediterranean climate

Share and Cite

MDPI and ACS Style

González Barberá, A.; Iserte, S.; Castillo, M.; Luis-Gómez, J.; Martínez-Cuenca, R.; Monrós-Andreu, G.; Chiva, S. Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs. Water 2025, 17, 3225. https://doi.org/10.3390/w17223225

AMA Style

González Barberá A, Iserte S, Castillo M, Luis-Gómez J, Martínez-Cuenca R, Monrós-Andreu G, Chiva S. Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs. Water. 2025; 17(22):3225. https://doi.org/10.3390/w17223225

Chicago/Turabian Style

González Barberá, Alejandro, Sergio Iserte, Maribel Castillo, Jaume Luis-Gómez, Raúl Martínez-Cuenca, Guillem Monrós-Andreu, and Sergio Chiva. 2025. "Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs" Water 17, no. 22: 3225. https://doi.org/10.3390/w17223225

APA Style

González Barberá, A., Iserte, S., Castillo, M., Luis-Gómez, J., Martínez-Cuenca, R., Monrós-Andreu, G., & Chiva, S. (2025). Machine Learning-Based Forecasting of Wastewater Inflow During Rain Events at a Spanish Mediterranean Coastal WWTPs. Water, 17(22), 3225. https://doi.org/10.3390/w17223225

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

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop