Air Temperature Prediction in Sleman Yogyakarta using Fourier Series and Markov Switching

Idrus Syahzaqi, Muhammad Riefky, Fajar Dwi Cahyoko, Muhammad Hafidzuddin Nahar, Fachriza Yosa Pratama, Muhammad Fariz Fadillah Mardianto

Abstract


Global warming increases the urgency of accurate local temperature forecasting, particularly in Sleman, Yogyakarta, a region characterized by diverse topography and high exposure to climate-related risks such as volcanic activity, agricultural vulnerability, and rapid urbanization. Such conditions increase the urgency for localized predictive models that can support agricultural planning, energy management, and disaster preparedness. This research used quantitative approach with a comparative predictive modelling design to predict the weekly average air temperature in Sleman by comparing two models: the Fourier Series regression and the Markov Switching Autoregressive (MSAR) model. The Fourier Series was selected for its ability to capture smooth seasonal and periodic behavior typical of climatological data, whereas the MSAR model was employed to accommodate regime shifts and nonlinear structural variations. The dataset comprises 127 weekly observations from January 2023 to June 2025 (BMKG), the data were split into 70% training and 30% testing. Model performance was assessed using GCV, MSE, MAE, MAPE, and residual diagnostics. Results show that the Fourier Series model performs substantially better, achieving lower GCV (0.3520), MSE (0.00415 training; 0.00114 testing), and MAE (0.34015 training; 0.12940 testing), as well as lower MAPE (1.26% training; 0.47% testing). In contrast, the MSAR model yields higher errors with GCV (0.5747), MSE (0.9113 training; 0.4686 testing), MAE (0.8005 training; 0.5512 testing), and MAPE (1.96% training; 1.34% testing). These results indicate that Sleman’s temperature dynamics characterized by stable oscillatory patterns with minimal regime shifts are more effectively captured through harmonic decomposition. The study reinforces the importance of periodic modeling for mixed-topography regions like Sleman and recommends future research integrating additional climatic variables, hybrid statistical–machine-learning frameworks, and longer time spans to improve responsiveness to extreme events and nonlinear atmospheric behavior.

Keywords


Air Temperature; Fourier Series; Markov Switching; Time Series.

Full Text:

DOWNLOAD [PDF]

References


Anandari, A. A., Supandi, E. D., & Musthofa, M. W. (2022). Fourier Series Nonparametric Regression Modeling in the Case of Rainfall in West Java Province. IJID (International Journal on Informatics for Development), 11(1), 142–151. https://doi.org/10.14421/ijid.2022.3300

Arif, N., & Toersilawati, L. (2024). Monitoring and predicting development of built-up area in sub-urban areas: A case study of Sleman, Yogyakarta, Indonesia. Heliyon, 10(14), e34466. https://doi.org/10.1016/j.heliyon.2024.e34466

Badan Meteorologi, Klimatologi, dan Geofisika (BMKG). (2025). Data Online BMKG.

Bessac, J., Ailliot, P., Cattiaux, J., & Monbet, V. (2016). Comparison of hidden and observed regime-switching autoregressive models for ($u,v$)-components of wind fields in the northeastern Atlantic. Advances in Statistical Climatology, Meteorology and Oceanography, 2(1), 1–16. https://doi.org/10.5194/ascmo-2-1-2016

Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (1994). Time Series Analysis: Forecasting and Control (3rd ed.). Prentice Hall.

Christienova, S. I., Pratiwi, E. W., & Darmawan, G. (2018). Perbandingan Model Peramalan Singular Spectrum Analysis (SSA) dan Fourier Series Analysis (FSA) pada Data Suhu Udara di Surabaya. Berkala MIPA, 1, 94-106.

Dastoorpoor, M., Khanjani, N., & Khodadadi, N. (2021). Association between Physiological Equivalent Temperature (PET) with adverse pregnancy outcomes in Ahvaz, southwest of Iran. BMC Pregnancy and Childbirth, 21(1), 1–10. https://doi.org/10.1186/s12884-021-03876-5

de Mattos Neto, P. S. G., Cavalcanti, G. D. C., Domingos, D. S., & Silva, E. G. (2022). Hybrid systems using residual modeling for sea surface temperature forecasting. Scientific Reports, 12(1), 1–16. https://doi.org/10.1038/s41598-021-04238-z

De Myttenaere, A., Golden, B., Le Grand, B., & Rossi, F. (2016). Mean absolute percentage error for regression models. Neurocomputing, 192, 38–48.

Elseidi, M. (2023). Forecasting temperature data with complex seasonality using time series methods. Modeling Earth Systems and Environment, 9(2), 2553–2567. https://doi.org/10.1007/s40808-022-01632-y

Eubank, R. L. (1999). Nonparametric Regression and Spline Smoothing. CRC Press. https://doi.org/https://doi.org/10.1201/9781482273144

Fajary, F. R., Lee, H. S., Kubota, T., Bhanage, V., Pradana, R. P., Nimiya, H., & Putra, I. D. G. A. (2024). Comprehensive spatiotemporal evaluation of urban growth, surface urban heat island, and urban thermal conditions on Java island of Indonesia and implications for urban planning. Heliyon, 10(13), e33708. https://doi.org/10.1016/j.heliyon.2024.e33708

