Presentation of a Wavelet‐Based Harmonic Model for Tidal Level Forecasting at Sabah and Sarawak

The world’s tides are a result of the combined forces of celestial forces and cen‐ trifugal force exerted by the Earth‐Moon and the Sun acting on the water body, earth tides and the atmospheric tides. Harmonic analysis is the most popular and widely accepted method used for the processing and expression of tidal behavior as well as its characteristics. Despite its strengths, harmonic analysis has a few drawbacks when short data are involved for long term‐prediction. However, to enhance the accuracy of the popular methodology of harmonic analysis (HA), this study presents a wavelet‐based harmonic model for tidal analysis and prediction. Six months of water level heights at four tide gauge stations in Sabah and Sarawak of Malaysia were employed. The results ob‐ tained agrees with the original data when a comparison was made. The root mean square error (RMSE) and Pearson correlation coefficient (r) are the statis‐ tical index tools applied to test the functioning of the model. The residual error is the deviation between the original data and the predicted data which was also computed in this study. The new wavelet‐based harmonic model improves the accuracy of prediction. Moreover, the model is efficient and feasible for tidal analysis and prediction.


Introduction
The safe and effective usage of waters in coastal areas depends solidly on accurate observation and prediction [1]. Various agencies including the military, commercial shipping lines, coastal navigation, marine safety organizations such as search and rescue operations on the coast, coastal engineering operations, fisheries and many others need accurate future tidal information and forecasts for their decision making and the smooth running of administrative activities in coastal areas [2,3]. Tides are formed as a result of the response of the water body to the combined effects of the gravitational force of the sun and moon acting on the earth body, the resultant of earth translation which forms the centrifugal force around the center of gravity of the earth-moon and earth-sun system and the horizontal constituent of the earth, moon, and the sun [4,5]. Not only the astronomical factor influence the tide, but there are also other factors which are termed non-astronomical and non-periodic factors that influence tides, which include wind, atmospheric pressure, rainfall, temperature and the salinity of the water body [6].
In recent years, numerous methodology and models have been developed to improve and achieve accurate water prediction. A recent review on the tidal level method was carried out by [7]. Moreover, harmonic analysis remains the most powerful tool for tidal analysis and prediction despite some of its drawbacks since its introduction by Kelvin in 1860. Subsequently Darwin improved its practical usage between 1886 to 1893 and then Doodson perfected Kelvin's theory in 1922 [8][9][10] reformulating the harmonic analysis and introducing tidal spectroscopy and prediction. The research chain for the analysis of tides continued through Godin's 1972 findings to Forman in 1977 and now the current state of the art involves the use of wavelet transformation since its introduction by [11]. Harmonic analysis identifies the sea surface height as a summation of a finite number of cosine waves with predetermined and specified astronomical frequencies to be used for the computation of the number of harmonic constituents (amplitude and phase angle). The need for a time span of 18.6 years of sea water level data or longer to estimate the harmonic constituent when the harmonic analysis method is involved remains the major drawback of popular classical harmonic analysis [12]. This implies that the achievement of high accuracy in harmonic analysis depends solidly on the length of the sea level time series. To improve the accuracy and ameliorate the limitation of harmonic analysis, however, in this study wavelet-based harmonic analysis (WBH) is introduced to estimate accurately the tidal harmonic constituent with at least a six-month sea level time series at its disposal to make a longer prediction of six months, one year or even longer.
Wavelet transformation for tidal analysis and prediction was introduced by [11] as a highly non-linear model to investigate the existence of non-astronomical tidal factors that affect tidal analysis and prediction. Yin et al. [13] achieved a real-time tidal level predicted by an ensemble real-time tidal level prediction mechanism applying multiresolution wavelet decomposition techniques. They integrated harmonic analysis and variable neural networks, which are built based on discrete wavelet transform (DWT) [13]. A network of wavelet transformations as a non-linear model was introduced by [6], a short water level measurement of about one month from three tide gauge stations at different locations in Canada was used. El-Diasty [14] integrated the harmonic analysis with a wavelet network to predict the sea water level based on one-month data at four different tide gauge stations located in Saudi-Arabia and the USA. Cai et al. [15] introduced a new method called the in-action method for short time tidal level prediction which is based on normal time-frequency transformation (NTFT) by defining normal Morlet wavelet transformation as their transformation kernel to predict tides. They used data of a short duration of about one month at Hong Kong's Quarry Bay to predict short term tidal level [15]. All the literature above on wavelet transformation for tidal analysis and prediction employs the use of short data of mostly one month to achieve only short-term predictions, but for long time prediction, the accuracy of the prediction was very low. Moreover, wavelet transformation was also used in the past by tidal experts to identify non-astronomical factors in the analysis of tides. Therefore, this study introduces a new novel wavelet-based harmonic model (WBH) for tidal analysis and prediction in which the astronomical frequencies are adopted to estimate the tidal constituent (amplitude and phase angle) for accurate tidal level predictions in both the short and long-term.
Six months of sea water levels were used in this study at four tide gauge stations in Malaysia located in Sabah and Sarawak. This paper is structured into sections as follows. Section 1 addressed the introductory aspect of the paper section, a brief introduction of harmonic analysis for tidal prediction as well as a brief introduction of wavelet transformation is presented in Section 2, the introduction of a wallet base harmonic for tidal analysis and prediction is presented in Section 3, results and analysis obtained for this study are presented in Section 4, while Section 5 concludes the paper's findings with a recommendation.

