Lightning Strike Location Identification Based on 3D Weather Radar Data

Lightning is an instantaneous, intense, and convective weather phenomenon that can produce great destructive power and easily cause serious economic losses and casualties. It always occurs in convective storms with small spatial scales and short life cycles. Weather radar is one of the best operational instruments that can monitor the detailed 3D structures of convective storms at high spatial and temporal resolutions. Thus, extracting the features related to lightning automatically from 3D weather radar data to identify lightning strike locations would significantly benefit future lightning predictions. This article makes a bold attempt to apply three-dimensional radar data to identify lightning strike locations, thereby laying the foundation for the subsequent accurate and real-time prediction of lightning locations. First, that issue is transformed into a binary classification problem. Then, a suitable dataset for the recognition of lightning strike locations based on 3D radar data is constructed for system training and evaluation purposes. Furthermore, the machine learning methods of a convolutional neural network, logistic regression, a random forest, and k-nearest neighbors are employed to carry out experiments. The results show that the convolutional neural network has the best performance in identifying lightning strike locations. This technique is followed by the random forest and k-nearest neighbors, and the logistic regression produces the worst manifestation.

small spatial scales and short life cycles, weather radar is one of the best operational instruments that can monitor the detailed 3D (Three dimensional) structures of such storms at high spatial and temporal resolutions. Thus, extracting the features related to lightning automatically from 3D weather radar data to identify lightning strike locations would significantly benefit future lightning predictions.
The current research on lightning can be roughly divided into two categories: numerical analysis and statistical methods. Numerical analysis is a mesoscale numerical weather prediction system that mainly uses the Weather Research and Forecasting (WRF) Model and other models to simulate strong convection processes and discusses the influence of different physical parameterization schemes on the simulation effect (NCAR Mesoscale & Microscale Meteorology Laboratory, 2021). Barthe et al. (2010) estimated total lightning by the WRF model according to the correlation between the flash speed and the available model parameters (e.g., ice water path, ice mass flux product). Zepka et al. (2014) used the WRF model to study potential lightning locations based on the probability of lightning occurrence within the location of interest. Giannaros et al. (2016) used lightning to improve convective representations by controlling the triggers of model convection parameterization schemes on the basis of WRF-LTNGDA. Gharaylou et al. (2020) used the WRF-ELEC model to predict the impact of initial conditions on lightning activity. However, the coarse temporal and spatial resolutions used in numerical analysis method limit their utility in accurate lightning strike location recognition tasks.
Statistical methods are usually applied to study lightning based on prior knowledge. Combining the density-based spatial clustering of applications with noise (DBSCAN) algorithm and the kernel density algorithm, Chen et al. (2017) eliminated insignificant locations with rare lightning strikes. The National Oceanic and Atmospheric Administration (NOAA) and the Cooperative Institute for Meteorological Satellite Studies (CIMSS) developed the empirical probability of severe (ProbSevere) model in 2018. It extracts information related to thunderstorm development from several data sources automatically to produce timely, short-term, statistical forecasts of thunderstorm intensity (Cintineo et al., 2018). Wang et al. (2019) established a probabilistic warning model for strong convective weather, such as hail and lightning, by multiple logistic linear regression. Zhang et al. (2020) presented a density-based convective storm identification method for weather radar data. North et al. (2020) used the heat equation to define a redistribution kernel, and a simple linear advection scheme was shown to work well in a lightning prediction example. Yücelbaş et al. (2021) used effective meteorological parameters to preestimate distance-based lightning. Mostajabi et al. (2019) used machine learning techniques to successfully hindcast nearby and distant lightning hazards by looking at single-site observations of meteorological parameters. Karami et al. (2020) presented a machine learning-based method to locate lightning flashes using calculations of lightning-induced voltages on a transmission line. Zhu et al. (2021) presented a machinelearning approach (support vector machines) to classify cloudto-ground and intracloud lightning. Nevertheless, these methods use a limited number of data factors to analyze the relationships with lightning strike locations, and the recognition effects are often unsatisfactory.
Weather radar is one of the most effective instruments for monitoring the occurrence of lightning. It can be used to indirectly identify the electrification process within a developing thunderstorm because grapples and hail particles return large reflectivity echoes (Wei and Hsieh, 2020). As highly reliable data in the field of meteorological detection, radar data have been widely considered by meteorologists, and many explorations and practices have been carried out. Lu et al. (2017) presented a spatial lattice model based on sampling particles that was proposed to support both the representation and analysis of meteorological information. A 3D modeling strategy was used for weather radar data analysis (Lu et al., 2018). Based on the data of nine weather radar slices at different elevations, Wang et al. (2018) used a convolutional neural network model to identify the spatial structures of threedimensional abnormal clouds when hail lands. Jiang et al. (2019) utilized multisource convolutional neural networks to extract the features of various weather-related data obtained from Doppler radar to identify thunderstorms and gales. Ling et al. (2020) proposed a new method based on stacked autoencoders to identify abnormal weather radar echo images. Li et al. (2020a) built a dataset from weather radar echo images using different depth models, such as a simple convolutional neural network (CNN), a recurrent neural network (S-RCNN), and a spatiotemporal recurrent convolutional neural network (ST-RCNN). The recognition performances of the learning models on thunderstorms and gales were compared. Zhou et al. (2020) proposed a new semantic segmentation-based deep learning network for cloud-to-ground lightning nowcasting named LightningNet. This model conducts reliable lightning nowcasting by using multisource data.
As mentioned above, the current related experiments are largely based on two-dimensional projection radar data or regenerated product radar data. In fact, when weather radar equipment is working, it scans in the surrounding threedimensional space, and the obtained radar data have obvious three-dimensional characteristics. These studies ignore the potential three-dimensional characteristics in radar data. It is difficult to restore the real three-dimensional spatial data scene around a target, which has caused relevant research to have certain deficiencies. Machine learning can extract hidden feature information from multidimensional data, and the recognition of lightning strike locations based on threedimensional radar detection data has become possible.
In this article, we first transform the problem of identifying lightning strike locations into a classification problem. Then, a sliding window is used to construct a lightning feature dataset based on three-dimensional weather radar data and lightning location data. Furthermore, logistic regression, a random forest, k-nearest neighbors, and a convolutional neural network are employed to identify lightning strike locations. The contribution of this paper is a first attempt to apply deep learning methods to the identification of lightning strike locations based on 3D radar data, thereby laying the foundation for subsequent accurate and real-time lightning location predictions. This work is expected to provide a new method for mitigating and preventing meteorological and lightning disasters.
The rest of this paper is organized as follows. In Data, we introduce the utilized data and the study area. In Methodology, we provide the details of establishing the dataset based on lightning location data and three-dimensional weather radar data and briefly introduce the classification algorithms used, including logistic regression, a random forest, k-nearest neighbors and a convolutional neural network. In Experiments, we present the experimental setup and results. Finally, we conclude and discuss future research directions in. Conclusions and suggestions for future work.

Data and Preprocessing
Lightning location data and three-dimensional weather radar data are provided by the Ningbo Meteorological Bureau. Lightning location data is obtained by the ADTD (Advanced TOA and Direction system) lightning location systems, and ADTD is ground-based advanced time of arrival and direction systems cloud-to-ground lightning detection sensors. At present, the system in the meteorological department has been widely used in China. Its detection efficiency is between 80 and 90%, and the error is generally several hundred meters to several kilometers. The single station detection radius of the lightning positioning system is approximately 300 km (Shi, 2016;Xu and Zhou, 2017). The lightning data contain fields denoting the time, location (latitude and longitude), polarity effect, peak intensity, steepness, and other information of the ground flash return process, providing great help when studying lightning activity. In this article, lightning data with intensities less than 10 KA are removed, and those whose corresponding radar combined reflectance (CR) grid values are less than 10 DBZ are also eliminated to ensure data accuracy. After preprocessing, the lightning location data are used as the ground truth. There is a clear correlation between the occurrence of lightning and radar echoes top heights and echo intensity (Michimoto, 1991;Futyan and Del Genio, 2007). At the same time, weather radar data is considered to be reliable detection data in the meteorological field. Some scholars have used radar data to predict lightning data. Therefore, we used radar echo data to identify lightning, hoping to provide preliminary research for lightning prediction based on radar data.
The weather radar data used in this paper are scanned and generated by the S-band Doppler weather radar system. Doppler weather radar has a high temporal-spatial resolution (1 km/ 6 min). It provides information about the positions and intensities of precipitation particles and particle motion information. Therefore, it is an effective tool for monitoring microscale and mesoscale convective systems and plays an essential role in detecting severe weather. Weather radars perform a 3D scan of the atmosphere. A radar system scans a full volume every 5-6 min. It scans starting from the lowest elevation angle and then increases the scanning angle gradually. Finally, it provides data at nine elevation angles according to a certain scanning strategy. Each elevation scan forms a cone with an output of 2D raster data of the same size, and all 2D raster data created at different elevation angles constitute 3D raster data with a strict vertical alignment (Han et al., 2019). In this article, 3D weather radar data are used as input data to identify lighting strike locations.

Study Area
Ningbo is a sub-provincial city in northeastern Zhejiang Province, People's Republic of China, as shown in Figure 1. The spatial extent is (28°51' -30°33′ N; 120°55' -122°16′ E). It is bounded on the east by the East China Sea and the Zhoushan Archipelago, on the north by Hangzhou Bay (across which it faces Jiaxing and Shanghai), on the west by Shaoxing, and on the south by Taizhou. Thunderstorms frequently occur in Ningbo, and the direct economic losses caused by lightning strikes are as high as millions of yuan each year. Therefore, Ningbo is selected as the study area in this article.

Establishing the Dataset
First, the lightning data and radar data should be matched spatially and temporally. A full radar scan generates one complete set of radar volume data, consuming approximately 5-6 min. Thus, for a specific complete radar volume dataset, the lightning data that occur during the period of the radar data scan are selected, and those beyond the spatial extent of the specific radar data are removed to ensure spatial consistency. Then, the final selected lightning data and the specific radar data form one group in which the lightning data and the radar data are well matched spatially and temporally. Therefore, the dataset in this article is constructed based on groups by the sliding window strategy. First, based on the radar reflectivity raster data, a sliding window with a size of M ×N (M is the size of the row, N is the size of the column) is set up to obtain the feature samples. Each feature sample contains nine layers of radar reflectivity raster data within the sliding window (with a size of M×N). Second, if one or more lightning data points are located on the center grid of the sliding window, the sample in this sliding window is labeled 1 (with lightning). Otherwise, the corresponding sample is labeled 0 (without lightning). Figure 2 illustrates the extraction of feature data with lightning (samples labeled 1). After the traversal of the sliding window, a dataset with labels of 1 or 0 is established.  Frontiers in Environmental Science | www.frontiersin.org August 2021 | Volume 9 | Article 714067 We collect 30,447 samples labeled 1 and 493,557 samples labeled 0 for a total of 524,004 samples from July to September. These data are processed and packaged to build a 3D spatial dataset. We divide into training sets and test sets, and were randomly scrambled during the training. The test subset contained samples for the second half of September 2018 (104,800 samples), whereas the training set included the remaining samples.
During the training period, the extracted feature data (samples labeled 1 or 0) are fed into various classification algorithms to train a two-class classification model. Furthermore, the trained model is applied to identify the new samples. If the output of the classification result is 1, it proves that there is lightning in the sample. If the output is 0, there is no lightning in the sample. Figure 3 shows an overview of the solution used in this paper. It should be noted that this M×N sliding window can be set according to the specific application. For example, in this article, we set this sliding window size to 5 × 5 (5 columns and five rows).

Classification Algorithms
The identification of lightning strike locations by weather radar data is regarded as a classification problem. We utilize some frequently-used binary classification algorithms, namely, logistic regression (LR) (Wright, 1995;Kleinbaum et al., 2002), K-nearest neighbors (KNN) (Dudani, 1976;Kramer, 2013), a random forest (RF) (Liaw and Wiener, 2002;Pal, 2005) and a convolutional neural network (CNN) (Wang, et al., 2019;Sothe et al., 2020), to conduct our experiments based on the dataset constructed in the previous section. The following is a brief introduction of these approaches.
Logistic regression (LR): LR is essentially a classification method (Cheng et al., 2006). To solve a classification problem, the model is trained according to some known training sets, and then the classes of the new data are predicted. The goal of LR is to find a decision boundary with a sufficient degree of discrimination so that the two categories can be well separated. In this paper, the parameters we used in LR are set as follows, penalty is L2 regularization, Inverse of regularization strength is 1, the maximum number of iterations for the solver to converge is 500, and a binary problem fits for each label.
K-nearest neighbors (KNN): KNN is a classification algorithm . To determine the category of an unknown sample, KNN uses all the samples of the known categories as references and calculates the distances between the unknown sample and all the known samples. The K known samples that are closest to the unknown sample are selected. According to the majority-voting rule, the unknown sample and the K-nearest samples are classified into one category. The parameters of KNN are we set to: the number of neighbors is 9, leaf size is 5, the number of parallel jobs to run for neighbors search is 1.
Random forest (RF): RFs are commonly used in regression and classification, as they improve the prediction accuracy of the resulting model without significantly increasing the amount of required calculations (Gao et al., 2019;Li et al., 2020b). An RF is not sensitive to multivariate common linearity, the results are relatively robust to missing data and unbalanced data, and it can effectively predict the effects of up to thousands of explanatory variables. The parameters of the RF in this article are we set as: the number of trees in the forest is 100, the maximum depth of the tree is 5, random_state is the seed used by the random number generator set to 2.
Convolutional neural network (CNN): A CNN is a type of feedforward neural network that includes convolution calculations and has a deep structure (Lei et al., 2019;Wan et al., 2019). In deep learning, CNNs have achieved great success in image classification. CNNs possess the ability to characterize learning; they can classify input information according to its hierarchical structure and identify similar features at different locations in space. In this paper, the CNN structure contains three parts: an input layer, a hidden layer, and an output layer. The input layer can handle multidimensional data. We put the training dataset into the input layer. The hidden layer is the core of the CNN, including the convolutional layer, pooling layer and fully connected layer. For classification problems, the output layer returns the probability that the input image belongs to a certain category. For us, the output of the output layer is the probability of a lightning strike location. Figure 4 shows the overall CNN architecture used in this article. The CNN has seven layers, two convolutional layers and two pooling layers that appear alternately. There are three fully connected (FC) layers connected to the last feature map. Finally, the fully connected layers output the final classification results. The size of the dataset input into the CNN is 9 × 5×5, and the filter size is set to 9 × 1×1 (here, nine refers to the weather radar data at nine different heights). 9 × 5×5 in the first layer means that this layer has nine different elevation radars and that each level has a size of 5 × 5.9 × 4×4 in the second layer means that the feature map generated after sample pooling has a size of 9 × 4×4. Other layers are similar ultimately fully connected layer (FC) output results. We use the cross-entropy loss as the objective

EXPERIMENTS Experimental Setup
In this paper, we conduct comparative experiments with the dataset generated in Methodology. For these classification methods, the training set is employed for model training, and the test set is The bold value is the best value in each column. Frontiers in Environmental Science | www.frontiersin.org August 2021 | Volume 9 | Article 714067 6 used to verify the lightning classification results. In brief, the purpose is to explore the classification outcomes, which are regarded as the identification results of the lightning strike locations.
In addition, all classification algorithms utilized in this article are executed in the python37 environment. These machine learning methods (LR, the RF and KNN) are developed using the scikit-learn (sklearn) library. Sklearn is a simple and efficient tool for predictive data analysis. PyTorch's is used to efficiently implement the CNN approach. The CNN uses a GPU to accelerate the computation process. Moreover, the hardware environment contains a Core i7-9500 (2.6 GHz) CPU and a GeForce GTX 1065 GPU.

Performance Criteria
A confusion matrix can be used to assess the accuracy of binary classification results (Stehman, 1997). The confusion matrix shown in Table 1 is used. In Table 1, Tp and TN represent the numbers of true positive and true negative cases, respectively, while FP and FN denote the numbers of false positive and false negative cases, respectively (Pakdaman et al., 2020). In Table 1, ''strike'' and ''nonstrike'' indicate the lightning strike and nonlightning-strike events, respectively.
Based on Table 1, to evaluate the performance of the proposed algorithms, seven conventional criteria are considered: precision, false positive rate (FPR), recall, accuracy, F-measure, area under the curve (AUC), and precision-recall (P-R) (Pakdaman et al., 2020;Luque et al., 2019;Sofaer et al., 2019). Precision is intuitively the ability of a classifier to not label a negative sample as positive and can be calculated by: False positive rate (FPR): The proportion of real negative examples predicted to be positive can be calculated by: Recall is the ability of the classifier to find all the positive samples and can be calculated by: Accuracy is the proportion of the correct predictions to the total number of predictions: The F-measure can be interpreted as a weighted average of the precision and recall, where the best F-measure is 1 and at the worst is 0. The relative contributions of precision and recall to the F-measure are equal. The formula for the F-measure is: The area under the receiver operating characteristic curve (ROC AUC) is defined as the area enclosed by the coordinate axes under the ROC curve (Luque et al., 2019). The value of this area cannot be greater than 1. The value range of the AUC is between 0.5 and 1. The closer the AUC is to 1.0, the higher the authenticity of the detection method; when it is equal to 0.5, the authenticity is lowest, and the method has no application value.
Precision-recall (P-R) is a useful measure of prediction success when the classes are very imbalanced (Sofaer et al., 2019;Saito and Rehmsmeier, 2015). When the number of positive samples is seriously less than the number of negative samples, the P-R curve can more intuitively express the differences between models than other metrics, which is more appropriate. Since the collected dataset contains unbalanced data, P-R is required. In this paper, we use the area under the P-R curve to express the P-R curve.

Results Analysis
We conduct experiments using the constructed dataset to compare the performance of the four models, namely, LR,  Figure 6A, the blue dot represents the observed lightning. In Figure 6B, the dark blue dot (Miss_lightning) is miss identified lightning, the gray dot (False_lightning) represents the falsely reported lightning, and the red dot represents the correctly identified lightning).
Frontiers in Environmental Science | www.frontiersin.org August 2021 | Volume 9 | Article 714067 KNN, RF, and a CNN. The precision, false positive rate (FPR), recall, accuracy, F-measure, area under the curve (AUC), and precision recall (P-R) values of the test samples produced by the three models are recorded as the final results. For these indicators, smaller FPRs are better, and the larger the other metrics are, the better they are. Table 2 shows that the model with the best performance in term of recognizing the lightning strike locations is the CNN, followed by the RF and KNN, and LR has the worst performance. The CNN has the best precision, recall, accuracy, and F-measure, and it has the lowest FPR at 0.158. More importantly, the AUC and P-R performance of the CNN is far superior to that of other models. P-R is an important model identification indicator. The area under the PR curve yielded by the CNN is 0.534, which is 0.059 higher than those of the other best-performing models. This shows that CNN can not only better obtain the hidden data features among the multilayer radar data but also has better model ability and can adapt to complex multidimensional data. Notably, the RF performs best aside from the CNN. Its P-R and other criteria (except Recall and AUC) are the best among the three machine learning methods, indicating that the RF is also an effective algorithm and has a certain effect on identifying lightning strikes. Among all the methods, LR performs worst. Not only are its AUC and P-R the worst, but its FPR is the highest among those of all the models, which shows that LR has difficulty dealing with the identification of lightning strike locations.
In addition, all models have high accuracy, but the PR values of the LR model, DT model, and KNN model do not perform well. This means that when identifying lightning strikes, accuracy alone cannot measure the true accuracy of the given model. This may be due to the imbalance between positive and negative samples in the created dataset. It is undeniable that the CNN model has the best recognition effect, and we use it for a subsequent case analysis.

Case Study 1-September 20, 2018
To verify the CNN model, we apply the model in a real environment. Under the influence of convective cloud clusters, intense lightning activities occurred in Ningbo in northeastern Zhejiang Province of China on September 20, 2018. The China Meteorological Administration (CMA) Public Meteorological Service Centre issued a lightning warning. Therefore, the weather radar data obtained from Ningbo at 10:54 (Universal Time) on that day are selected for use.
Lightning is not particularly stable and normally drifts. The deviation of the thunderstorm center is less than 5%, and the accuracy of the identification location is within the acceptable (Huang et al., 2019). In order to better quantify and evaluate the recognition results of the model, we believe that the identified lightning strike location within 1 km around the lightning strike location is also effective. Figure 5 shows the observed lightning strike position and the result identified by the CNN model. The upper part of the figure is the distribution of the observed lightning strike position, and the lower part is the result of the CNN model identification. The average probability of correct hit, miss identified, false identified for this case amounted to 0.763, 0.235, 0.237. It can be seen that the CNN can identify the approximate locations of lightning, and the model has a good recognition effect with respect to concentrated lightning, which proves that it is feasible to use a CNN combined with radar data in a real environment to identify lightning. However, the disadvantage is that the range of lightning strike locations identified by the CNN is larger than the actual landing area. These situations may be due to the fact that the model training samples are not sufficient or that some lightning cannot be detected by lightning positioning equipment. It is also possible that we have overlooked certain parameters that have important impacts on lightning recognition. Furthermore, another shortcoming is that the CNN model is not ideal for the recognition of discrete lightning location data. Some scattered lightning bolts are not recognized.

Case Study 2-September 21, 2018
On August 23, 2018, a few thunderstorms occurred in south ningbo. We chose the radar data at 06:48 UTC that day for the examination. Figure 6 shows Lightning locations observed and identified by the CNN model. Figure 6A shows the observed lightning strike locations. and Figure 6B shows the results of lightning strikes identified by the CNN. The average probability of correct hit, miss identified, false identified for this case amounted to 0.725, 0.271, 0.275. In this case, the CNN model also can identify the approximate location of the lightning strike locations, but the identification results of the discretely distributed lightning points are poor and cannot be prepared for identification. Nevertheless, it is possible to use the CNN model to identify lightning strike locations.

CONCLUSIONS AND SUGGESTIONS FOR FUTURE WORK
In this article, we convert the problem of identifying lightning strike locations into a binary classification problem, and a sliding window strategy is utilized to construct a dataset suitable for the identification of lightning strike locations based on 3D weather radar data. Then, based on the constructed dataset, four common classification algorithms (LR, an RF, KNN and a CNN) are applied to explore the identification of lightning strike locations. The results show that the CNN has the best performance in terms of the identification of lightning strike locations. Its precision is 0.842, the recall is 0.604, the accuracy is 0.967, the FPR is 0.158, and the area under the P-R curve is also outstanding at 0.534. The CNN is followed by the RF and KNN, LR has the worst performance. This proves that a deep learning method can conduct autonomous learning of spatial feature data with the support of a large amount of multidimensional data and can obtain more hidden data information relationships than other approaches. Lightning strike location recognition based on three-dimensional radar detection data is efficient and can be used to a certain extent. However, because the occurrence of lightning is a relatively lowprobability event, it is difficult to identify with weather radar data. The essence of this situation is an imbalanced classification problem. When constructing the dataset, we lack the consideration of a balanced sampling design, which to a certain extent causes the problem of too large a lightning strike location to being identified by the CNN model. In the future, the impact of unbalanced samples on the identification of lightning strike locations will be considered. In addition, with the rapid development of deep learning, an increasing number of methods and technologies can be applied to the recognition of lightning strikes. Other modeling methods may be able to obtain better results with respect to the recognition of lightning strikes. We need to evaluate these numerous methods in the future. We hope to obtain a more accurate method for identifying lightning strike locations and reduce the false positive rate of lightning detection to provide certain decision-making support for disaster prevention and mitigation.

DATA AVAILABILITY STATEMENT
Publicly available datasets were analyzed in this study. This data can be found here: https://github.com/zyd530/Data.