Comparison of Statistical, Graphical, and Wavelet Transform Analyses for Rainfall Trends and Patterns in Badulu Oya Catchment, Sri Lanka

Climate change has adversely influenced many activities. It has increased the intensified precipitation events in some places and decreased the precipitation in some other places. In addition, some research studies revealed that the climate change has moved seasons in the temporal scale. (erefore, the changes can be seen in both spatial and temporal scales. (us, analyzing climate change in the localized environments is highly essential. Rainfall trend analysis in a localized catchment can improvemany aspects of water resource management not only to the catchment itself but also to some of the related other catchments. (is research is carried to identify the rainfall trends in Badulu Oya catchment, Sri Lanka. (e catchment is important as it is in the intermediate climate zone and rich in agricultural productions. Four rain gauges (namely, Badulla, Kandekatiya, Lower Spring Valley, and Ledgerwatte Estate) were used to analyze the rainfalls in the resolutions of monthly, seasonally, and annually. 30-year monthly cumulative rainfall data for the above four gauging stations are analyzed using various standard tests. Nonparametric tests including Mann–Kendall test and sequential Mann–Kendall test and innovative trend analysis methods are used to identify the potential rainfall trends in Badulu Oya catchment. In addition, continuous wavelet transforms and discrete wavelet transforms tests are carried out to check the patterns on rainfall to the catchment.(e trend analysis methods are compared against each other to identify the better technique. (e results reveal that the nonparametric Mann–Kendall test is powerful to produce the statistically significant rainfall trends in qualitative and quantitative manner. Mann–Kendall analysis shows a positive trend to Ledgerwatte Estate in monthly (3.7mm in February and 7.4mm in October), seasonal (6.9mm in the 2 intermonsoon), and annual (3mm annually) scales. However, the analysis records one decreasing rainfall trend to Kandekatiya (8.1mm in December) only in monthly scale. Nevertheless, it was found that the graphical method can be easily used in qualitative analysis, while discrete wavelet transformations are efficient in identifying the rainfall patterns effectively.


Introduction
Catchments in intermediate climatic zones are interesting to analyze for the water resources management [1]. ese zones are neither the wet zones, where they have plenty of water resources, nor the arid zones, where there are enough water scarcities. Water sustainability can be achieved in these intermediate zones, only if the water resources are properly managed.
e availability of water resources in these intermediate zones is highly influenced by the seasonal rainfall. However, there are many arguments on the changes and variations in seasonal rainfall in most of the countries due to ongoing climate changes. When some countries have more than the usual annual rainfalls and rainfall intensities (sometimes snowfalls) [2][3][4][5][6], some other countries face more arid times leading to water scarcities [7][8][9]. erefore, it is highly important to understand the spatial variation in various climatic characteristics due to ongoing climate change in the local resolutions rather the global resolution. e best would be the catchment scale spatial resolution; thus, the local climate change scenarios can be easily acknowledged. As a result, the required adaptation processes (whether they are structural or nonstructural) in the catchment scales can be implemented.
Researchers used several methods to understand climate change and its impact on the precipitation (rainfall). Precipitation has taken more attention due to its driving capacity of the hydrological cycle, which is the life of the Earth [10,11]. Among many empirical climate models, past recorded climate data analyses have taken much attention from most of the researchers. is can be due to the usual unpredictability of the climate scenarios; however, there may be some periodic characteristics behind the measured data. erefore, statistical tests are frequently used in measured climate data analyses. Parametric and nonparametric statistical tests are used to detect climatic trends. Even though the parametric tests (t-test and linear regression) are powerful in statistical analyses, they need the tested data to be independent and normally distributed [12]. However, most of the climatic data are not normally distributed. erefore, nonparametric tests like Mann-Kendall test [13][14][15][16] and sequential Mann-Kendall test [17][18][19][20][21] are common in climatic trend detection. Not only the statistical analysis but also some innovative methods like innovative trend analysis techniques [22] [23][24][25][26] are often used to identify the trends in climatic time series.
In addition to the trend analysis, wavelet analysis [27][28][29][30][31] can be observed in the climatic time series analysis for pattern detection. Various methods have their own advantages and disadvantages; however, a collection of these tests would receive a better outcome to the stakeholders. erefore, comparison analyses using a collection of these parametric, nonparametric, innovative trend analysis, and wavelet analysis are common [24,[32][33][34]. However, the application of these climatic analyses is now moved to a localized area rather to the globe. As it was stated, identifying localized climatic trends are important in many planning activities [35][36][37][38]. Even though these rainfall trends may not perfectly be identified, acceptable identification is highly desirable for future planning activities, like irrigation scheduling, water supply systems design, and upgrading. erefore, it is understood to be essential to a catchment, which is based on agriculture, not only to supply the food for the localized environment but to the whole Sri Lanka. Badulu Oya catchment in Sri Lanka is a catchment in the intermediate climate zone; however, it receives a significant amount of annual rainfall to cater the paddy and vegetable cultivation. e catchment produces more than 25% of the country's vegetable need. Several related research can be found in the context of Sri Lanka [24,[39][40][41][42][43]. However, no research is found in the literature for identifying the rainfall trends in the catchment to guide the planners. erefore, the presented work herein reveals the rainfall trends to Badulu Oya catchment. Several methods, including the Mann-Kendall test, sequential Mann-Kendall test, innovative trend analysis, and wavelets, are used to analyze the rainfall trends, and the results are compared to each other in seeking the better method. e advantages and drawbacks of each method are discussed in relevant sections, and the importance of such study is well established and stated in Discussion.

Study Area: Badulu Oya Catchment
Badulu Oya starts from Namunukula mountain range and flows from the eastern slopes of the central highlands to reach Mahaweli River, which is the longest river in Sri Lanka. It is one of the most important tributaries of the Mahaweli River. e terrain, in which Badulu Oya flows, is in the intermediate climatic zone of the country [44], and therefore, a significant amount of annual rainfall is seen in the catchment (1500-2000 mm).
e catchment receives its major rainfall in the months of October to March (during the northeast monsoon and 1 st intermonsoon), whereas it has a drier period during April-September months. However, convection rainfalls are common during the drier months. erefore, the catchment has a rich water capacity. e catchment area of Badulu Oya is around 318 km 2 (refer Figure 1), and it is placed adjacent to the Uma Oya catchment from its left and Gal Oya catchment from its right. Intensive agricultural activities are taken place in Badulu Oya catchment [46]; therefore, various land-uses over the time can be observed. Some of the forest areas have been changed to urban, suburban, and agricultural areas over the last decades [46]. Most of the forest areas were converted into tea plantations during the British ruling era [47], while other land-use activities have been happened during the 20 th century. erefore, the surface water and groundwater availability have been severely impacted. Hence, it is timely important to observe the rainfall trends in the catchment using the recorded data.

Nonparametric Tests in Climatic Trends
Nonparametric tests are widely used to identify climate trends [48][49][50][51]. Nonparametric tests are widely used not only to identify the climatic trends but also to detect the trends in other temporal variations like stream flow trends [52,53] and water quality trends in streams and rivers [54]. Several nonparametric tests can be found in the literature including Mann-Kendall test, Spearman's rho test [55,56], and Hotelling-Pabst test [57,58]. However, Mann-Kendall test and its modifications are widely used in the literature for trend analysis [41,59,60].

Mann-Kendall Test and Sen's Slope Estimator.
Mann-Kendall test is used to identify monotonically increasing and decreasing trends in a climate data series. e test was initially proposed by Mann [61] and improved by Kendall [62]. e test was further improved to consider the seasonal effects by Hirsch et al. [63]. e test calculates Kendall's tau between two data samples based on the ranks. ese samples were assumed to be independent. e alternative hypotheses from the test have three outcomes, where x i and x j are chronological time series observations, n is the length of the time series, t p is the number of ties for the p th value, and q is the number of tied values in the above stated equations. An upward trend in the climatological series is given by a positive Z MK value, whereas a downward trend is given by a negative Z MK value. More details of the Mann-Kendall test can be found in Ahamed et al. [55] and Rathnayake [24]. Sen's slope estimator is usually used to quantify the meteorological trends identified from Mann-Kendall test [13][14][15][16]. Sen's slope estimator calculated the gradient of the trend line; therefore, it presents the linear magnitude of the trend. Sen's slope calculates the slopes (m i ) of all data pairs considered using the following equation: where N is the number of data points in the climate time series and x j and x k are data values at time j and k (where j > k), respectively. e mean value of all slopes is Sen's slope and calculated as given in the following equation: Complexity e trend can be detected as an upward or downward trend based on the + or-behavior of the β.

Sequential Mann-Kendall Test (SQMK Test).
Not only the monotonic trend and its magnitude but also the starting time of the trend is important. In addition, identification of the changes in trends over the time is highly important [64]. erefore, the sequential Mann-Kendall test is widely used in such cases [17][18][19][20][21]. Sneyers [65] has introduced sequential and partial values from the usual Mann-Kendall test. e test sets up two climatic time series: one for the progressive series (u(t)) and the other one is for the backward series (u ′ (t)). e u(t) is a standardized variable, which has a zero mean and unit standard deviation. e test also considers the relative values of all terms in the time series. e following steps and equations (7)-(10)) give the mathematical forms of the SQMK test. e values of annual mean time series (x j ) are compared against the time series (x k ), and they are denoted by n j , when x j > x k . e test statistics (t j ) is calculated using the following equation: Mean (E(t j )) and the variance (V(t j )) of the t j are then calculated by the following equations: Finally, the u(t) values are calculated using the following equation: e same procedure is repeated for the u ′ (t) time series using backward data. e intersection of the u(t) and u ′ (t) illustrates the stating of the climatic trend. More details of the SQMK test can be found in Zarenistanak et al. [66].

Graphical Trend Analysis (Innovative Trend Analysis)
Sen [67] has introduced an innovative but very simple method to detect the trends in time series. e technique was applied to many climates related research studies in identifying trends [22][23][24][25][26]. However, the technique only proposes a qualitative analysis without any quantitative or numerical significance of the identified trend. e test simply checks the comparative analysis of two halves of the time series prepared at ascending order. e main climatic data set is first divided into two halves and arranged them in the ascending order. ese two sets are compared against each other, and there is no trend if the second half aligns in ± 5% of 45°degree line drawn to data series. However, if the second half aligns above the 5% of the 45 0 degree line, a positive trend is proposed. In contrast, if the second half aligns below the −5% of the 45°degree line, a negative trend is proposed. More information on this method can be found in Sen [67].

Wavelet Transformation
Wavelet transformation is a relatively new tool, which is widely used to detect the climatic trends [64,68]. Not only in rainfall trends but also wavelet analysis is popular in many other trend detections, including freak waves in the ocean [69], water levels in rivers and reservoirs [79], and droughts [70]. A time series can be easily decomposed into several smaller time series based on time and frequency. Climatic trends, periodicity, various discontinuities, and changing points in climate series can be detected from wavelet transformation analysis [27][28][29][30][31]. Fourier analysis is used to break a signal into smaller but smooth sinusoids. A wavelet is a mathematical expression to localize the function in the spatial and temporal scales. Continuous and discrete wavelet transforms are two types of wavelet analysis used in the literature to identify the climatic trends.

Continuous Wavelet Transforms (CWTs).
Continuous wavelet transforms use discrete wavelets in the continuous time scale (x(t)). Mathematically, the wavelet function (Ψ(η)) in CWT can be represented as given in equations (11)- (12). More information on these can be found in Chen et al. [71], Nalley et al. [72], and Partal and Küçük [30] study: where η, c, and s * are the nondimensional parameter and the translation factor (time shift) of the wavelet over the time series and the wavelet scale, respectively. e wavelet coefficients (W Ψ (s * , c)) can be found from equation (12). Ψ * is the complex conjugate function. A scalogram can be produced if the translation factor and the wavelet scale changed smoothly with the time. erefore, calculations can be done to identify the amplitude of a particular scale and its fluctuations with time:

Discrete Wavelet Transforms (DWTs).
CWT can be effectively used to identify specific event, which is not obvious; however, construction of CWT is more complex [72]. In addition, CWT produces many coefficients and makes the problem more complicated. erefore, discrete wavelet transforms (DWTs) are popular in trend identification. DWT simplifies the problem; nevertheless, they produce accurate and reliable answers [30]. DWT uses a dyadic calculation procedure; thus, it simplifies the problem [73]. Discrete wavelet transforms can be mathematically 4 Complexity represented in the following equations (refer equations (13) and (14)): where Ψ, c 0 , and s 0 are mother wavelet, translation of the wavelet, and dilation step (>1), respectively. a and b are integers which are used to represent the dilation and translation of the wavelet. e wavelet coefficients are calculated using the following equation: More information on DWT can be found in Nalley et al. [72].

Climatic Analysis in Badulu Oya Catchment
As it was stated in Section 2, four rain gauging stations (Badulla, Lower Spring Valley, Ledgerwatte Estate, and Kandekatiya) were selected to the analysis. ese stations were selected due to the data scarcity of the catchment. Monthly rainfall data for 30 years (Jan/1990 to Dec/2019) for the above stations were purchased from the Department of Meteorology, Sri Lanka. ere are no other rainfall gauging stations in the catchment according to the Department of Meteorology, Sri Lanka.
ere were several other older stations in the catchment; however, they are not functioned according to the Department of Meteorology, Sri Lanka (Department of Meteorology, Sri Lanka holds the sole responsibility of meteorological data collection in the whole Sri Lanka). ere were few missing data, and their percentages were minimum (Kandekatiya, 1.67%; Ledgerwatte Estate, 1.67%; Lower Spring Valley, 1.1%; and Badulla, 0.28%). erefore, the missing data were filled using the normal ratio method. e rainfall data series were tested for the homogeneity using Pettit's test, SNHT test, and Buishand's test and found they were homogeneous. erefore, the quality of the data series was rich. e monthly rainfall data were sorted to four rainfall seasons (northeast monsoon, December to February; 1st intermonsoon, March to April; southwest monsoon, May to September; 2nd intermonsoon, October to November) and annual cumulative rainfalls. e rainfall data were then processed for the Mann-Kendall test in monthly, seasonal, and annual resolutions. After that, the sequential Mann-Kendall test was carried out to identify the locations of the trends in seasonal and annual resolutions. e innovative method was also processed to develop the graphical trends for monthly, seasonal, and annual resolutions for all four rain gauges.
Finally, wavelet analysis from CWT and DWT was carried out to the monthly, seasonal, and annual resolutions. Morlet wavelet and Daubechies wavelet (db) were used to carry out the CWT and DWT analyses, respectively. Morlet wavelet is sine-shaped Gaussian, and more details on this are discussed in the relevant Results section. On the contrary, Daubechies wavelet is commonly used in hydrometeorological studies as it has a smooth mother wavelet [74][75][76][77][78].
ese tests were carried out in the Matlab mathematical package. e moderately large number of data points was used in this study from the monthly and annual precipitation datasets. e precipitation data were analyzed for the period 1990-2019. erefore, there were 360 (12 × 30) data points for the monthly sets. First, the decomposition levels were determined to avoid unnecessary levels of data decomposition of these larger datasets. Finally, comparative analyses were conducted to identify a better technique in identifying the rainfall trends of the Badulu Oya catchment. Table 1 presents the trend analysis results from the MK test. No significant trends were identified for the Badulla rain gauge for the 30-year rainfall analysis in the monthly (January to December separately), seasonal (4 seasons), and annual resolutions. However, a decreasing trend was identified in Kandekatiya rain gauge for the month of December. Nevertheless, month December is treated to be one of the most rainfalls receiving months to Badulu Oya catchment. However, this trend identification was not justified in seasonal and annual trend analysis. Similar observation: however, an increasing trend in the month of May can be found for the rain gauge in Lower Spring Valley.   Figures 2(d) and 2(e)).   Table 2 shows trend analysis results from innovative trend analysis. Several positive trends were identified from the graphical (innovative) analysis. Monthly analysis shows positive trends in the months of March and October for Badulla. A positive trend in October was supported by the corresponding seasonal analysis where a positive trend was identified in the 2 nd intermonsoon. However, the positive trend in March was not supported by the seasonal analysis. Positive trends were found in May, October, and December for Ledgerwatte Estate, and they were supported by the seasonal and annual trends. Similar observation can be seen in Kandekatiya. However, the positive trend identified in Lower Spring Valley for May was not supported by any lower resolution rainfall patterns. Graphical results of Badulla (Figures 3(a) and 3(b)) and Ledgerwatte Estate (Figures 3(c) and 3(d)) can be seen in Figure 3. Identification of positive trends can be clearly seen from the data scatter and the trend line drawn for data scatter.

CWT Analysis
Results. Wavelet maps are generated from the CWT analysis. e wavelet map is a graphical illustration of the continuous wavelet coefficients C, which signifies how closely related the wavelet with each section of the signal is. e continuous wavelet coefficients of the signals have been calculated at real, positive scales (8 voices), using the Morlet wavelet.
Morlet wavelet is often used in the rainfall analysis due to its sine-shaped Gaussian, and it has several advantages in climatic time series analysis. Gaussian shaped in the frequency domain is one advantage. It minimizes the sharp edges; therefore, the ripple effects can be ignored (these ripples can be misinterpreted as the oscillations). In addition, the results of the Morlet wavelet convolution retain the temporal resolution of the original signal. Moreover, it is computationally efficient and requires less computational cost. erefore, many wavelet analyses tend to use Morlet wavelets. e analyses for seasonal and annual resolutions do not show any pattern, and the data points were not enough to generate a pattern. However, if the monthly rainfall for 30 years was considered as a continuous series, interesting patterns can be observed, and they are shown in Figure 4 (4(a)-4(d)). Figure 4(a) illustrates the continuous wavelet results from monthly rainfall for Badulla from January 1990 to December 2019 (360 data points). Several important observations are identified, and they are presented by part I to part VI. Times corresponding to part I to part VI are 05/1990-03/1995, 09/1998-06/2006, 01/2011-08/2015, 01/2018-08/2019, 07/1993-06/2003, and 11/2009-12/ 2017, respectively. e periodicity was changed from 7 to 11 months in the first identified time zone (05/1990-03/ 1995). en, a 5-month cycle was found for the 2nd time zone, 4-month cycle for the 3rd, 7-11 month for the 4th, 14-month for the 5th, and 18-month for the 6th time zone. Similarly, patterns were identified in other rain gauges, and they are shown by the corresponding boxes. Interestingly, 6 different patterns were identified from the 4 rain gauges. Closer observation of the CWT analyses gives the corresponding time slots in the patterns are somewhat similar. erefore, this can be an indication of the similar temporal variation in the rainfalls to the Badulu Oya catchment. Nevertheless, more analysis should be required for a solid conclusion. However, cyclic patterns of the rainfall can be easily identified from the CWT analysis. Figure 5 shows the decomposed level for annual and monthly rainfall time series using DWT. e monthly rainfall series was decomposed into six lower resolution levels using the DWT approach. It can be seen herein that the decomposed levels have lower frequencies.

DWT Analysis Results.
is shows the changes in periodicity. e 2, 4, 6, 16, 32, and 64 monthly periodicities are given by d1-d6, as shown in   Table 3 presents the summary of various rainfall trend analysis results. Interesting findings are presented here. Several months were identified with positive trends by all tested methods, and these monthly trends were supported by the seasonal and annual trend analysis. However, other than one month from one test (Kandekatiya downward trend in December by the MK test), all other identified trends were positive trends. Similar analysis can be found in the literature, as it was already stated in a handful research studies in the context of Sri Lanka. erefore, this analysis would be interested by the water resources planners in the country.
As it was stated, the Mann-Kendall test is a nonparametric test where the concept of it is simple. It assumes a joint distribution of the data, and therefore, the results are minimally affected due to the normality of the series. However, one of the most important drawbacks of the test is the null hypothesis. e test assumes the data are independent and identically distributed. erefore, nonacceptance of null hypothesis in theoretical view and application view are different. It is assumed to have a trend in application, whereas the theoretical view says the data are not independent and not identically distributed. erefore, the results of the test may be confusing.
However, on the contrary, the sequential MK test can be effectively used to detect the changing points or events in the long-term time series. erefore, this is important in the Complexity analysis to have the potential trend from the MK test and the changing event from the SQMK test. erefore, coupling both tests (MK and SQMK) would give a better picture to the stakeholders. In addition, ITA is much simpler than any other method in trend detention. It is, however, a qualitative analysis, rather a quantitative analysis.
erefore, researchers can use ITA as an initial step to detect the potential trends and then move to solid statistical tests for quantitative trends. Even though CWT and DWT have advantages, they are more complex analyses compared to simple statistical analyses. erefore, the stakeholders would not be much interested, unless they are given a clear idea and the physical meaning of these CWT and DWT analyses. However, they are highly sophisticated methods in climate time series analysis in the research point of view. erefore, the comparison of various methods in rainfall time series analysis for Badulu Oya catchment requires much attention, depending on the stakeholders'  interest. Majority of the farmers would have their famous question: "would there be enough water to harvest for the next term?". is would be a million-dollar question to answer. However, the farmers can be advised not only for the potential climatic trends but also cyclic patterns (using CWT and DWT) of the rainfall to the Badulu Oya catchment using this analysis.

Conclusions
e results revealed positive rainfall trends in Badulu Oya catchment. Farming community in the Badulla district would be interested on the finding. erefore, it can be predicted that there would not be water scarcities in the catchment in coming recent future. As usual, the MK test  Decomposition at level 6 : s = a6 + d6 + d5 + d4 + d3 + d2 + d1 (d) combined with Sen's slope is proved to be highly efficient in finding the quantitative and qualitative analyses of rainfall trends. However, graphical trends (ITA) provided a quick qualitative view of the trends at a lower computational cost. erefore, ITA can be considered for similar analysis as the first step in searching rainfall trends. In addition, as it is expected DWT outperformed the CWT. e complexity and computational cost are going to be two important factors for the successful application of the DWT. erefore, the rainfall patterns can be easily identified by DWT. erefore, as a summary, rainfall trends for Badulu Oya catchment were successfully presented from this paper while comparing the available trend analysis methods. e authors would like to recommend a set of tests rather a single test in identifying rainfall trends to local catchment to enhance the analysis. us, the outcome would be much beneficial to the relevant stakeholders. In addition, it is highly advised to do continuous analysis for the localized catchments while identifying the importance of the climate with the local interest.

Data Availability
e climatic data and the analysis data are available from the corresponding author upon request.

Disclosure
e research was carried out in the Sabaragamuwa University, Belihuloya, Sri Lanka, and Sri Lanka Institute of Information Technology, Malabe, Sri Lanka environments. No specific funds were received to carry out this research.

Conflicts of Interest
e authors declare that they have no conflicts of interest.