Harmonic Analysis Technique (HA)
In this section, a brief introduction of harmonic analysis will be presented as well as wavelet transformation.

Harmonic Analysis
Harmonic analysis over the past decade remains the strongest basis for tidal analysis and prediction [16]. Harmonic analysis considers the tide at any point as a superposition of several harmonic constituents embedded in the seawater level observation whose frequencies are predetermined by astronomical observation.
The input water level observation is given as follows: where y 0 is the mean sea level determined by averaging the input water level signal, A i is the amplitude to be determined, ω i is the astronomical frequency, θ i is the phase angle in degrees or radian, N is the number of constituents to be used in the analysis at a given time t.
The above-given equation can further be expanded as: where a i is the unknown cosine parameter and b i is the unknown sine parameter all to be ascertained. When the cosine and the sine parameters are determined carefully and accurately, the tidal constituent (amplitude and phase) in Equation (1) can also be computed as: and:

Wavelet Transformation
This section introduces wavelet methodology with their differences and types. As a result of wavelet introduction about a decade ago, it has overtaken the problems connected to fast Fourier transformation (FFT) and short-time Fourier transform (STFT). Wavelet transformation utilizes a high frequency at a short window length so also low frequencies at a long window length to remedy the problem connected with the situated window length at all frequencies employed in the short-time Fourier transform [17]. Wavelet transformation decayed a signal into groups of an exhaustible span of wavelet that can be harmonious or asymmetric, regular or irregular, sharp or smooth. The inner product of a signal with the group of wavelets are calculated by the wavelet transform. The scaling and shifting functions are the family of wavelets given as: where ψ(t) is the mother wavelet, x(t) refers to the signal input, a refers to the scaling factor, and b refers to the shifting factor, while X(a, b) constitutes the similarity among the mother wavelet scaling at a and shifting at b together with signal input [18]. The primary advantage of utilizing wavelets is that they are set in space, there are dissimilarities among the types of wavelets which include Daubechies wavelet (DB), symlet wavelet (Sym), Haar wavelet, biothogonal wavelet pairs, Meyer wavelet, Mexican hat wavelet, Morlet wavelet, continuous wavelet, discrete wavelet, etc. One technique may be preferable to another depending on the types of applications needed [19]. For a continuous signal, time as well as the scaling parametric quantity are mostly continuous. Therefore, the continuous wavelet transform was chosen in this study. Despite what might be expected, the signal input might be discretely prompting a wavelet sequences extension, thus the wavelet transform use can be characterized for discrete-time signals, prompting a discrete wavelet transform (DWT).

