An Advanced Dynamic Visualization Method of Global Ocean Tide with Multi-core Processor Based on OpenGL

: In terms of ocean tide visualization, to meet the requirement of both display range and operational efficiency, an advanced method is proposed, in which the tide height is rapidly computed with global tide model EOT10a, and dynamically displayed by OpenGL. Aiming at the large amounts of calculation of global tide height, the feature of multi-core processor is integrated into the method. The experiment shows that, compared to a single-core processor, when using a 6-core processor, the speedup ratio is about 5.4, parallel efficiency reaches 90%, and 880 000 tide heights can be calculated per second. Eventually, the result would be output as a tide height graph by OpenGL. This method could be a useful tool for marine cartography due to the large display range and the high efficiency.


Introduction
Ocean tide is a periodic motion of sea water mainly due to the tidal forces generated by celestial bodies such as sun and moon. Elevation of the sea surface is affected significantly by tides. It is important for the hydrographer and cartographer to understand why tide, water level and water current characteristics vary both over time and spatially so that they are taken fully into account for survey planning and operations which will lead to successful production of accurate marine cartography. Since the simple numerical data of tide height are too confusing to be directly understood, the visualization of ocean tide may be a useful tool for the plan making of navigation, the dispatching scheduling of port, the experimental teaching requirement of tide theory, and the deep comprehension of ocean tide change law (Liu, 2014). The most representative software for tide visualization is MIKE C-MAP developed by Danish Hydraulic Institute (DHI). Other proposed methods are based on IDL (Qiu et al., 2005), ECDIS (Chen et al., 2007), OpenGL, Spark (Qin, et al., 2015), and so on. However, they all have the problems in either display range or operational efficiency. Therefore, an advanced dynamic visualization method of global ocean tide is proposed in this paper. The method is able to compute the tide height, anywhere and anytime, by the principles of tide prediction. Then, dynamically display them as a tide height graph by OpenGL. Furthermore, to run the algorithm with higher efficiency, it is programmed by multi-thread technique to get the most out of the multi-core processor.

Tide height computation
The principles of tide height computation are based on the principles of tide prediction (Luke, 2015). According to the equilibrium tide theory, ocean tide, the periodic motion of sea water, is superimposed by a number of tide-generating motions. Each one of them, represented by a simple harmonic cosine curve, is known as a harmonic constituent. A letter or letters and usually a subscript are used to designate each constituent. For example, the Principal Solar semidiurnal constituent is designated S2. The Principal Lunar semidiurnal constituent is designated M2. S is for sun and M is for moon and the subscript 2 means that there are two complete tidal cycles for each astronomic cycle. Thus, the tide height (namely, the difference in height between instant sea level and local mean sea level) consisting of N constituents is written by where h is the tide height, t is the desired time, and t1 is the initial time. For each constituent, f is the intersection factor, H is the amplitude, σ is the angular velocity which can be obtained by querying the constituent table, V is the astronomical initial phase angle corresponding to t1, u is the correction angle of V, and g is the epoch. V is given by where τ, s, h', p, N', and p' are the 6 basic elements of astronomy which can be obtained by (3). μi (i=0, 1, …, 6) are Doodson constants for each constituent, which are shown in Table 1.
Proceedings of the International Cartographic Association, 4, 2021. 30th International Cartographic Conference (ICC 2021), 14-18 December 2021, Florence, Italy. This contribution underwent single-blind peer review based on submitted abstracts. https: In (3), L is the value of desired location's east longitude (west longitude is counted as a negative value), t1 is the time corresponding to V, t0 is the GMT 00:00 on January 1 st , 1900. Thus, t1-t0 is the time difference (in hour). t' is the GMT of the day (in hour). When t1 doesn't change, the V of each longitude is a constant. f and u would vary with t, and the specific calculation method is given by Franco, A. S., 1981. For each constituent, H and g are referred to as the tidal harmonic constants, which can be obtained by harmonic analysis (Amiri-Simkooei et al., 2014), or given by tide model. The EOT10a global tide model is an empirical model established by the Deutsches Geodtisches Forschungs Institute (DGFI) through the analysis of the data which are derived from altimetry satellites such as T/P, ERS-1/2, GFO, Jason-1, and Envisat (Savcenko et al., 2010). The model is widely used in the field of hydrographic surveying and charting. It divides the global sea area into 2 872 844 cells with a resolution of 0.125° × 0.125°, and provides 13 constituents (namely, M2, S2, N2, K2, 2N2, K1, O1, P1, Q1, S1, Mm, Mf, and M4) tidal harmonic constants. In EOT10a model, from May 9 th , 2019 to May 13 th , 2019, the computed tide height of the cell, whose lower left vertex locates at 0° in both longitude and latitude, are shown in Figure 1.

