INTERPRETATION OF CURRENT AND TIDAL PATTERN AT SELANGOR RIVER, KUALA SELANGOR

: Tidal data has been used to determine long-term water level alterations. Tides are high-powered and notoriously hard to ascertain. Tidal analysis and prediction need substantial study with the requisite approaches, techniques, and tools in conjunction with weather parameters and natural calamities. TOtal TIde Solution (TOTIS) software, which is rooted in harmonic analysis, is one of the most often used software in Malaysia. This study aims to interpret the current circulation and tidal pattern at the Selangor River, Kuala Selangor, Selangor Darul Ehsan. A period of one-month data is retrieved via Valeport 740 Tide Gauge from tide gauge station, whereas the current data are retrieved via Valeport Current Meter 105, which are used to analysed. The latest updated data period for the tide gauge station utilised are based on the availability of data. Therefore, tides are predicted using 33 resolved constituents for two years, starting from January 2021 until December 2022. Tidal analysis generates tidal constituents, which are then used for tidal prediction. Root Mean Square Error (RMSE) and datum offset are used to evaluate software's output. It signifies that TOTIS software is trustworthy and reliable in terms of tidal analysis and prediction accuracy. The highest river current records with high speed occur during high tide phenomenon. The output data for magnitude of river current speed are derived satisfactorily with high precision. It aids in monitoring and analyse of an appropriate method to


INTRODUCTION
Tidal and river current observations are essential and critical to determine the characteristics of tides and river currents as it can cause erosion along the jetty and almost collapse the prior retaining walls.The existence of debris flow could be hazardous to the current meter.It has been reported that strong river current transports a lot of river debris during low and high tide interchange, making tracking the current meter instrument difficult.The presence of debris flow might endanger the current meter.Tidal analysis and prediction also allow for accurate prediction of the water level.Through tidal analysis and prediction, the tidal behaviour and characteristics can be observed and analysed to monitor the water level for economic, environmental, and navigational purposes.This is significant particularly to Malaysia, as Malaysia is a maritime nation that borders the sea and is highly dependent on it for various economic activities (Rahman & Mahmud, 2017).Kuala Selangor has been long associated with firefly watching.The tranquil hamlet of Kampung Kuantan, just outside Kuala Selangor town, is a home to one of the world's largest firefly colonies.Kampung Kuantan is 25 kilometres from the river's mouth of the Selangor River.These little insects are unique in that they flash their lights simultaneously while congregating in enormous numbers on specific trees.Nevertheless, boat riding can be said to be exceedingly risky, especially at night, due to the rising winds, strong currents, huge waves, and reduced visibility caused by the weather.Some dangers include being stranded, dragged to far regions by powerful currents, and mishaps, such as boats capsizing and sometimes even lives being lost due to the inclement weather.Other dangers include boats collisions, getting trampled by trawlers, and cancelling trips in bad weather after using a lot of fuel (Karthikeyan et al., 2012).
In general, boat operators must work hard and confront a range of hazards in order to ride their boat safely and effectively.Most boats lack GPS and echo sounders, which might improve personal safety for fellow boat operators (Rodrigues & Kiran, 2013), resulting in confrontations owing to the trans-border fishing.Many of the current GPS systems meet civilian navigation safety criteria on water and the need to issue an alarm when danger is identified.Thus, these fellow boat operators require the weather information on ocean variables like surface temperature, wind direction, wind speed, wave movement, and rainfall before coming onboard.
The security of one's life and livelihood are essential to any developmental process.A "support-led strategy" for attaining greater growth in tourism while caring for boat-folk can yield significant social benefits in terms of avoiding loss of life and material at sea, particularly during storms and cyclones, by connecting timely warnings from the meteorological stations and authorities, and vice versa.Implementing tidal and current prediction system benefits the boat operators' community and state authorities, particularly during hazard mitigation and management activities.This operating system, such as a mobile application, assists boat operators in navigating the sea, locating likely potential zones, and receiving storm alerts.Hence, assisting the local village and arriving tourists, aims to bridge the gap between data insufficiency, optimal location management, and communication, particularly during disasters.
It can also lower overhead expenses and act as beneficial disaster risk-reduction instruments.Tidal analysis and current prediction are becoming incredibly influential across the world, particularly as sea levels have risen over the last few decades.According to Din et al. (2017) and Kamaruddin et al. (2017), the sea level in Malaysian waterways is rising at a rate of 2 to 6.5 millimetres per year.With many other studies indicating that the sea level is rising at an alarming rate, the research on tidal analysis and prediction plays an important part in the future of this country.Thus, the central emphasis of this study is on tide gauge data at the Selangor River, Kuala Selangor are obtained via Valeport 740 Tide Gauge.
This research uses the tidal data obtained from the tide gauge station at the Selangor River, Kuala Selangor, for tidal analysis and prediction through harmonic analysis.The software used for this study is Total Tide Solution (TOTIS), which is capable to perform tidal analysis and prediction.Meanwhile, the current data retrieved via Valeport Current Meter 105 are used to analyse the river current within a period of two days.The observation data are transferred from the instrument to the Toughbook using the X2 Valeport Terminal Software.The results from the software are then evaluated.

