*Article* **Multivariable Panel Data Cluster Analysis of Meteorological Stations in Thailand for ENSO Phenomenon**

**Porntip Dechpichai, Nuttawadee Jinapang, Pariyakorn Yamphli, Sakulrat Polamnuay, Sittisak Injan and Usa Humphries \***

> Department of Mathematics, Faculty of Science, King Mongkut's University of Technology Thonburi, 126 Pracha Uthit Rd., Bang Mot, Thung Khru, Bangkok 10140, Thailand; porntip.dec@kmutt.ac.th (P.D.); nuttawadee.jina@mail.kmutt.ac.th (N.J.); pariyakorn.tuan@mail.kmutt.ac.th (P.Y.); sakunrat.pol@mail.kmutt.ac.th (S.P.); sittisak\_injan@hotmail.com (S.I.)

**\*** Correspondence: usa.wan@kmutt.ac.th; Tel.: +66-2470-8822

**Abstract:** The purpose of this research is to study the spatial and temporal groupings of 124 meteorological stations in Thailand under ENSO. The multivariate climate variables are rainfall, relative humidity, temperature, max temperature, min temperature, solar downwelling, and horizontal wind from the conformal cubic atmospheric model (CCAM) in years of El Niño (1987, 2004, and 2015) and La Niña (1999, 2000, and 2011). Euclidean distance timed and spaced with average linkage for clustering and silhouette width for cluster validation were employed. Five spatial clusters (SCs) and three temporal clusters (TCs) in each SC with different average precipitation were compared by El Niño and La Niña. The pattern of SCs and TCs was similar for both events except in the case when severe El Niño occurred. This method could be applied using variables forecasted in the future to be used for planning and managing crop cultivation with the climate change in each area.

**Keywords:** Euclidean distance timed and spaced; meteorological station; multivariable panel data cluster analysis

**1. Introduction**

In the past, the climate in Thailand was largely influenced by monsoon winds, such as southwest moonsoon and northeast moonsoon, resulting in Thailand having a predominantly rainy season and dry season (summer and winter) taking place at a relatively certain time. Currently, however, there has been an El Niño–La Niña phenomenon known as the ENSO phenomenon (ENSO) that affects the climate. The ENSO phenomenon is caused by variations in the Southern Hemisphere's climate system. It is a phenomenon that has a connection between ocean phenomena and ocean winds. It brings about climatic variations, causing unusually high rainfall and unusual drought [1]. There are three types of weather variability: drought, rain and cold disasters, and tropical cyclones. Thailand's proximity to the Western Pacific makes it directly affected by El Niño during 1997–1998, which resulted in drought, lower than normal rainfall, and higher than normal air temperatures across the country [2]. In 1999–2000, during the La Niña period, Thailand experienced more rainfall than usual and cold weather, breaking records in many provinces [2]. Thailand is in the humid tropics, which is suitable for agriculture. Most of its population is engaged in agriculture, so agricultural products are the main source of the country's income and, therefore, vital to its economy. The 12th Agricultural Development Plan (2017–2021) summarizes the agricultural situation in terms of climate change and seasonal variability, resulting in decreased agricultural productivity. Existing plant species are unable to adapt to changing climate conditions, especially the ongoing drought from 2012 to 2015, damaging important crops. This may be due to insufficient observation or experience by farmers to cope with unprecedented situations in time, posing a risk of loss of productivity and increased pro-

**Citation:** Dechpichai, P.; Jinapang, N.; Yamphli, P.; Polamnuay, S.; Injan, S.; Humphries, U. Multivariable Panel Data Cluster Analysis of Meteorological Stations in Thailand for ENSO Phenomenon. *Math. Comput. Appl.* **2022**, *27*, 37. https:// doi.org/10.3390/mca27030037

Received: 27 January 2022 Accepted: 19 April 2022 Published: 24 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 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 (https:// creativecommons.org/licenses/by/ 4.0/).

duction costs [3]. ENSO-related climate variability exerts strong influences on agricultural production in different regions, including in Thailand [4–9].

Cluster analysis, unsupervised learning, have been applied in many studies to define spatial and temporal variability from climate variables. In previous studies, only one variable, mostly focusing on rainfall in a time series format, has been used for spatial and temporal cluster [10–12]. However, there are other climate factors that affect agricultural production such as relative humidity and temperature, which statistically significantly affected sugarcane production, which was likely to decrease in the year of El Niño and to increase in the year of La Niña [13]. Although there are some studies which employed longitudinal meteorological factors such as rainfall, air temperature, humidity, pressure, wind, evaporation, etc., they firstly average data over the time into the general crosssectional data and then the distance between samples is calculated for clustering [14]. Averaging over the time will result in a high amount of data loss because the mean shows the average change in the data, yet it does not show the distribution of the data [15–18].

It would be beneficial to study variation across different geographic scales using multivariable panel hierarchical clustering from ENSO-effected climate variables in Thailand, obtained from the conformal cubic atmospheric model (CCAM). There are seven weather variables, including rainfall, average temperature, highest temperature, lowest temperature, temperature difference from highest temperature, temperature difference from lowest temperature, relative humidity, and solar radiation according to the locations of the weather stations of the Thailand Meteorological Department. These monthly data have been characterized by a combination of panel data, cross-sectional data, and time-series data representing behavioral units and periods.

Therefore, this research will employ the distance measurement that does not need to average the data, which is Euclidean distance timed and spaced, to cluster meteorological weather stations in Thailand and discover the seasonal pattern for each cluster using climate factors associated with precipitation when ENSO phenomena occur, since changes in rainfall are important variables affecting agricultural productivity. The studied method, cluster analysis on multivariable panel data with climate change application, therefore, could be applied to the future data from weather models to group area and season. The clustering framework applied in this study is shown in Figure 1. The results could be used as a guideline to benefit the agricultural sector or the relevant agencies to prepare for the upcoming changes resulting from climate change. In addition, spatial and timely management plans can also be appropriately executed, including drought monitoring, water management of both agricultural areas, as well as crop management.

**Figure 1.** The multivariable panel data clustering framework.

#### **2. Materials and Methods**

*2.1. Study Area*

Thailand is located between latitudes 5◦37 N and 20◦27 N and longitudes 97◦22 E and 105◦37 E. A total of 124 stations of the Thai Meteorological Department (Figure 2) were selected for the cluster analysis.

**Figure 2.** Spatial distribution of 124 meteorological stations in Thailand from the Thai Meteorological Department (TMD).