Dynamic visualization of tide height
Based on the principles of tide height computation mentioned above, a dynamic visualization method of tide height is proposed, and the flow chart is displayed as Figure 2. The specific implementation process of each step in Figure  2 is listed as follows: Step 1: Set σ of each constituent, read the tidal harmonic constants of desired area from EOT10a model, and calculate V of each constituent in desired cell. The σ of each constituent can be obtained by querying the constituent table. The inputted desired area would be divided into cells with a resolution of 0.125° × 0.125° according to EOT10a model, while the cells describing land would be eliminated. For each cell, 13 groups of tidal harmonic constants could be read from EOT10a model. Let t1-t0=0, which means the time corresponding to V is GMT 00:00 on January 1 st , 1900, and set L as the average of 2 edge longitude values of each cell. For each L, V can be calculated by (2), (3) and Table 1.
Step 2: Calculate fi, ui and the tide height of each cell under the desired time. According to the time difference (in hour) between the inputted desired time and GMT 00:00 on January 1 st , 1900, f and u of each constituent are calculated (Franco, 1981). The tide height of each cell could be obtained by (1) with t-t1 and the h, g, σ, V, f, u of 13 constituents.
Step 3: Display the results after numerical adjustment. Scale the tidal height, longitude, and latitude value of each cell based on the ratio of original value for displaying requirement. Then, each cell's colour would be set according to the tide height, meanwhile, isobath is also set (John, 2010). Eventually, the tide height graph would be output by OpenGL in the way of Triangulated Irregular Network (TIN).
To start the algorithm, the desired display range and initial time should be inputted at first. Once Step 1 is done, the rest procedure of the algorithm is to repeat Step 2 and Step Step 1 Step 2 Step 3 -40 3 according to the update frequency as required, and before each repetition, t should be reset. Usually, current t is one hour greater than last t.

The integration with multi-core processor
In EOT10a model, global sea area is divided into 2 872 844 cells. The experiment shows that, it takes 17.9 seconds to compute the whole model's cells due to the huge task load of Step 2. To run the algorithm at a high speed, the use of multi-core processor is taken into consideration based on the idea of parallel computation. With the development of processor, the computer products with multi-core processor have been in common, and the operating systems have provided support for the easy use of multi-core processor to conveniently realize the parallel computation (Feder, 2019). Therefore, the dynamic visualization of tide height could be improved by the integration with multi-core processor. The task load of Step 2 could be assigned to different cores of the processor, so that the computation of the different cells' tide height could be carried out simultaneously, rather than serially. Therefore, the CPU utilization would increase and time consumption would decrease. In order to verify the effectiveness of the parallel computation of tide height, 10 areas of different sizes are selected for both serial and parallel computation of tide height with a 6-core processor. The CPU utilization and the time consumption of the two methods are shown in Figure 3, Figure 4, and Table 2.

Conclusions
Considering the important effect which ocean tide has on marine cartography, a dynamic visualization method of global tide height is proposed with multi-core processor by OpenGL. The method is capable of computing the tide height with the data from EOT10a global tide model, and displaying them as a tide height graph by OpenGL. Furthermore, due to the large amounts of work load for the computation of global tide height, with the integration of multi-core processor, an optimized method is proposed based on the idea of parallel computation. The experiment shows that, when using a 6-core processor to run the parallel algorithm, the speedup ratio is about 5.4, and the parallel efficiency reaches 90%. The CPU utilization increases, and the time consumption of the computation for global tide height is reduced from 17.9 seconds to 3.3 seconds. The tide height of 880 000 cells could be calculated per second by this method. It could be a useful tool for marine cartography due to the large display range and the high efficiency. It should be noticed that, Step 1 and Step 3 are run serially, rather than parallelly, which still have the potential for speeding up. Thus, subsequent research may be focused on inputting and outputting data in parallel, so that the whole algorithm would have a higher efficiency.

Acknowledgement
This work was supported by the National Science Foundation under Grant 61071006. The authors would also like to thank the anonymous reviewers for their helpful comments.