Identifying rainfall patterns using Fourier series: A case of daily rainfall data in Sarawak, Malaysia

The a im for this paper is to fit Fourier series on the daily rainfall data to describe the rainfall patterns and to identify the time frame of the wettest and the driest period for the studied stations. The estimated parameter of the Fourier series in modelling the mean daily rainfall amount received were obtained using the method of Generalized Linear Model and the performance was evaluated using the analysis of deviance. Following the objective, the daily rainfall data ranges from 41 to 58 years over four stations in Sarawak namely Kuching, Miri, Bintulu a nd Sibu are studied. Results showed three harmonics is appropriate in modelling the mean daily rainfall received for Kuching, Sibu and Miri stations. However, only two harmonics was found to be fitted the mean daily rainfall amount received significantly for Bintulu station. The wettest month of the studied stations wa s estimated to occur in late December to early January, whereas the driest month is in March for Miri station, April for Bintulu, July for Kuching a nd June for Sibu station. The information gained from this study can be used to monitor the occurrence of flood and drought events in the area so that future action can be taken to reduce the impacts.

or artificial banks in any part of the river system. At the point when a riverbank is exceeding the high level of water, the water extends over the flood plain and become hazard to the society".
Nowadays flood in Malaysia have become a common incidence due to serious climate change and global warming problems that always happened after heavy rainfall. [4] and supported by [5] in their study indicated that the climate changes, use of land, human activities and urban growth has changed the flood trends. No matter how hard or tough the government tried to minimize or stop it, this disaster still happened repeatedly every year. Flood can be divided into two different categories in Malaysia which is flash flood and monsoon flood. [6] in his study stated that monsoon flood usually occurred in seasonal pattern; southwest monsoon occurs late of May to September and northeast monsoon occurs in November to March, but the duration has changed slowly due to climate changes. Meanwhile, flash flood may happen immediately within less than half an hour because of heavy rainfall and the water has no place to drain properly.
Contrast to flood is drought phenomenon that also occurred at certain place in Malaysia. Drought refers as prolonged shortages in the water supply. A drought may happen after certain months or years or may be as early after 15 days. According to [7], flood and drought bring negative impact to society and also to the country including loss of lives and destruction of properties. Furthermore, [8] also agreed that flood is one of the natural disasters that prevents the country development. Therefore, the analysis of the rainfall pattern is very useful so that the findings may contribute to various sectors, such as hydrological, water resource management, tourism and agriculture. In addition, this analysis also can be used for the prediction of the natural disasters, floods and droughts.

2.
Time Series Analysis and Fourier Series Floods in Malaysia are commonly caused by the natural and human activities. Previous study stated that many factors will cause the flood to happen such as temperature, rainfall distribution, wind movements and the natural terrain [9]. This statement is supported by other study on the urban flooding which revealed that pollution, improper drainage system, urbanization management, weather, environment factor and dam break will cause flood to happen [10]. The same environmental issue repeated yearly in Malaysia is flood and drought phenomenon that much related to rainfall distribution. Looking to this phenomenon, the researcher interested to use time series analysis to model flood and drought phenomenon in Sarawak, which is the largest state in Malaysia.
Time series analysis has become an important tool in many applications or sectors including environmental management fields such as rainfall distribution analysis. Currently, time series analysis of rainfall distribution become very important tool in rainfall prediction. The need for accurate rainfall prediction is very useful in providing useful information for reservoir operation, would provide for river control, flood mitigation and also forestry interests [11]. Many methods have been introduced for rainfall modelling and prediction including AR (auto-regressive), ARMA (auto-regressive moving average), ARIMA (auto-regressive integrated moving average), ANNs (artificial neural networks) and that SARIMA (seasonal autoregressive integrated moving average).
Fourier series become famous tool in rainfall prediction [12,13] whereby the application of Fourier series analysis to seasonal Fourier time series model that can lead to reliable forecast [14]. Rainfall data becomes the key input in a variety of hydrological applications but must be handled properly due to the rainfall process varies in time and space. The generated rainfall models must be able to absorb and represent the variations of time and space which employ different sets of parameters at different time of the year. Therefore, harmonic analysis of Fourier series is suitable technique to capture all the variations while keeping the models parsimonious. As found by [15], the Fourier time series model best fit the results for modelling and forecasting rainfall data than the SARIMA model. In contrast, another study conducted in Nigeria revealed that SARIMA (seasonal autoregressive integrated moving average) model performs better in modelling the rainfall data in Port Harcourt Rivers State from 2000-2014 compared to Fourier series models [11].
According to [16] in his study revealed that Fourier series become very powerful method in connection with ordinary and partial differential equations. In addition, he also suggested that to 3 examine annual variation of precipitation that is the difference of observed and computed precipitation is analyzed as time series after harmonic simulation of rain gauge data. Furthermore, [17] found that the Fourier series analysis indicates that the data selected belongs to a uniform statistical series which are random numbers. A study conducted by [12] mentioned that periodic functions occur frequently in terms of simple periodic functions such as cosine and sins. For this reason, the occurrences of a series of wet and dry years usually tend to return to the mean pattern even the series is random and abnormal.