The Continuous Wavelet Transformation
The continuous wavelet transformation was created as an optional way to deal with the short-time Fourier transform and subdue the resolution issues. However, both the wavelet analysis as well as the short-time Fourier transform (STFT) are done similarly, in such a way that the function is multiplied with a signal. The same applies to the window function in a short-time Fourier transform (STFT) while the transform is calculated one by one for distinct segments of the signal time domain. Therefore, the continuous wavelet transforms (CWT) of a function at a scale and shifting or translational value is stated by the following integral: In the case of time and frequency domain ψ(t) is a continuous function and the overline corresponds to the performance of the complex conjugate. The parameter a represents the scaling while b represents the time shift of ψ(t) finally a −1/2 is the normalization value of X(a, b) so that, when ψ(t) has a unit length, then its scaled version X(a, b) also has a unit length [20].
In recent years, extricating significant signal information has been particularly useful in various fields when employing the use of multiresolution analysis (MRA) [21]. The inferring of wavelet bases which brought about the development of the discrete wavelet transform (DWT) algorithm was built by Mallat [22], according to discrete wavelet transform any signal of a continuous function f(t) can be estimated as a summation of wavelet and dilation (scaling) function express as in Equation (7) [20].
So we have: where φ 0,k (t) denote scaling function while ψ j,k (t) the mother wavelet, c 0,k (t) and d j,k (t) are the coefficient of dilation function and wavelet function [20].

