Data-driven modelling of coastal water quality dynamics
Muhammad Uzair Mahmood, Man Sing Wong, Majid Nazeer, Sawaid Abbas, Alessandro Stocchino, Ken Tse Man Wong
Long-term coastal monitoring networks provide the opportunity to evaluate how water-quality predictability varies across contrasting coastal bays. However, most machine learning studies focused on individual stations, optically active variables or short validation periods. We analyze 37 years (1986-2023) of monthly in-situ data from 94 stations across four Hong Kong Bay systems Central Harbours, Eastern Bays, Southern Bays, and Western Bays to test whether empirical predictability and highest-ranked water-quality predictors vary systematically with regional hydrography. Eight parameters: ammonia, nitrate, and nitrite nitrogen; dissolved oxygen; pH; salinity; temperature; and chlorophyll-a were assessed. Five machine-learning models Random Forest (RF), Gradient Boosting (GB), XGBoost (XGB), Support Vector Machine (SVM), and Artificial Neural Network (ANN) were evaluated under chronological 70/30 split with Bayesian-optimised hyperparameters. Tree-based ensembles produced the most stable performance overall, with strong performance for temperature and salinity, moderate-to-variable performance for selected nutrient species, and weak transferability for dissolved oxygen and pH. Chlorophyll-a remained among the least predictable variables across most bay systems under the chronological validation framework. SHAP analysis revealed regional transition in predictor structure: salinity, temperature and dissolved oxygen dominated mixing-structured Central, Eastern and Southern systems, while nitrate and ammonia became more important in Pearl River-influenced Western Bays. Long-term analyses indicated a declining pH trend in the urbanised Central Harbours and Southern and Western Bays, whereas Eastern Bays remained comparatively stable. These findings provide regional benchmark for empirical water-quality predictability under chronological validation and identify the need to incorporate lagged hydrometeorological, watershed and discharge variables for future forecasting applications.