Spatial estimation of daily precipitation in Thailand based on infrared satellite images using artificial neural networks

Precipitation data highly benefits water management and flood warning. In Thailand, an agricultural country, the number of rain gauge stations is relatively small compared to the country’s area. To deal with the problem, many spatial interpolation methods have been adopted. They utilized only geological data from stations with known rainfall values to estimate values at other locations. Characteristics of clouds captured in infrared satellite images could be used to infer rainfall. In this study, infrared satellite satellite images from every 30 min were integrated with geological data to spatially estimate daily precipitation. Under different assumptions, three estimation models, namely AveragedIR-ANN, IRs-ANN, and LocalIRs-CNN, were proposed. All three models used artificial neural networks as the estimator. The AveragedIR-ANN model used the average of 48 black body temperature (TBB) values to present IR images at the target location as an input. Meanwhile, the 48 TBB values were directly fed into the IRs-ANN. Not only the TBB values at the target location, but the LocalIRs-CNN also used the TBB values around the target location as inputs. Experiments were performed on 24 days per year between 2016 and 2019 with multiple tries. The results show that the LocalIRs-CNN outperformed by minimizing the median highest root mean square error. The model was suggested for northern, western, and central Thailand.


Introduction
Precipitation data is highly significant meteorological information that benefits water resources, hydrological management, and agricultural water management.The agricultural sector has played a vital role in Thailand's development, mostly due to its well-endowed natural resources.Precipitation data analysis is necessary for the strategic planning of the national agricultural.In general, precipitation statistic is collected thoroughly from rain gauge stations settled sparsely throughout the region of interest.However, rainfall records often contain missing data due to many factors, for example, environmental conditions and malfunctioned equipment.In Thailand, there are 75 rain gauge stations monitored by the Thai Meteorological Department and 935 automatic weather stations monitored by the hydro-informatics institute.Moreover, the number of stations is relatively small as they cover an area of 513,120 km 2 .Due to the lack of spatially continuous patterns, rainfall and hydrological process might not be fully captured.
To deal with the problem, many recent studies have applied spatial interpolation methods to utilize stations with known rainfall values to estimate values at other locations.Those spatial interpolation methods estimate the missing rainfall values by weighted averaging the values of available stations.The inverse distance weighting (IDW), which is a spatial interpolation method, has been investigated by Kurtzman et al. (2009); Chen et al. (2010); Chen and Liu (2012); Yang et al. (2015); Barrios et al. (2018); Chutsagulprom et al. (2022).It is a relatively simple implementation in which the weights are inversely proportional to the power of the distance between the locations.The kriging interpolation is an alternative method that has been used to estimate missing rainfall data.It estimates unknown quantities using a linear combination of nearby sampled points with the kriging weights.Ordinary kriging (OK) is a common methods for kriging.It was applied extensively to various geoscience variables, e.g., solar radiation (Rehman and Ghori 2000), temperature (Li et al. 2005), and precipitation (Chen et al. 2010;Suhaila and Jemain 2012;Yang et al. 2015;Chutsagulprom et al. 2022).In another way, some investigations solved the spatial estimation problem in regression paradigm.Multiple linear regression (MLR) is a statistical model that explains the relation between independent variables and a dependent variable.It fits a linear function of independent variables to predict the value of dependent variable.The MLR has been successfully applied to estimate missing rainfall values in a study (Barrios et al. (2018)).The study used rainfall values of neighboring stations of a considered position as the explanatory variables, and the rainfall value of the considered position was the response variable.Artificial neural network (ANN) is another regression model that has been widely adopted to estimate missing rainfall values (Arab Amiri and Mesgari 2017; Barrios et al. 2018;Chutsagulprom et al. 2022).The ANN with multilayer perceptron architecture was used.In the study of Barrios et al. (2018), the input layer is the rainfall values observed at stations near the target position, and the output layer is the estimate of the target position values.In contrast, the study (Arab Amiri and Mesgari 2017) used longitude, latitude, and elevation of the target position as input.As can be seen, those recent studies used precipitation data and geological position at gauge stations to estimate rainfall values at other locations.In contrast, an investigation of Sharifi et al. (2019) used satellite data (i.e., cloud effective radius, cloud optical thickness, and integrated cloud water path) as explanatory variables to predict the precipitation.The MLR and ANN were adopted as predictive models.The study evaluated the models with integrated multi-satellite retrievals for GPM (IMERG) data, which is estimated precipitation provided by NASA, instead of observed precipitation measured at gauge stations.However, the research showed that satellite images have the potential in spatial estimation of precipitation.
An infrared satellite (IR) image is a common type of satellite image.The IR image provides information about the temperature of water, land, and clouds by measuring the infrared radiation emitted from surfaces below the satellite.In IR images, white represents cold objects, and hot surfaces are represented as black.Therefore, IR imagery can be used to tell the differences of low clouds from high clouds.Warm and appear gray in IR satellite images are related with low clouds.The bright white is related with thick cold clouds, like the tops of thunderstorms.
In this study, we hypothesized that the characteristics of clouds captured in IR satellite images can be used to infer rainfall.IR satellite images integrated with geological data were used to capture the spatial variability of precipitation.
Under different assumptions on clouds in different times and the effects of wind, three ANN models, i.e., AveragedIR-ANN, IRs-ANN, and LocalIRs-CNN, were constructed for spatially estimating daily precipitation in Thailand.The experiments were performed on daily rainfall data of 24 days per year between 2016 and 2019.For each experiment, both the mean absolute error (MAE) and root-mean-square error (RMSE) averaging on 30 triers were reported and analyzed.