Data Collection and the Study Area
The observed tidal height at four different tide gauge stations at Sabah and Sarawak of Malaysia was obtained, namely from Bintulu, Miri, Sandakan, and Tawau. Figure 1 shows a Google Earth Pro image of the tide gauge stations. Table 1 presents coordinate information on the tide gauge stations and the length of the data used. Data used for this study were downloaded from the UHSLC website (University of Hawaii sea level center: http://uhslc.soest.hawaii.edu/data/). The root mean square error and correlation coefficient were used to test the performance of the methodology applied for this study. These can be written as follows: To determine the characteristics of the tide, normally the major astronomical tidal constituent is involved. That is, M 2 principal lunar, S 2 principal solar, O 1 principal lunar-diurnal and K 1 luni-solar diurnal, the form number given as: where: F < 0.25 is a semi-diurnal tide, F ≥ 0.25 to 1.5 is a mixed primarily semi-diurnal tide, F ≥ 1.5 to 3 is a mixed primarily diurnal tide, F > 3 is a diurnal tide.
The ratio of the amplitude or the form number is employed to determine the best description of the tide in a given area.

Wavelet-Base Harmonic (WBH) for Tidal Analysis and Prediction
The summation of a finite number of cosine waves that have a specified amplitude, frequency, and phase normally describes the changes in elevation of the sea at a point by harmonic analysis is given in Equation (1).

Fig. 1. Google Earth Pro Image of the study area
Equation (1) can be simplified using trigonometrical identity as: Using a i (t) and b i (t) to denote A i (t)cosθ(t) and A i (t)sinθ(t) respectively then Equation (11) becomes: In each harmonic, these two parameters a i (t) and b i (t) can be expanded using Equation (7). Therefore, a i (t) and b i (t) will be, ( ) Therefore, with the reduced help of wavelets, the quantity of wavelets that have a non-value constant in a certain chosen time frame of a signal is limited, and subsequently, Equation (13) can be revamped as: where ψ j (t) include both the translation (shifting) of the wavelet function ψ j,k (t) as well as the dilation (scaling) function φ 0,k (t), the quantity of wavelet and dilation functions that are nonzero inside the analysed time stretch is p and subject to three factors, the mother wavelet, the number of scales utilized and the total number of samples per period. Similarly, b i (t) can be taken as a summation of these function, but with a dissimilar set of coefficients. Therefore b i (t) in Equation (14) becomes: The quantity of wavelet and dilation (scaling) function is q, that is nonzero inside the period, ordinarily the family (mother) wavelet and scaling function are equivalent, that is p = q, in this manner the new signal can be signified as: Equation (17) is the new novel hybrid algorithm for tidal analysis and prediction known as the wavelet base harmonic model (WBH). The harmonic constituent of the water level is the coefficient a j and b j which represents the amplitude A j (t) and phase angle ψ j (t) as in the popular classical harmonic model. The amplitude and phase angles of the harmonic can be resolved as follows:

Result and Discussion
Knowledge of future tides remains vital for port users in terms of navigation, marine safety, marine coastal engineering, and so on. Therefore, accurate computation of the tidal constituent is necessary for prediction processes. Classical harmonic methodology needs at most a year or year longer for the determination of the major tidal constituent. However, in this study, a short data series of about six months or shorter is enough for wavelet-based harmonic for the accurate determination of major tidal constituent to predict six months, one-year future tides. Moreover, the extracted tidal constituents (35 tidal constituents were computed) were used for the prediction, with the main predicted result examined using the popular root mean square error (RMSE) and Pearson correlation coefficient (r) as can be seen in Table 2. However, to describe the characteristics of each tide station, normally the major astronomical tidal constituents are involved, these are principal lunar (M 2 ), principal solar (S 2 ), principal lunar-diurnal (O 1 ), and luni-solar diurnal (K 1 ) constituents.  Table 3 best describes the characteristics of the tides at four various tide gauge stations located at Sabah and Sarawak used for this study. To test the performance of the new novel wavelet base harmonic for tidal analysis and prediction, two years of the relevant data set were downloaded from the University of Hawaii sea level center website (UHSLC) (http://uhslc.soest.hawaii.edu/ data/).
The data set of 2014 to 2015 at the tide gauge station of Bintulu and Sandakan was used while the tide gauge station at Miri and Tawau data set of 2013 and 2014 were used. The data were divided into three sections, the first six-month section (January to June) data set was used for the analysis and estimation of constituents, the second section of the data (June to December) was used for comparison when six-month prediction was done while the remaining third section of the data, the following year (January to December), was used for comparison when the longer predictions of one year and above are made. Figure 2 shows the six-month plots of the input water level signal from January to June at the four stations located at Sabah and Sarawak. Accurate prediction for a six-month period was achieved in the four tide gauge stations as it can be seen in Figure 3.
Future predictions were also conducted to test the effectiveness and reliability of the new novel method by making long term predictions of a complete year. The output result agrees accurately with the original tidal level, although some of the observed stations data are full of missing data technically known as Gaps, as shown in Figure 4. But when a comparison was made between the observed data and original data, the graph of the computed and predicted tidal plot quite agree with the original observed water level as it can also be seen in Figure 5.
The amplitude extracted using the novel wavelet-based harmonic and used for the prediction is shown in Figure 6.
To validate and test the accuracy of the prediction, the results of statistical index of root mean square error and correlation coefficient is used and presented in Table 2.
Finally, the residual of the observation that is different between observed and predicted is shown in Figure 7 while the scatter plot is shown in Figure 8.

Conclusions
Most recent studies on tidal analysis and prediction confirmed the need for a long period of tidal data amounting to a year or longer for accurate constituent extraction to be used for precise and accurate tidal forecasting. This paper presented a novel approach via wavelet-based harmonic to extract the tidal constituent using only a six-month period of data, perform analysis, and make a future prediction. The four stations used at Sabah and Sarawak as a case study have certified that the methodology provides an accurate determination of the tidal constituent when six-month water level data are employed. A comparison of the predicted result with the original tidal observation affirms that reliable tidal predictions can be produced when using wavelet base harmonics. For further studies, the method should be tested on other Malaysian coastal tide gauge stations.