Research Area Identification
The research area for this study is at the Selangor River, Kuala Selangor, where the tide gauge is set up on the survey area.Table 1 tabulates the tide gauge station used in the study area.The most recent updated data determine the time selected for the station through the Valeport 740 Tide Gauge.The data for one month from the tide gauge station are retrieved via Valeport 740 Tide Gauge and have been recorded.The tidal data of one month are used in the analysis and prediction process.As for the river current, the current observations are also monitored within a period of two days using Valeport X2 Terminal software.The current analysis is interpreted and plotted using MATLAB.Figure 1 illustrates the study area where the tide gauge and current meter are deployed.

Data Acquisition
The tidal observation data are obtained and processed using TOTIS's Tide Prediction Sub Menu.The predicted water level is generated using the estimated tidal constituent data from a one-month period of tide observation.The Mean Sea Level (MSL) is also obtained from the tidal processing and analysis process.
Moreover, the Valeport Current Meter 105 is utilised to analyse the river current data, configured using the X2 Valeport Terminal Software, where the observation data are transmitted from the instrument to the Toughbook.Prior to carrying out the actual observation, the data retrieval is validated and calibrated.The sample rate for current meter data is set to 10 seconds per data point.Before being released into the river, the current meter is neatly knotted and tightly attached to a 15kg anchor.This is to prevent the instrument being swept away by the strong river current.

Data Processing
The acquired tidal data are processed and analysed using TOTIS software.This software can perform tidal prediction and analysis via harmonic analysis approach.This calculation is required to obtain the tidal constituents from the tidal data.The type of the tide at the study area is determined through the form factor (F) formula.The form factor is the ratio of the major diurnal to the semi-diurnal constituents and is calculated by the software through the formula, as shown in equation 1 (Kowalik & Luick, 2019): (1) When the value of F is smaller than 0.25, the tide shows semidiurnal characteristics; if the value is larger than 3, the tide shows diurnal characteristics.However, a form factor of between 0.25 and 3 indicates mixed tides.

TOTIS Software:
TOTIS software accepts commaseparated input files.Before conducting the tidal analysis, the input data from each station are filtered.This stage eliminates data outliers or 'spikes,' smoothing down the data curve.This procedure also detects additional instrument-related faults.The standard deviation of the input data is determined instantly, and error correction may be performed using this software.Ultimately, the revised dataset is employed in the tidal analysis procedure.
Figure 2 shows the main tidal analysis interface of TOTIS software.Since this input data are observed for a month, the data interval is set to every 10 minutes.The tidal analysis employs the Least Square Estimation (LSE) of harmonic approach.It generates the tidal component file, which is necessary for tidal forecasting.It also determines datum levels, such as MSL, Lowest Astronomical Tide (LAT), and Highest Astronomical Tide (HAT).The datum levels are calculated using two systems: the LAT and the Indian Spring Low Water (ISLW).The varieties of datum levels computed vary greatly depending on the station's tidal characteristics.
TOTIS is a tidal calculation and analysis software.Amongst many other things, it can effectively manage only several kinds of tidal data acquired from various sources and display them in a range of graphical data outputs.TOTIS, which adheres to International Hydrographic Organisation (IHO) standards, can also perform data analysis and tidal prediction.The main page of the TOTIS software when it was first launched is shown in Figure 2.   The tidal constituents and MSL data provided by tidal analysis are used in the tidal prediction phase, as shown in the primary interface in Figure 5.After the tidal prediction is completed, the prediction results are shown in the manner of a prediction graph and table.Table 2 summarises the tidal analysis and prediction methods.