Artificial neural network
Artificial neural network (ANN) is a network of neurons.As the structure of a neuron is shown in Fig. 1, a neuron is a processing unit that obtains inputs and subsequently operates these inputs to generate outputs.Given the inputs x i , i = 1, 2, ..., p, a linear combination of the input and its associated weight is initially generated and later fed to an activation function φ(•) to produce an output y * , that is where w i is the weight of input i.A common activation function is the sigmoid functions which is defined as follows: ( Multilayer perceptron (MLP) is a well-known structure of ANN.The neurons in MLP are aligned in a layer, with the output of one layer serving as the input to the next layer.By providing a training dataset, optimal values of all weights w i can be found using the Levenberg-Marquardt training algorithm with minimizing the mean squared error between actual and predicted values of target variable.

Convolutional neural network
Convolutional neural network (CNN) is a class of ANN that can take image as input data.Similar to the MLP, a CNN consists of an output layer, an input layer, and hidden layers.In contrast, the hidden layers are composed of layers that perform convolutions.Those layers are called convolutional layers.A convolution layer is a combination of linear and nonlinear operations, i.e., convolution operation and activation function.The input tensor (image or feature-map) is convoluted with a kernel by applying the discrete matrix convolution.An element-wise product between each element of 123 the kernel and the input tensor is calculated at each location of the tensor and summed to produce the output value in the corresponding position of the output tensor (called a feature map).This procedure is repeated applying multiple kernels to form an arbitrary number of feature maps.The outputs of convolution are then passed through a nonlinear activation function.The most common nonlinear activation function used presently is the rectified linear unit (ReLU), which computes the function (3) The output feature maps of the final convolution are typically flattened and connected to fully connected layers which every input is connected to every output by a weight.Each fully connected layer is followed by a nonlinear function.The last fully connected layer has the same number of output.Thus, it is usually interpreted as the output layer.The optimal kernels in convolution layers and weights in fully connected layers can be found by minimizing differences between predictions and given ground truth on a training dataset using the gradient descent algorithm (Yamashita et al. 2018).

Daily precipitation data
The hydro-informatics institute (HII) of Ministry of Higher Education, Science, Research, and Innovation in Thailand provided the daily precipitation dataset used in this study.The daily rainfall data was collected by automatic weather stations distributed over Thailand.The number of available weather stations is varied by time because of new installation and restoration.In this work, we evenly randomly retrieved daily rainfall data of 24 days per year between 2016 and 2019 from the open data service of HII (Hydro-Informatics Institute 2021).

Infrared satellite image dataset
The Himawari-8 and 9 satellites, Japanese weather satellites, are the sources of infrared satellite images used in this study.Satellites utilize a 16-channel multi-spectral imager to capture visible light and infrared imagery from the Asia-Pacific region.The imager can generate images with a resolution of 500 ms and can deliver full disk observations every 10 min and images of Japan every 2.5 min (Japan Meteorological Agency 2016).In this study, full disk observations in band 13 (i.e., wavelength = 10.4 μm and central wavelength = 10.4073μm) which are infrared images covering the area of Thailand were retrieved from the Data Integration and Analysis System (DIAS) (Japan Agency for Marine-Earth Science and Technology 2021).The infrared satellite images for every 30 min were used in our experiments.

Digital elevation models
As elevation was also used to estimate daily precipitation at the target position, it was derived from the Global Digital Elevation Model (GDEM).The DEM were provided by the Terra Advanced Spaceborne Thermal Emission and Reflection Radiometer Global Digital Elevation Model (ASTER GDEM) version 3 (ASTGTM).It captures the Earth's terrestrial zones at a spatial resolution of 1 arc second (about 30 ms of horizontal display at the equator).The ASTER GDEM's geographical coverage ranges from 83°North to 83°South.The data are projected into the 1984 World Geodetic System (WGS84)/1996 Earth Gravitational Model (EGM96) geoid (NASA/METI/AIST/Japan Spacesystems and U.S./Japan ASTER Science Team 2019).We retrieved the ASTER GDEM through the NASA Earthdata Search (National Aeronautics and Space Administration 2021).

Proposed method
In this study, we proposed three different neural network models under different hypotheses for spatially estimating daily precipitation.We assumed that the characteristics of clouds captured in IR images can be used to infer the rainfall.IR images integrated with geological data (i.e., latitude, longitude, and elevation) were used to capture the spatial variability of precipitation.For each day, IR images of every 30 min were considered.The details of each model are discussed as follows:

AveragedIR-ANN
The first proposed model was designed under the hypothesis that clouds at the target position at different times equally affect the rainfall, and the effect of wind is not significant.We adopted an ANN as estimation model.As shown in Fig. 3, the average value of black body temperatures (TBB) presenting IR images and geological data of the target position were used as an input of the model.Thus, the model is named AveragedIR-ANN.The AveragedIR-ANN model consists of a hidden layer and produces the predicted precipitation for the target position as a result.In the hidden layer, the activation function used is the familiar sigmoid function.The number of hidden nodes, N hidden , is determined by the following equation: where N input and N out put are the number of input and output, respectively (Heaton 2008).As the size of input is three nodes and the output layer has one node, the number of hidden nodes is three (= 2 3 • 3 + 1) nodes.For the output layer, a ReLU is applied as the activation function.

LocalIRs-CNN
The LocalIRs-ANN model flattens each input IR image to form an input vector.This process breaks the 2D relationship between TBB values in the same image.It is interesting to preserve the pixel relationship of TBB values by feeding 2D IR images to the model without flattening.To deal with the stack of 2D images, a CNN was adopted to use as the estimation model.The model, named LocalIRs-CNN, is illustrated in Fig. 5.The LocalIRs-CNN consists of 5 layers including three convolutional layers (Conv), one fully connected layer and an output layer.The first Conv has 32 kernels of size 3×3 while the second Conv layer consists of 64 kernels of size 3×3.The ReLU is applied to the first and second Conv layers as activation function.The third Conv operates 128 kernels of size 3×3 and also applies the ReLU as activation function.The produces of the third Conv are concatenated together to form a feature vector.Then, the feature vector is fed into the fully connected layer that consists of 256 neurons with ReLU activation function.The dropout operation with a dropout rate of 0.5 was applied to the fully connected layer to prevent overfitting in training phase.In the output layer, one output node applies the ReLU as activation function to produce estimated daily precipitation.The setting details of the LocalIRs-CNN model are summarized in Table 1.

Evaluation protocol
We evaluated the investigated models with daily rainfall data of 24 days per year between 2016 and 2019.The dates that

123
IR images of the study area were not available on the DIAS were excluded.To assess the performance of the investigated models in estimating precipitation of a day, an experiment was performed by running 30 triers.In each trier, 70 where N is the number of data used to evaluate the models, y i is the actual rainfall data measured at the station i, and y * i is the rainfall data estimated by a model for station i.For each experiment, the RMSEs and MAEs of all triers were analyzed and reported as median and interquartile range (IQR).

Results and discussion
The medians of RMSEs and MAEs of daily rainfall estimated by the AveragedIR-ANN, IRs-ANN, and LocalIRs-CNN models are shown with average actual rainfall in Fig. 6.The AveragedIR-ANN, IRs-ANN, and LocalIRs-CNN reached the lowest RMAE (IQR) of 0.07 (0.02).Meanwhile, the lowest MAE (IQR) was 0.02 (0.00) for the three models.The AveragedIR-ANN reached the highest RMSE (IQR) of 19.03 (4.26) and the highest MAE (IQR) of 10.82 (0.93).For the IRs-ANN model, the highest RMSE (IQR) and MAE (IQR) were 18.82 (4.80) and 11.21 (0.68), respectively.The LocalIRs-CNN model achieved the highest RMSE (IQR) of 18.71 (5.44) and the highest MAE (IQR) of 11.02 (1.00).Considering the trend of estimation errors, as can be seen from Fig. 6, the value of RMSE and MAE seems to depend on the actual rainfall.The rainfall estimation error was lowest for the days that did not have rain and grew up when the actual rainfall increased.
Since a similar study (Chutsagulprom et al. 2022) reports that the inverse exponential weighting (IEW) method was more desirable for monthly rainfall estimation in Thailand, the IEW with a power parameter of 2 was adopted to compare with our proposed methods.Also, an ANN that used only geological information, named LatLong-ANN, was compared.Note that the IEW is an interpolation method, while the proposed models and LatLong-ANN are in the regression approach.The performance comparison of the investigated methods in three seasons of Thailand is shown in Table 2.As can be seen, the differences of RMSEs among the compared methods are small.The LatLong-ANN model achieved the insignificantly lowest RMSEs for estimating rainfall in the summer and winter seasons.Meanwhile, the RMSE of the IEW method for the monsoon season was the smallest.It was significantly lower than that of AveragedIR-ANN and LatLong-ANN models.Considering MAEs, the LocalIRs-CNN model achieved the smallest MAEs in estimating daily rainfall in the summer and winter seasons.For the summer season, it provided a significantly lower MAE than the others, except for the IRs-ANN model.Also, the MAE produced by the LocalIRs-CNN was significantly lower than that of other models.The lowest MAE for the monsoon season was reached by the averagedIR-ANN model.Interestingly, the LatLong-ANN model overall performed well compared to the IEW although it failed in estimating monthly rainfall as reported in the study of Chutsagulprom et al. (2022).The difference in the period scale of estimating and the number of available gauge stations might affect the performance of rainfall estimation methods.Overall, the methods in the regression approach provide desirable daily rainfall estimation in Thailand.
The performance comparison of the three investigated models to the LatLong-ANN model in different climate areas of Thailand is given in Fig. 7.For northern ) which is mountainous with highland areas, the LocalIRs-CNN model reached the RMSE lower than or comparable to that reached by the LatLong-ANN model in most periods.Although the  ) where most areas are river plains, the RMSE provided by the LocalIRs-CNN tended to be lower than that provided by the other models during the monsoon and winter seasons.In the dry season, the performances of all investigated models were comparable.As well, for northeast Thailand (14.28°N−18.36°N,103.39°E −105.64°E)where the most area is extremely flat and dry, all investigated models provided comparable performance in monsoon and dry seasons.In winter, the LocalIRs-CNN reached a small lower RMSE than the others.For eastern Thailand (11.60°N−13.58°N,100.94°E−102.99°E),it seems that the LocalIRs-CNN overall outperforms from the mid of June to the end of September.In the other periods, the performances of all models were not significantly different.It is worth noting that, for southern Thailand (5.62°N−11.89°N , 97.34°E−102.14°E),the LatLong-ANN model mostly achieved the lowest RMSE.
As can be seen from the experimental results, the estimation performances of investigating models depended on the location and season.It seems that the LocalIRs-CNN performed well when applied to mountainous areas, especially during the monsoon and the early winter seasons.However, it could not compete with the LatLong-ANN model in the dryflat and coastal areas.In fact, for a reason, clouds that were captured in IR satellite images might not condense to rain.Mountains and forests are especially precipitation areas as compared to areas without mountains and forests.Because of the nature of this area, clouds have a high potential to condense to rain.Thus, the TBB values extracted from IR satellite images of mountainous areas can represent the value of precipitation.The wind also affects precipitation in a certain area.Even if a cloud formed in one area, in some cases, the wind carried the cloud to another area before condensing into the rain.The temperature also impacts to condensation process.If clouds cannot be cooled to below their dew point, they thus transform into precipitation.Consequently, the TBB values measured when temperature and wind were not appropriate for condensation in an area cannot represent the value of precipitation.
In the case of Thailand, we suggest the LocalIRs-CNN model for the northern, western, and central areas.For the northeast, eastern, and southern Thailand, only latitude, longitude, and elevation data are sufficient to use for estimating precipitation.Besides the TBB values extracted from satellite images, wind speed and temperature data might be required to improve the performance of rainfall estimates.In addition, the requirement of IR images every 30 min for estimating daily rainfall is a limitation of this study.Practically, the IR images in some periods may be missing.The effect of the missing data on the performance of the proposed method should be further investigated.A gap-filling technique of the missing IR images might be needed.

Conclusions
This study integrated IR satellite images with geological data (i.e., latitude, longitude, and elevation) to capture the spatial variability of precipitation.Three ANNs, namely AveragedIR-ANN, IRs-ANN, and LocalIRs-CNN, were constructed for spatially estimating daily precipitation in Thailand.We evaluated the investigated models on daily rainfall data of 24 days per year between 2016 and 2019.Each experiment was performed by running 30 triers.The experimental results show that the LocalIRs-CNN outperformed by minimizing the median with the highest RMSE.In addition, the rainfall estimation errors of models were the lowest for the days that did not have rain and grew up when the actual rainfall increased.By analyzing results in different climate areas of Thailand, we found that the estimation performances of investigating models depended on the location and season.The LocalIRs-CNN model was suggested for the northern, western and central Thailand.

Fig. 1
Fig. 1 Schematic illustration of a neural

Fig. 2
Fig. 2 Elevation map of the study area

Fig
Fig. 3 Architecture of AveragedIR-ANN model

Table 1
The details of LocalIRs-CNN

Table 2
The lowest RMSEs and MAEs for each season were given in bold † The RMSE or MAE was significant higher than the lowest RMSE or MAE for the season (statistically tested by the Wilcoxon signed-rank test with the significant level at 0.05)