3.
Data Description In total 189 river basins (89 of the river basins are in peninsular Malaysia, 78 in Sabah and 22 in Sarawak) are located in Malaysia. Sarawak with an area of 124,450km 2 stretches over some 700 km along the northwestern coast of the Borneo island is a tropical rainforest with annual rainfall ranging between 3300 mm near the coastland to 4600 mm in futher inland [18]. Sarawak experiences a similar climate as other states in Malaysia. However, the time frame for the minimum and maximum amount of rainfall received is almost similar to Sabah. Kuching station located in Sarawak recorded the highest annual rainfall of 5,423.0 mm with an increase of 877.5 mm in 2016 as compared to 2015 (4,545.5 mm). In addition, there are three other stations located in Sarawak namely Miri station, Sibu station and Bintulu station as shown in the following figure 1.

Figure 1. Location of Study Area
Following the objectives of the study, daily rainfall data were collected from the Malaysian Meteorological Department and analyzed. Four stations involved for the analysis and the length of the data is shown in table 1.

Methodology
The rainfall characteristics of mean rainfall amount received per rainy day is used in the study and it will be fitted using Fourier series to identify the daily rainfall pattern in Sarawak. A mathematical function, ‫)ݐ(݃‬ of Fourier series is where ݆ is the harmonic, ݉ is the maximum harmonic required for the series, ‫ܣ‬ and ‫ܤ‬ are the parameter coefficients and ‫ݐ‬ ᇱ = ‫ݐ(ߨ‬ − 183)/183.
The maximum likelihood estimates of the coefficients the Fourier series, ߚ is expressed as: The analysis of deviance will be used to assess the maximum number of harmonics required [19] in the model. According to [20], the analysis of deviance is useful in describing the performance of the Fourier series. This method will be used to determine the significant harmonics and also the number of parameters required for the model. The analysis of deviance uses statistical ‫-ܨ‬test and the procedures of the statistical test include several steps. Firstly, the deviance is calculated at each time the model is fitted. Then, the models with different number of harmonics will be compared by reduction of the deviance. The deviance, ‫ܦ‬ ଶ is expressed as: where ‫)ݐ(ߤ‬ is the fitted value of ‫)ݐ(ߤ‬ and

Results and Discussion
The mean amount of rainfall received per rainy day from four stations in Sarawak, Malaysia were analyzed with different number of harmonics to illustrate the fitting of the Fourier series. The deviance is calculated for each different number of harmonics that is fitted to the model. Then, the analysis of deviance is conducted and showed in table 2. The observed values and fitted curves for each station were also plotted and showed in figure 2 to justify the fitness of the selected model.
The models with different number of harmonics are then compared by considering reduction in deviance. The maximum numbers of harmonics required for the model can be determined when no further harmonics reduced the deviance significantly.
The analysis of deviance in table 2 showed that when one harmonic is fitted to the mean amount of rainfall received in Kuching, the deviance is significant since p-value is less than 0.05. When applying two harmonics and three harmonics into the model, the deviances are still reduced significantly. However, when four harmonics is fitted, the reduction of deviance is insignificant (p-value is greater than 0.05) suggests the three harmonics are adequate to represent the amount of rainfall received in Kuching. The model for Kuching station is expressed as follows: ݃(t) = 2.898 − 0.102sin(t) + 0.114‫2(݊݅ݏ‬t) − 0.124sin(3t) − 0.26cos(t) + ‫)‪(2t‬ݏܿ270.0‬ −0.024cos (3t) g(t) = 2.832 + 0.111sin(t) − 0.018sin(2t) − 0.055sin(3t)− 0.042cos(t) + 0.077cos(2t) −0.027cos (3t) However, when one harmonic was fitted to the mean amount of rainfall received for Bintulu station, the deviance values were very large indicating that the model was inadequate. By applying two harmonics into the model, it shows significant reduction in deviance (p-value is less than 0.05). Therefore, two harmonics is adequate to represent the amount of rainfall received in Bintulu and the model is expressed as follows: The observed and fitted mean rainfall received per rainy day for Bintulu station is shown in figure 2(c) and the curve seems to fit the observed data adequately. The analysis is then continued with determination of the wettest and the driest period at the four stations. As shown in figure 3, the extremely high mean amount of rainfall received per rainy day is recorded at Kuching, followed by Bintulu with fitted values of 31 and 23 mm. The other stations record a fairly same extremely high mean value which is 20 mm per day. Meanwhile, the extremely low mean amount of rainfall received per rainy day is observed at Miri with 13 mm per day, followed by Kuching and Sibu with 14 mm per day.
Through the observation, extreme values may vary for one station to other stations. Therefore, in order to identify the peaks for each of the studied stations, the lower and upper quartile of thresholds are calculated. These threshold values are showed as dash line in figure 3 used to project the time frame of the wettest and driest period over the stations. This study uses the 2 nd percentile to identify the driest period, whereas the 98 th percentile to identify the wettest period. Figure 3(a) and figure 3(b) shows a single peak can be observed for Kuching and Sibu stations. The northeast monsoon leads to the highest mean rainfall amount received for both stations during the period of middle to the late January. The highest peak observed was on 27 th January and 18 th January with 31.07 mm and 20.16 mm per day respectively. In contrast, the lowest mean rainfall amount recorded in the late July for the Kuching station, whereas the late June to the early July for the Sibu station. These periods considered as the driest period for both stations, and it was strongly affected by the southwest monsoonal flow.
A similar rainfall patterns also can be observed for the other two stations in Sarawak. As shown in the figure 3(c), the period of the late December can be considered as the wettest period for the Bintulu station with the highest mean rainfall amount was observed of 22.74 mm on 28 th December. Meanwhile, the driest period was occurred in between the middle and the late April, with the lowest mean rainfall amount was observed on 19 th April with values of 16.98 mm per rainy day. The rainfall pattern at this station had been influenced by the northeast monsoon and the first inter-monsoon seasons. However, figure 3(d) shows that the period of the late December to the early January can be considered as the wettest period for the Miri station with the maximum peak of 19.66 mm per rainy day, which was observed on the 2 nd January. Whereas, the driest period, in term of the lowest mean rainfall amount was recorded on the middle March. The rainfall pattern at this station also had been influenced by the northeast monsoon and the first inter-monsoon seasons.  According to the results, the two and three harmonics are best described by unimodal pattern. These results are consistent with the earlier studies that had been done by [4]. The study found that two harmonics are significant to model the rainfall amount received in Sandakan, Kota Kinabalu and Labuan stations and the two harmonics are also best described with unimodal pattern. Another study conducted by [21] in Johor found that the Hospital Kota Tinggi station shows that three harmonics is sufficient to model the rainfall amount at the station. The result shows the three harmonics also depict a unimodal pattern.

Conclusion
The study is aimed to fit Fourier series in the daily rainfall data in Sarawak to describe the rainfall patterns over the studied stations. Results from the analysis showed that three harmonics is significant to model Kuching, Sibu and Miri stations, whereas only two harmonics is appropriate for Bintulu station. According to the findings, the two or three harmonics are best described with unimodal pattern. In terms of wettest and driest periods, January and December can be considered as the wettest period for the studied stations, while driest months were June for the Sibu station, July for the Kuching station, April for the Bintulu station and March for the Miri station.
The information gained from this study benefits the Malaysian Meteorology Department so that the occurrence of flood and drought events can be monitored in the area. Continuous monitoring of the events is essential so that appropriate actions can be taken to reduce the impacts. Apart from using the rainfall characteristic of the mean rainfall per rainy day, it is proposed that future study to use other 8 characteristic such as the probability of wet and dry event to identify the rainfall pattern over the studied stations.