Data Filterring
Filter by value Lousy data points and outliers removed

Solving Method Yearly prediction period
Based on the tidal constituents from tidal analysis Table 2.The analysis and prediction strategies using TOTIS software.

Data Validation:
Following the processing, the Root Mean Square Error (RMSE) and datum offset are determined using the processed data.The RMSE is one of the inaccuracies utilised for data validation of TOTIS software processing outputs.To examine the reliability of the results, the RMSE quantifies the standard deviation of the residuals from the results.The RMSE is derived by subtracting the observed and anticipated values.The tidal data obtained through the Valeport 740 Tide Gauge is the anticipated data required in this study.
The following formula is used to calculate RMSE (Ćalasan et al., 2020;Hamden et al, 2021): (2 where I is the variable value, xi signifies the observed data, pi indicates the predicted data, and n signifies the overall number of data points.
Additionally, the processed data are used to determine datums, such as MSL, LAT, HAT, and form factor.The datum offset is a data validation error that occurs when the datum values of MSL, LAT, and HAT are 'offset' or differ from the expected value.The datum offset is determined by analysing the TOTIS software output.

Data Analysis
The processing outcomes of the software's tidal analysis are analysed using the tidal constituents obtained by TOTIS software.The processing results are divided into MSL, LAT, HAT, and form factor.
To compute tidal data, the tidal prediction generates the data that may be correlated to the observed data acquired by Valeport 740 Tide Gauge.Initially, the tidal data are analysed to estimate the tidal constituents.Consequently, the estimated tidal constituents are used to determine the accuracy of tide prediction in the TOTIS software.The tide gauge data are processed and analysed to generate several tidal datums, such as LAT, MSL, and HAT.These datums are computed based on the estimated constituent's data.The analysis of the river current data is conducted using Valeport Current Meter 105 to determine the highest and lowest current speed within the study area, executed within two days.The current meter is configured by using X2 Valeport Terminal software.The data retrieval is checked and tested prior to the execution of the real observation.
River current observations are crucial for assessing the behaviour of tides and river currents that can cause erosion along the jetty and almost exceed the pre-existing retaining structures.Thus, the processing procedure entails installing a current metre, establishing a tide gauge station, and processing and analysing of tidal data.The final data would be used to develop and construct a suitable jetty structure, which could minimise the rate of river erosion.

Current Observation and Analysis
River current observations are required and critical to comprehend the peculiarities of tides and river currents that led erosion along the jetty and nearly overwhelmed the existing retaining structures.

Background:
River current observations are monitored for a period of two days.In the meantime, the tidal observation is carried out for one month.The processing work involves the installation of a current meter, the installation of a tide gauge station, as well as the processing and analysis of the tidal data.The final results can be used for the development and construction of an appropriate jetty, which can assist slowing the pace of river erosion.

Valeport Current Meter 105 Deployment:
The current metre is installed at the Selangor River, Kuala Selangor.Other than that, following a thorough survey of the project area, the ultimate decision is taken to put a current meter at the position.This is owing to the strong river current conveying a quantity of river debris during low and high tide transitions, which might make tracking the current metre instrument difficult.The presence of debris flow might endanger the current meter.
The current meter is set up and configured using the X2 Valeport Terminal software.Prior to carrying out the actual observation, the data retrieval is validated and tested.The current meter data sampling rate is set to 10 seconds per data point.The current metre is then neatly knotted and snugly secured with a 15 kg anchor before being released into the river.Table 3 describes a list of the instruments and materials utilised in this study.These two files are merged to provide a two-day current observation.Data filtering is performed both before and after deployment to eliminate unwanted outliers.The observation began at 15:15:00 on March 31, 2021, and finished at 16:30:00 on April 2, 2021.As a result, the time further than the startended time is terminated prior to further research.

Tidal and Current Data Analysis
Yusof et al. ( 2017) demonstrated that tidal analysis is a relatively simple process that does not require the selection of tidal schemes or solving methods.Nevertheless, the general processing demonstrates that the TOTIS software is similarly reliable in terms of accuracy and is capable in applications requiring tidal analysis and prediction.Yusof et al. ( 2017) also revealed TOTIS software capability in a study in which the average difference between a year's observed and predicted data was evaluated to be within 0.1 m to 0.2 m.Moreover, a MATLAB programme was created following the procedures used in TOTIS software for tidal analysis and prediction (Mustapa, 2019), demonstrating the software's consistency.
As for the current data observation, the Valeport Current Meter 105 is used to record the river current's speed and direction.Utilising Valeport X2 Terminal software, it is indeed transmitted and configured from Valeport Current Meter 105 to the Toughbook.The current data obtained within 2 days of current observation went through a data filtering process that has been conducted before and after deployment to prevent the undesired outliers.
The following is the analysis of the findings obtained during the observation.The findings for tidal analysis are transferred and analysed using TOTIS software.The processing results from the software's tidal analysis are assessed based on obtained tidal constituents.The processing results are broken down into MSL, LAT, HAT, and form factor.

Tidal Analysis and Prediction of Tidal Observation
Data: Using TOTIS software, the analysis results show the estimation of 33 tidal constituents.Table 5 summarises the estimated tidal constituents via tidal analysis using TOTIS software at the Selangor River, Kuala Selangor.With the values of 0.934 m and 0.507 m, M2 has the largest amplitude among the other 33 constituents.Table 5. Tidal constituents produced through tidal analysis using TOTIS software at the Selangor River, Kuala Selangor.
The harmonic analysis approach in TOTIS software is used to analyse the raw tidal observation data.These data are subsequently filtered using the Data Filtering Sub Menu to discover inaccuracies in the sensors' tidal observation data.This might be attributed to a pressure sensor issue or a low battery voltage.Outliers can be corrected or smoothed by utilising mathematical models established in the application.Figure 6 illustrates the real and smoothed tidal data displayed in the TOTIS interface application.The smoothed data are then used to undergo tidal analysis.
Relying on a period of observation of 30.903 days with an interval of 10 minutes, the MSL with regard to zero tide gauge is 2.221 m, with a standard deviation of 6.9 cm.In this study, the findings show that the tides are semi-diurnal, with low and high tides occurring twice daily.

Figure 7. General analysis of tidal analysis at the project area
The M2 component is the most important lunar component and is linked to the Moon's direct gravitational influence on the tides.Similarly, the S2 constituent is the most significant solar ingredient and is associated with the Sun's direct gravitational influence on the tides (Hamden et al., 2021).These tidal signals have two peaks every 24 hours.Semi-diurnal tides will arise as a result.
MSL has the value of 1.898 m higher than LAT in terms of sea level and HAT value is 3.820 m above LAT.Conversely, referring to ISLW system, the MSL is 1.596 m above ISLW datum.Figure 8 shows the water level in regard to the LAT and ISLW tide systems.
Figure 8. Tide analysis of water level with respect to LAT system (Top) and ISLW system (Bottom) Under the Tide Prediction Sub Menu, TOTIS is utilised to forecast the tidal observation data.The determining tidal component data and the MSL obtained from the tidal analysis approach are used to calculate the prediction of water level.Consequently, using the resolved 33 tidal constituents, the tides are predicted for two years, commencing in January 2021 and ending in December 2022.Figure 9 shows a prediction tidal graph of a one-month tide for May 2021 refer to the ISLW tidal system.Then, Table 6 shows the predicted tide (unit in metres) for the month of May 2021.

Current Data Analysis
The magnitude of the river stream began to fall to zero and then dramatically surge during the transition from low to high tide and conversely.This is owing to river debris accumulating around the current metre.Figure 10 shows the river debris that might impact the observation data.
Figure 10.River debris accumulation that interferes with current metre readings The maximum value of speed magnitude data for two days is 1.114 m/s, which was recorded on March 31, 2021 at 17:22:02, whereas the lowest speed is always 0 m/s owing to tide transitions (high-to-low or low-to-high).Additionally, in terms of speed direction, the direction between 0 and 100 degrees denotes high tide, whereas the direction between 200 and 300 degrees shows the study area experienced low tide phenomena.Apart from that, an additional analysis is performed by dividing the observation day into Day 1 and Day 2. On Day 1, the fastest current measured was 1.114 m/s during high tide, with a speed direction of 74.9 degrees.The maximum speed current on Day 2 was 0.869 m/s with a speed direction of 77.8 degrees, which was lower than the highest speed current on Day 1.Both data occurred during a high tide.
In addition, the actual observation is smoothed using the 1minute moving average, as illustrated in Figure 12.A moving average is employed to decrease the noise in the current raw data.The smoothing data are also divided into two days.The greatest value of speed current recorded on Day 1 of the 1minute moving average was 0.8158 m/s.Furthermore, the maximum speed current on Day 2 was 0.7635 m/s on a 1minute moving average.Figures 11 and Figure 12 show that the noisy data has been decreased and the speed current trend has been well recorded.

CONCLUSION
The tidal analysis and prediction using TOTIS software successfully acquire and interpret the tidal patterns.The data for current analysis are processed using MATLAB.These findings show that the aim of the study is to interpret the pattern of current and tidal observation at the Selangor River, Kuala Selangor has been achieved.Additionally, the tidal observation is conducted for a month, from April 2nd to May 3rd, 2021.Despite numerous recent studies applying innovative approaches for tidal analysis and prediction, harmonic analysis remains a viable method.With a standard deviation of 6.9 cm, satisfactory precision is obtained during the tidal processing and analysis.
Moreover, tidal datums such as LAT, ISLW, Mean Low Water Spring (MLWS), Mean Low Water Neaps (MLWN), MSL, Mean High Water Neaps (MHWN), Mean High Water Spring (MHWS), and HAT are determined during tidal analysis.The predicted tidal components are then used to forecast the future tides.This research, via tidal analysis and prediction of tidal data from the tide gauge station in the specific area, gives additional insight into the water level and tidal characteristics of tides at the Selangor River, Kuala Selangor.Ultimately, the use of TOTIS software sheds light on the dependability of future tidal analysis and prediction applications.As per the current meter results, most of the river current magnitudes are less than 1 m/s.Other than that, the former jetty's erosion might be attributed to the influence of huge river debris flows towards the jetty during high and low tides.Similarly, the high-speed boat that goes along the river may create erosion.Furthermore, the highest river current is recorded, with the majority of this speed occurring during the high tide phenomenon.Hence.the output data for the magnitude of river current speed, are satisfactorily acquired and with high precision.

Figure 1 .
Figure 1.Map of the tide gauge installed at the Selangor River, Kuala Selangor

Figure 2 .
Figure 2. Main menu of TOTIS SoftwareThe software's main menu offers features including Real-Time Observation, Data Transform, Data Filtering, Tidal Analysis, and Tide Prediction.Figure3shows Visualisation of Data Transform Menu (TOTIS).Followed by Figure4that shows the main interface of tidal prediction in TOTIS software.The summary of tidal analysis and prediction strategies is tabulated in Table3and this programme is obtainable in 32-bit and 64-bit versions.It may also be installed on any Windows machine, and this research has been conducted on a laptop running Windows 10 (64-bit).
Figure3shows Visualisation of Data Transform Menu (TOTIS).Followed by Figure4that shows the main interface of tidal prediction in TOTIS software.The summary of tidal analysis and prediction strategies is tabulated in Table3and this programme is obtainable in 32-bit and 64-bit versions.It may also be installed on any Windows machine, and this research has been conducted on a laptop running Windows 10 (64-bit).

Figure 5 .
Figure 5.The main interface for tidal analysis in TOTIS software

Figure 6 .
Figure 6.Actual and smoothed data (Top).Outliers and two sigma estimation of tidal data (Bottom)

Figure 9 .
Figure 9. Prediction graph of day 1 of May 2021 in TOTIS Software

Figure 11 .Figure 12 .
Figure 11.Graph above shows Speed Direction vs Time of the Full Day current data.The speed direction between 0 -100 degree indicates the high tide phenomena while the direction between 200-300 degree indicates the low tide phenomena

Table 1 .
Coordinates and period of data for tide gauge station

Table 3 .
Instruments and materials for observing river currents

2.5.3 Current Observation Data:
By using Valeport X2Terminal software, the observation data are transmitted from the instrument to the Toughbook.The list of observed documents obtained from the instrument is shown in Table4.

Table 4 .
List of observed files

Table 6 .
Tide Table for May 2021 produced using TOTIS software Table 7 is a summary of the outcomes.

Table 7 .
Summary of the current speed results