High concentrations of tropospheric ozone () in urban areas pose a significant risk to human health. This study proposes an evaluation framework based on the XGBoost algorithm to predict concentration, assessing the model’s capacity for seasonal extrapolation and spatial transferability. The experiment uses hourly air pollution data (, NO, , and NOx) and meteorological factors (temperature, relative humidity, barometric pressure, wind speed, and wind direction) from six monitoring stations in the Monterrey Metropolitan Area, Mexico (from 22 September 2022 to 21 September 2023). In the preprocessing phase, the datasets were extended via feature engineering, including cyclic variables, rolling windows, and lag features, to capture temporal dynamics. The prediction models were optimized using a random search, with time-series cross-validation to prevent data leakage. The models were evaluated across a concentration range of 0.001 to 0.122 ppm, demonstrating high predictive accuracy, with a coefficient of determination () of up to 0.96 and a root-mean-square error (RMSE) of 0.0034 ppm when predicting summer () concentrations without prior knowledge. Spatial generalization was robust in residential areas ( > 0.90), but performance decreased in the industrial corridor (AQMS-NL03). We identified that this decrease is related to local complexity through the quantification of domain shift (Kolmogorov–Smirnov test) and Shapley additive explanations (SHAP) diagnostics, since the model effectively learns atmospheric inertia in stable areas but struggles with the stochastic effects of NOx titration driven by industrial emissions. These findings position the proposed approach as a reliable tool for “virtual detection” while highlighting the crucial role of environmental topology in model implementation.
The operational integration of solar energy into modern power grids, particularly for day-ahead markets and battery storage scheduling, requires highly accurate, multi-horizon irradiance forecasts to mitigate cloud-induced intermittency. This study evaluates a spatiotemporal, multi-horizon (24-h) Global Horizontal Irradiance (GHI) forecasting framework across a high-resolution 167-node microclimate in Tula, Tamaulipas, Mexico, using a robust 2020–2024 baseline. We benchmarked six predictive paradigms: diurnal persistence, linear regression, tree ensembles (Extra Trees and XGBoost), a zero-shot foundation model (TimesFM), and a deep CNN–LSTM network, using historical clear-sky irradiance sequences and strictly causal meteorological features. On the independent 2024 test set, XGBoost achieved the lowest macro-average RMSE (), but Diebold–Mariano testing confirmed that it was statistically equivalent to the CNN–LSTM architecture. XGBoost showed significant superiority at ultra-short horizons ( and ) by efficiently capturing nonlinear radiative inertia, whereas CNN–LSTM minimized errors under sustained overcast regimes and produced the sharpest empirical 95% prediction intervals. At the 24-h mark, ordinary linear regression converged, whereas the complex models did not, highlighting a physical transition toward deterministic solar geometry. Remarkably, zero-shot TimesFM outperformed diurnal persistence without any domain-specific training. Conditional Tree SHAP interpretability demonstrated that the XGBoost model dynamically reallocated predictive weight, shifting from contemporaneous irradiance under clear skies to precipitable water during volatile, intermittent conditions.