A topological framework for real-time 3D weather radar data processing

ABSTRACT Real-time 3D weather radar data processing makes it possible to efficiently simulate meteorological processes in digital Earth and support the assessment of meteorological disasters. The current real-time meteorological operation system can only deal with radar data within 2D space as a flat map and lacks supporting 3D characteristics. Thus, valuable 3D information imbedded in radar data cannot be completely presented to meteorological experts. Due to the large amount of data and high complexity of radar data 3D operation, regular methods are not competent for supporting real-time 3D radar data processing and representation. This study aims to perform radar data 3D operations with high efficiency and instant speed to provide real-time 3D support for the meteorological field. In this paper, a topological framework composed of basic inner topological objects is proposed along with the quadtree structure and LOD architecture, based on which 3D operations on radar data can be conducted in a split second and 3D information can be presented in real time. As the applications of the proposed topological framework, two widely used 3D algorithms in the meteorological field are also implemented in this paper. Finally, a case study verifies the applicability and validity of the proposed topological framework.


Introduction
Strong convective weather can cause much loss of life and property (Xue 2016;Meng et al. 2019;Shi, Cui, and Shen 2020). With the development of the digital Earth, virtual geographic environment (VGE) and 3D geographic information science (GIS), it has been possible to simulate real-time convective weather processes in 3D environments and provide great support for decision-making in meteorological fields. However, limited by the computing power of hardware, real-time processing and visualization of 3D meteorological data are still a challenge for related fields.
Currently, people can observe convective clouds and watch their development over time by Doppler radar systems (Zheng et al. 2017;Sun et al. 2019;Zheng et al. 2019;Vogl et al. 2021). The current presentation of radar data in regard to convective clouds is limited within 2D space as a flat map (Roberts and Rutledge 2003;Chen et al. 2012;Cică, Burcea, and Bojariu 2015;Lee, Kummerow, and Zupanski 2021), which omits much three-dimensional (3D) information about convective clouds, such as the 3D shape characteristics imbedded in radar data, and causes barriers for the identification and judgment of severe convective weather. Radar data contain 4D spatiotemporal characteristics (Choi, Cha, and Kim 2017;Sindhu and Bhat 2018;Oue et al. 2019;Gao et al. 2021), and with the development of 3D GIS and spatiotemporal GIS (Petrov et al. 2015;Kim and Chung 2020;Van Pham 2020;RRC and DHM 2021), they can be visualized and analyzed in 3D or 4D geoenvironments to explore much more valuable information about convective clouds (Mbogo, Rakitin, and Visheratin 2017;Rautenhaus et al. 2018;Kim and Hong 2019;Pálenik, Spengler, and Hauser 2021;Mahavik, Tantanee, and Masthawee 2021). However, 3D operations are resource consuming, and regular methods are not competent to support real-time 3D radar data processing and representation in meteorological fields. Therefore, 3D presentation and analysis have not been provided in radar data real-time observation systems thus far (Lu et al. 2018). How to rapidly conduct 3D operations on radar data has become a key issue in the meteorological field.
In recent years, studies on 3D data indices and visualization operations of weather radar data have been carried out (Ernvik 2002;d'Agostino, Clematis, and Gianuzzi 2011;Yang et al. 2011;Lu, Jin, and Han 2013;Guan et al. 2015;Han et al. 2016;Liu et al. 2017;Lu et al. 2017). Lu, Jin, and Han (2013) reconstructed and visualized a 3D convective cell based on radar data. Lu et al. (2018) proposed a 3D modeling strategy to represent and analyze weather radar data. Guan et al. (2015) conducted 3D visualization of radar data based on the MATLAB platform. Liu et al. (2017) implemented 3D image reconstruction and visualization for weather radar data.
Meanwhile, some software products (such as Unidata's integrated data viewer (IDV 2021) and the autonomous visualization system (AVS)) also provide excellent tools to display and analyze 3D radar data. All these studies have achieved great progress in the 3D processing of radar data. In these studies, regular 3D grids have often been used to analyze 3D radar data; that is, the radar data are interpolated into regular 3D grids first, and then the related algorithms are carried out on regular 3D grids to obtain 3D results. Due to the large number of 3D grids and the operational complexity, most studies have focused more on the methods to obtain 3D products and have given little attention to the operational efficiency, especially for real-time applications. Thus, these achievements can hardly be applied in real-time meteorological operation systems.
To solve this problem, a topological framework along with the quadtree structure, which is a spatial data structure built by a recursive decomposition of space into quadrants, and the layer of detail (LOD, which can be considered the scale to display the representation or the scale at which the phenomena can be meaningfully analyzed) architecture for real-time radar data processing are proposed in this paper, based on which 3D radar data operations and algorithms can be conducted in real time.
The rest of this paper is organized as follows. In Section 2, we provide the details of constructing the topological framework and its spatial organization strategies. Section 3 is dedicated to the implementation of the real-time processing algorithms based on the topological framework. In Section 4, we present the experimental setup and results. Finally, we conclude and discuss future research directions in Section 5.

The topological framework and its construction
Doppler radar scans the 3D space around it repeatedly to obtain a series of data. Therefore, the 3D space the Doppler radar scans can be rebuilt by the spatial points, which are structured consistently with the volume-scan mode of Doppler radar (by sweeps and lines, as shown in Figure 1). To support 3D data analysis, other geometric objects, such as irregular quads and hexahedrons, together with their topological relationships, are also built based on these points. Thus, a topological framework composed of these various types of geometric objects with topological relationships is proposed to meet diverse 3D operation requirements, in which the points are regarded as the basic carriers to load the radar data. At the same time, spatial Octree and LOD organization strategies are also set up in the framework to improve the situation. With the aid of the topological framework and organization strategies, the 3D operations of radar data can be conducted with high efficiency and can provide significant support for meteorological real-time systems.

The basic topological objects and their construction in the framework
In the proposed framework, there are four basic topological geometry objects: topological point (namely, TPoint), topological edge (namely, TEdge), topological quadrangle (namely, TQuad) and topological hexahedron (namely, THexa). The TPoint is the primary object that truly carries the radar data in the framework. TEdge is actually the intermediate object that is used to assist operations in processing. TQuad is one final topological object in the framework and is used to construct continuous quadrangle grids to carry out some surface operations. THexa is another final topological object in the framework and is used to construct continuous hexahedron grids to carry out some volumetric operations.
In construction, they have their own intrinsic rules and data structures to support topological relationships and operations (as shown in Figure 2). The TPoint is the basic object used to construct other topological objects. In addition to the position and attribute value, a TPoint also contains topological relationships with its associated TEdges, TQuads and THexas. TEdge is constructed by two TPoints (as shown in Figure 2b) and contains topological relationships with its associated TQuads and THexas. As a final object, TQuad is constructed by four TPoints (as shown in Figure   Figure 1. The radar space of the weather radar volume-scan (Lu et al. 2017). 2c), but it also contains the information of its associated four TEdges. In constructing a TQuad, four TPoints should be stored in a certain order and anticlockwise order is adopted in this paper, and the TEdges in a TQuad should also be in the same order; that is, the TEdge between v 0 and v 1 should be the first TEdge(e 0 ), the TEdge between v 1 and v 2 should be the second TEdge(e 1 ), and the TEdge between v 3 and v 0 should be the last TEdge(e 3 ). THexa is another final object in the topological framework; it is constructed by eight TPoints and contains the information of 12 TEdges. In construction, eight TPoints should be connected in a certain order to generate a THexa (as shown in Figure  2d). On the upper side, four TPoints (v 0 , v 1 , v 2 , and v 3 ) are connected in anticlockwise order, and the TEdges (e 0 , e 1 , e 2 , and e 3 ) are also in the same order. On the lower side, four TPoints (v 4 , v 5 , v 6 , and v 7 ) are connected in the same order, and the TEdges (e 4 , e 5 , e 6 , and e 7 ) are also in the same order. Meanwhile, v0 and v4 are connected as e 8 , v 1 and v 5 are connected as e 9 , v 2 and v 6 are connected as e 10 , and v 3 and v 7 are connected as e 11 . In the construction of the final objects (TQuad and THexa), the connection order is critical for subsequent operations. There are two other variables contained in the final topological objects: one is the bounding box for quick spatial collision detection, and the other is the max-min-value (MMV), which is the maximum value and minimum value of all TPoints in the final objects for fast value detection. The full definitions of topological objects in the framework are shown as follows: As mentioned above, the topological relationships among the four basic objects are very flexible (as shown in Figure 3). The final topological objects can also be considered constructed by both TPoints and TEdges, which make it very convenient to find the associated objects from each other and make the operations very efficient; however, at the cost of redundancy. This is also the compromising strategy in this paper.

Construction of the topological framework
In the framework, the four basic topological objects are well constructed with specific topological structures. Every topological object must be unique in the framework to maintain the validity of the topological relationships. Therefore, some rules and tricks should be used in their constructions. Spatially, all Tpoints are arranged according to the volume-scan mode of Doppler radar (by sweeps and lines), as shown in Figure 4. That is, all Tpoints are arranged in several layers (sweeps) with different elevations; in each layer, the Tpoints are arranged in 360 lines, and each line contains approximately 460 bins (here, the bin can be regarded as the location of Tpoint). Therefore, TPoints are constructed based on their spatial locations and stored by the structure of a 3D array in which the first dimension refers to the layer index, the second dimension refers to the line index, and the third dimension refers to the bin index. Therefore, each TPoint can be indicated by the array index. For example, TPoints[i][j] [k] can be located at the No. i layer, No. j line, and No. k bin. All TPoints constructed are unique in the topological framework and used to construct other objects.
TEdges in the framework are divided into 3 types: Row_TEdge, Col_TEdge and Wall_TEdge. Row_TEdge is the TEdge constructed by two TPoints from the same radar line. Col_TEdge is the TEdge constructed by two TPoints from two adjacent radar lines in the same layer. Wall_TEdge is constructed by two corresponding TPoints from two adjacent layers. The three types of TEdges are built separately and stored in 3D array structures. Thus, according to the TPoint arrangement rules, the three types of TEdges can be constructed as follows: The amount of data on the radar line in layer i.    In the above formulas, the parameters i, j and k should meet the following limitation conditions: if (j+1 = lineSize), then j+1 = 0 0 <= i < layerSize -1 0 <= K < binSize-1 After construction, the relationships among TPoints, TEdges and THexas are complemented, and all topological objects are stored separately in their 3D array structures. Therefore, the primary topological framework with basic connected objects is also built successfully.
The topological framework is composed of TPoints, TEdges and THexas together with their mutual connections. However, extra organization strategies are also required to enhance the capabilities of dealing with 3D operations. Thus, quadtree structures and layer of detail (LOD) strategies are also designed to meet the requirements.

The quadtree structure in the topological framework
In most operations, qualified objects should be located quickly. However, it would consume much time due to the number of objects in the framework. Thus, the quadtree structure is adopted in this paper to speed up this process.
In the framework, TPoints are the actual objects carrying the radar data; therefore, TPoints are taken as the objects organized in the quadtree structure. The qualified TEdges, TQuads and THexas can be located quickly through topological connections with the qualified TPoints. The layer (sweep) amount is much less than the bin amount; that is, the height in the Z-axis is much less than the length and width in the XY-axis in 3D space. Therefore, this paper adopts the quadtree, not octree, as the organization strategy.
Actually, the radar volumetric-scan space is similar to a cone and a circle from the top view. Thus, the quadtree can be designed as shown in Figure 5. The top-box node covers all 3D space; then, it is separated into four subbox nodes, and each subbox node is separated into another four subbox nodes. The subbox nodes in the bottom level can be called leaf-box nodes (as shown in Figure 5a). All TPoints in the topological framework are allotted to the leaf-box nodes in the quadtree. In each quadtree box node, there are 2 types of parameters: spatial information and data value information.
The data value information of each box node includes the maximum and minimum data values attached to the TPoints that belong to this box node.

Lod strategy in the topological framework
Products based on the current topological framework possess all the detailed information, but the amount of data is also enhanced, which places a great burden on data transportation and visualization, especially in real-time applications. In the meteorological field, detailed information is not always necessary, and sparse information can also meet the requirements well in most scenarios. Therefore, this article employs the LOD (layer of detail) strategy to represent data with different levels of detail. Based on the topological framework, the TPoints are chosen every two (three, four or more) bins in each line (as shown in Figure 6). Then, a new topological framework can be generated with these chosen TPoints, in which the TPoint amounts are much less than those in the original framework. Accordingly, other topological objects together with the connections among them can also be constructed in the same way, as well as the quadtree structure in the new topological framework. Thus, new topological frameworks with fewer data can be constructed for less detailed products. In this way, a hierarchy of various topological frameworks with different levels of data amounts are generated to meet different application scenarios: in subtle scenarios, operations can be conducted in the original topological framework to obtain detailed products, and in general scenarios, operations can be rapidly conducted in shrunken frameworks to obtain less detailed products with less data and better efficiency of data transmission and visualization. In applications, topological frameworks at different detailed levels can be prebuilt in advance to support 3D radar data operations.

Real-time processing algorithms based on the topological framework
The constructed topological framework possesses great potential to support radar data 3D operations in real-time scenarios. For its applications, two widely used 3D algorithms in the meteorological field are chosen as examples to demonstrate how to implement the 3D operations efficiently based on the topological framework.

3d isosurface extraction algorithm
3D isosurface extraction is a fundamental operation for 3D data analysis and visualization (Newman and Yi 2006). In this paper, 3D isosurfaces can be extracted from THexas in the topological framework through the marching cubes (MC) algorithm (Cercos-Pita et al. 2018;Newman and Yi 2006), which is one of the most widely used algorithms for isosurface extraction (Lorensen and Cline 1987;Liu et al. 2017) and has been implemented in various open-source toolkits, such as the Visualization Toolkit (VTK 2021) and the Autonomous Visualization System (AVS 2021). The time consumption of the MC algorithm increases with the growth of the data size. Therefore, how to rapidly find the actual THexas that are exactly involved in generating 3D isosurfaces is the key issue for achieving real-time processing.
With the help of the quadtree structure and the topological relationships in the framework, qualified THexas can be located immediately. In this paper, the extraction of the 3D isosurface can be conducted through 3 main steps: 1. find possible TPoints that may be involved in the algorithm based on the quadtree structure; 2. find the qualified THexas based on the topological relationship with the possible TPoints found in Step 1; and 3. 3D isosurface extraction based on the MC algorithm. The detailed steps are as follows: 1. Find the possible TPoints (as shown in Figure 7): a) Define the value of the 3D isosurface as the isoValue. b) Define the criteria to indicate the qualified box node in the quadtree. If the isoValue is between the minimum value and maximum value reserved in the box node, then the box node is qualified. c) Check the top-box node in the quadtree. If the top box is not qualified, then there are no possible TPoints in the current framework; otherwise, check its four subbox nodes and find the qualified subbox nodes. d) Recursively traverse the qualified subbox nodes until all qualified box nodes are leaf-box nodes. e) Obtain the TPoints contained in the qualified leaf-box nodes and filter out those whose values are less than the isovalue. f) The remainder are the possible TPoints and are added to a list (namely, TPoints-List). 2. Identifying the qualified THexas a. Define the criteria to indicate the qualified THexa: If the isoValue is between the minimum value and maximum value reserved in the THexa, then the THexa is qualified.
a. Traverse all possible TPoints in TPoints-List and perform the following steps: i. According to the criteria defined in Step a, obtain the qualified THexas associated with the current TPoint; ii. Uniquely store the qualified THexas in a list (namely, THexas-List). b. All qualified THexas in THexas-List are exactly involved in the 3D isosurface algorithm.
3. Carry out the MC algorithm on the qualified THexas in THexas-List.
Taking advantage of the quadtree structure and the topological connection between the TPoints and THexas in the framework, the invalidated THexas that are not exactly involved in the MC algorithm can be filtered out quickly, and therefore, the operation is sped up to a great extent.

Vertical profile extraction algorithm
The vertical profile is an important pattern for exploring the inner structure of volumetric data. The vertical profile extraction algorithm, operated on volumetric cells such as tetrahedrons and hexahedrons, is relatively mature (Pietroni et al. 2009). In this paper, based on the THexas together with the topological connection in the topological framework, the qualified THexas and TEdges can be located quickly, and the cutting point on each TEdge can be calculated only once, avoiding multiple calculations when it is shared in different THexas. Therefore, the vertical profile extraction algorithm can be conducted much more efficiently. Taking advantage of the topological characteristics, the vertical profile can be achieved through two fundamental steps: 1) find the qualified THexas that are definitely cut by the cutting plane; and 2) obtain the cutting facets on the cutting plane. The detailed steps are described as follows: 1. Find the qualified THexas cut by the cutting plane.
a. Find the first THexa(H0) that is exactly cut by the cutting plan, add H0 to a list (namely, THexa-list), traverse all topological TEdges associated with H0 to find the qualified TEdges that are exactly cut by the cutting plane, and push the qualified TEdges into a queue (namely, TEdge-queue). At the same time, label all associated TEdges to indicate that they are settled. b. Pop a TEdge (E) from TEdge-queue, conduct a cutting operation between E and the cutting plane to obtain the coordinates and appropriate value of the cutting point, and then save them inside E. c. Traverse the topological THexas associated with E; if one (Hi) is not in the THexa-list but in the bounding box of the cutting plane, add it (Hi) to the THexa-list. Then, traverse the topological TEdges associated with Hi. If one is not labeled and it is the qualified TEdge that is exactly cut by the cutting plane, then push it into the TEdge-queue and label it to indicate that it is settled. d. Repeat Steps b and c until the TEdge-queue is empty; then, the THexas in the THexa-list are all qualified.

Obtain the cutting facets on the cutting plane
There are five basic types of intersections between the cutting plane and a THexa (Byeon and Lee 2021) (as shown in Figure 8). The cutting facets on each THexa can be obtained according to the specific intersection type. Therefore, we can traverse all THexas in the THexa-List and obtain the cutting facets on each THexa one by one according to the following: a. For one THexa, find its qualified TEdges cut by the cutting plane according to the intersection point calculated in the previous steps, and record their index numbers in the THexa. b. According to the index numbers of the qualified TEdges in the THexa, a specific type of intersection can be matched according to Figure 7. c. With the specific intersection type, cutting facets on this THexa can be achieved.
The previous steps on each THexa in THexa-list are repeated, and a vertical cutting profile with various facets can be achieved. With the values on the vertices of the facets, the profile can be drawn on the screen. This part is relatively mature in the GIS field and not the core of this paper; therefore, no detailed descriptions are presented here.

Experiment and results
An experiment is conducted to verify the viability and efficiency of the proposed topological framework in real-time radar data processing. In the experiment, the S band Doppler radar is utilized to realize the framework. For the radar reflectivity data, a volume scan of the Doppler radar can generate 9 sweeps with elevations of 0.5°, 1. 45°,2.4°,3.35°,4.30°,6.0°,9.9°,14.6°,and 19.5°. Thus,according to the parameters of the Doppler radar, the topological framework can be constructed by the following steps: 1) determine the center of the framework according to the position of the Doppler radar; 2) determine the points organized in layers and lines around the center of the framework; 3) construct the basic topological objects (TPoints, TEdges, TQuads and THexas) with their topological relationships according to Section 2.1; 4) build the QuadTree structure to organize the Tpoints in the framework according to Section 2.3; and 5) construct another two less detailed topological frameworks (LOD framework Level 1 and LOD framework Level 2) according to Section 2.4. The construction of the total topological framework set consumes approximately 6 s, and it needs to be carried out only once at the beginning of the whole process. Afterward, the radar data are parsed from the radar archive files and attached to the constructed topological frameworks. Then, the 3D isosurfaces with 9 value layers (with radar reflectivity values of 20,25,30,35,40,45,50,55 and 60 Figure 9. The cutting plane defined by P 1 and P 2 . Figure 10. The relationship between P 1(2) and P'. dbz) are extracted based on different detailed frameworks. Meanwhile, a conventional method based on regular 3D grids is also implemented to generate 3D isosurfaces with the same 9 value layers. All these results from different strategies are displayed on the virtual weather Earth system built based on the browser/server (B/S) architecture to represent and analyze meteorological data in a virtual 3D geoenvironment.
In this experiment, a laptop equipped with an Intel® Core™ i7-6820HQ CPU @ 2.7 GHz, 16 GB RAM and a 512 GB SSD is installed with Windows 10 professional 64 Bits, Java10, Intellij Idea 2018.3.2 and Visual Studio Code 1.63.0. The results generated in different strategies are very close, as shown in Figure 11. The slight differences in the results can be found in Figure 12.  The consumption time and the product data amount based on different strategies vary greatly, as listed in Table 1.
The 3D isosurface extraction operations based on the original topological framework spend much less time than those based on the conventional method. Additionally, based on less detailed frameworks, the 3D isosurface operation consumes increasingly less time and generates much less triangle data, which can be transferred and rendered much faster in practical real-time applications. Thus, based on the proposed topological framework, the whole process of the isosurface extraction operation is sped up and suitable for real-time application.
Meanwhile, vertical profiles are also achieved with high efficiency based on topological frameworks. The time consumed by the operation based on the different-level, detailed topological framework is much shorter than that based on the conventional method. The results are presented on the virtual weather Earth system (as shown in Figure 13). The results are also very close, and some slight differences in details are shown in Figure 14.
A comparison of the consumption time and the facet amount in the profile product data based on different strategies is also provided in Table 2.
The above two cases both achieve proper results with significant efficiency based on the proposed topological framework, which also proves the validity and adaptability of the proposed topological framework.
At the same time, five more cases are also adopted in this paper to verify the efficiency of the algorithms based on the proposed topological framework. The consumption times of 3D operations on the basis of both conventional methods and different levels of topological frameworks in different cases are shown in Tables 3 and 4. The operations based on conventional methods consume much more time than on the proposed topological frameworks, and the LOD strategy also has an important effect on these operations and can reduce much consumption time in these cases. According to the experiments conducted above, it is obvious that taking advantage of the topological characteristics and LOD architecture, the proposed topological framework can provide powerful and flexible support to 3D operations in real time for different application scenarios and possesses competitive potential for the spatiotemporal simulation and visualization of convective weather in the meteorological field.

Conclusions and discussion
This paper proposes a topological framework composed of some basic topological objects with complete connections to process 3D radar data with high efficiency. Meanwhile, the quadtree structure and LOD architecture are also achieved in the topological framework. With the support of the preconstructed framework, 3D operations on radar data can be conducted in real time. A case study in this paper also demonstrates the applicability of the proposed topological framework and its high efficiency in 3D operations. Therefore, real-time 3D products from radar data can become common materials for meteorologists in their decision-making process regarding severe weather, which would greatly compensate for the deficiency of current 2D products in the meteorological field.
In this paper, the topological framework is stable, while the radar data are changeable and can be attached to the framework frequently. Thus, with the competence of real-time 3D weather radar data processing, this topological framework possesses great potential to represent and simulate spatiotemporal climate events and enables good exploration for geographic process simulation in the digital Earth or virtual geographic environment (VGE) fields. Based on the topological framework proposed in this paper, identifying storm cells and tracking them to simulate the process of thunderstorms and forecasting severe weather are our next research goals.