{'fraction_non_alphanumeric': 0.025769605794678924, 'fraction_numerical': 0.01560105864326508, 'mean_word_length': 4.7165605095541405, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Using wavelet analysis to study floods in Bangkok

Floods in Bangkok are regular natural disasters that happen nearly every year during the monsoon season. Many streets of the city may turn into canals and seriously worsened rush-hour traffic causing many commuters to arrive late at work or school. Therefore, in this research, we will study floods in Bangkok area both seasonal flooding and occasional flooding due to the effect from La Nina cycles using the wavelet spectrum analysis and the cross wavelet method. The result from cross wavelet transform (XWT) shows that the standard precipitation index (SPI) (wet) and the oceanic index (ONI) (La Nina) have significant common power mainly in the 20-40 month band from 1967-1974 during the strong La Nina cycle. There is, however, a large area with common power outside the significance level around 32-80 month band from 1982-2002 but depicts a highly significant local correlation. The corresponding wavelet coherence spectra showed that SPI and ONI co-varied mostly in the 32-60 month band from 1966-1981 with the arrow pointing to the right and in the 64-80 month band from 1986-1994 with the arrows also pointing to the right. Although flooding is a common and annual occurrence in Bangkok, the La Nina climatic phenomenon can cause a higher than average rainfall. The intense extremely wet period during strong La Nina years was observed in 1955-1956, 1998-1999 and 2007-2008. In a La Nina years, Bangkok will receive more rain than normal years. In general, this work may contribute to the improvement of the understanding of how climate variability may impact flooding in Bangkok. Knowing of the La Nina years in advance will help the government in better planning and preparation to prevent flooding areas more than normal.


Introduction
The wavelet transformation converts a signal into another form that either makes certain features of the original signal more amenable to study or enables the original dataset to be more succinctly described. The wavelet transform introduces a useful representation of a function in the timefrequency domain. Mathematically, a wavelet is a function which a zero average that can be defined as follows: where ω is dimensionless frequency and t is dimensionless time [1]. Mathematically wavelet transform can be expressed as follows: where C is the wavelet coefficient, a and b are scale and position respectively, s(t) is the signal we study and  is the wavelet function. The wavelet coefficients are the result of the wavelet transform of signal s(t). The wavelet coefficients yield information as to the correlation between the wavelet (at a certain scale) and the data array (at a particular location). The larger positive amplitude implies a higher positive correlation, while the large negative amplitude implies a high negative correlation [2].
The wavelet transform method can be extended to the analysis of the interactions between two time-series. The cross wavelet transform (XWT) method allows us to measure the degree of synchronization phenomenon between different components and conjointly the evolution over time of the times-series data set. For example, it allows the extraction of information about how a behavioral state changes, how long it takes to progress from one state to another and how many states occur in a given time period. In addition, similarity/differences between two time-series can be identified. The XWT spectrum is defined by: where * denotes the complex conjugate of Cy(a,b). Moreover, the XWT also allows us to access the continuous relative phase of two time-series for each of the main frequencies. The wavelet coherence of two time series x and y is: where Cx(a,b) and Cy(a,b) denotes the wavelet transform of x and y at scales a and positions b. The superscript * is the complex conjugate and S is a smoothing operator in time and scale [3,4].

Methodology
The brief experimental procedures are: first, we calculate monthly standard precipitation index (SPI) for Bangkok province using the precipitation data. Then, we use wavelet analysis to identify SPI (wet) time-series with significant multi-temporal scales/cycles. Finally, we use cross wavelet transform to investigate the effect of large scale climate indices of La Nina events.

Data and study area
The monthly rainfall recorded by the local meteorological stations at Donmaung airport located inside Bangkok was the basis upon which the standard precipitation index (SPI) and wet categories were calculated. Bangkok is the capital of Thailand with a population of over eleven million inhabitants. It is located on the delta of the Chao Phraya River, about 25 miles from the Gulf of Thailand.The years covered by the records range from January 1950 to December 2010.

Standard precipitation index
Since the rainfall data is monthly so we will calculate SPI on the monthly scale. First rainfall values were fitted to a gamma distribution. Next the cumulative distribution function (F) for each record x was calculated according to the following equation.
where F(x) is the probability density function and (α) is the incomplete gamma function. Following several steps in calculations developed by McKee [5], we will get the values of the SPI for Bangkok area.

Wavelet analysis
The useful way to determine the distribution of energy within the data array is to plot the wavelet power, equivalent to the amplitude-squared. The square of the amplitude has an interpretation as timefrequency (or time-period) wavelet energy density, and is called the wavelet power spectrum (WPS).
The wavelet power spectrum shows variance of the time series across different timescales. By looking for regions within the WPS of large power, the features of the signal which are important and which shall be ignored can be determined [6].

The effect of La Nina on the flood in Bangkok
The effect of large scale climate indices from La Nina events on the floods in Bangkok was investigated by using the cross wavelet and the wavelet coherence method.

Results and discussion
We first analyze the rainfall data in Bangkok area from 1950-2010. The average monthly rainfall is 114.4 mm. and the average yearly rainfall is 1372 mm. The dry period begins from January, February, March to April that not much rain during these months. It is more rain in May and July since some tropical cyclones often develop at the Northwestern Pacific start bringing the rain to Bangkok. The wet period starts from August until October since some tropical cyclones from south china sea bring a very heavy rain to Thailand causing seasonal flooding over Bangkok area every year.

The wavelet power spectrum of SPI index
The wavelet power spectrum (WPS) from equation (3) Figure 2. The wavelet power spectrum of ONI index. The ONI uses a 3-month running mean, and to be classified as a full-fledged El Niño or La Niña, the anomalies must exceed +0.5C or -0.5C for at least five consecutive months.

The effect of La Nina on flood in Bangkok
After drawing the SPI graph (wet only) and the ONI graph (La Nina only) on the same figure as shown in figure 3, the effect of La Nina on flood in Bangkok is clearly observed.