Hamilton, J. D. (1989). A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle. Econometrica, 57(2), 357–384. https://doi.org/10.2307/1912559

Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688. https://doi.org/https://doi.org/10.1016/j.ijforecast.2006.03.001

Kim, C.-J., & Nelson, C. R. (1999). State-space Models with Regime Switching: Classical and Gibbs Sampling Approaches with Application. The MIT Press.

Lee, J., & Dessler, A. E. (2023). Future Temperature‐Related Deaths in the U.S.: The Impact of Climate Change Demographics, and Adaptation. GeoHealth, 7. https://doi.org/https://doi.org/10.1029/2023GH000799

Lindell, T., Ehrlén, J., & Dahlgren, J. P. (2022). Weather-driven demography and population dynamics of an endemic perennial plant during a 34-year period. Journal of Ecology, 110(3), 582–592. https://doi.org/10.1111/1365-2745.13821

Mardianto, M. F. F., Kartiko, S. H., & Utami, H. (2019). Forecasting Trend-Seasonal Data Using Nonparametric Regression with Kernel and Fourier Series Approach. In L.-K. Kor, A.-R. Ahmad, Z. Idrus, & K. A. Mansor (Eds.), Proceedings of the Third International Conference on Computing, Mathematics and Statistics (iCMS2017) (pp. 343–349). Springer Singapore.

Mohammadi, B., Mehdizadeh, S., Ahmadi, F., Lien, N. T. T., Linh, N. T. T., & Pham, Q. B. (2021). Developing hybrid time series and artificial intelligence models for estimating air temperatures. Stochastic Environmental Research and Risk Assessment, 35(6), 1189–1204. https://doi.org/10.1007/s00477-020-01898-7

Ni’matuzzahroh, L., & Dani, A. T. R. (2024). Nonparametric Regression Modeling with Multivariable Fourier Series Estimator on Average Length of Schooling in Central Java in 2023. Inferensi, 7(2), 73–81. https://doi.org/10.12962/j27213862.v7i2.20219

Rahman, S. M., Rahman, S. M., Ali, M. S., Mamun, M. A. Al, & Uddin, M. N. (2020). Estimation of seasonal boundaries using temperature data: a case of northwest part of Bangladesh. Mathematics of Climate and Weather Forecasting, 6(1), 50–62. https://doi.org/10.1515/mcwf-2020-0102

Sari, M. I. (2024). Urban heat island (UHI) spatiotemporal pattern in comparison with NDBI before–after COVID-19 pandemic in Sleman Regency, Indonesia. Modeling Earth Systems and Environment, 10(2), 2855–2867. https://doi.org/10.1007/s40808-023-01924-x

Sevgin, F. (2025). Machine Learning-Based Temperature Forecasting for Sustainable Climate Change Adaptation and Mitigation. Sustainability (Switzerland), 17(5). https://doi.org/10.3390/su17051812

Spezia, L., Gibbs, S., Glendell, M., Helliwell, R., Paroli, R., & Pohle, I. (2023). Bayesian analysis of high-frequency water temperature time series through Markov switching autoregressive models. Environmental Modelling and Software, 167(May), 105751. https://doi.org/10.1016/j.envsoft.2023.105751

Taiwo, A. I., Olatayo, T. O., Adedotun, A. F., & Adesanya, K. K. (2019). Modeling and forecasting periodic time series data with Fourier autoregressive model. Iraqi Journal of Science, 60(6), 1367–1373. https://doi.org/10.24996/ijs.2019.60.6.20

Utami, T., Fauzi, F., & Yuliyanto, E. (2023). Statistical Downscaling Using Regression Nonparametric Of Fourier Series-Polynomial Local Of Climate Change. BAREKENG: Jurnal Ilmu Matematika Dan Terapan, 17(3), 1411–1418. https://doi.org/10.30598/barekengvol17iss3pp1411-1418

Walker, J. S. (1988). Fourier Analysis. Oxford University Press.

Willmott, C. J., & Matsuura, K. (2005). Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Climate Research, 30, 79–82. https://doi.org/10.3354/cr030079

Wong, P. P. Y., Lai, P. C., Low, C. T., Chen, S., & Hart, M. (2016). The impact of environmental and human factors on urban heat and microclimate variability. Building and Environment, 95, 199–208. https://doi.org/10.1016/j.buildenv.2015.09.024

Zong-chang, Y. (2013). Fourier analysis-based air temperature movement analysis and forecast. Signal Processing, IET, 7, 14–24. https://doi.org/10.1049/iet-spr.2012.0255




DOI: https://doi.org/10.31764/jtam.v10i2.35371

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Idrus Syahzaqi, Muhammad Riefky, Fajar Dwi Cahyoko, Muhammad Hafidzuddin Nahar, Fachriza Yosa Pratama, Muhammad Fariz Fadillah Mardianto

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

_______________________________________________

JTAM already indexing:

                     


_______________________________________________

 

Creative Commons License

JTAM (Jurnal Teori dan Aplikasi Matematika) 
is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

______________________________________________

_______________________________________________

_______________________________________________ 

JTAM (Jurnal Teori dan Aplikasi Matematika) Editorial Office: