Lightning prediction method based on variable resolution SCVT grid and machine learning

Through the integration of variable-resolution SCVT grids and machine learning, the deficiencies in computing resource allocation and adaptability of traditional models are solved, more accurate and interpretable lightning predictions are achieved, and the simulation capabilities of extreme weather events are improved.

CN118228602BActive Publication Date: 2024-09-03UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410435489.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2024-09-03
Estimated Expiration
2044-04-11

AI Technical Summary

Technical Problem

Traditional fixed-resolution grid models have unreasonable allocation of computing resources and lack of adaptability when simulating complex terrain and extreme weather events. Their reliance on direct physical simulation ignores the potential of machine learning in pattern recognition and prediction, limiting prediction accuracy. and interpretability.

Method used

Using variable-resolution SCVT grids combined with machine learning methods, regional meteorological simulations are performed by repositioning and clipping grid data, and SHAP is used for interpretability analysis to generate training models for prediction.

Benefits of technology

It optimizes the configuration of computing resources, improves the prediction accuracy and depth of understanding of lightning events, enhances the adaptability and flexibility of the model, and provides a clearer prediction and interpretation path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118228602B
    Figure CN118228602B
Patent Text Reader

Abstract

The present invention discloses a lightning prediction method based on variable resolution SCVT grid and machine learning. First, variable resolution SCVT grid data is obtained and the refined area is relocated and the area is clipped to form a limited area SCVT grid. The limited area SCVT grid is divided into a graph to obtain a graph division information file. Then, a meteorological simulation is performed on the limited area SCVT grid, and parallel calculations are performed based on the graph division information file. The obtained meteorological simulation result file is converted into a polygonal geometric object and a lightning event label is generated. Then, the attribute table of the polygonal geometric object with the lightning event label generated is exported as a data set, and the data set is trained by machine learning. The trained model is predicted and SHAP interpretability analysis is performed. The present invention solves the limitations of fixed resolution grid simulation, optimizes computing resources, and improves the interpretability of model prediction, so that the prediction and understanding of lightning events are more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of atmospheric science and computer application technology, and in particular to a lightning prediction method based on variable-resolution SCVT grids and machine learning. Background Art

[0002] Atmospheric numerical simulation is an important tool for understanding and predicting weather changes. It simulates the flow and change processes in the atmosphere based on mathematical models of physical laws (such as fluid dynamics and thermodynamics). High-precision and high-efficiency simulation of meteorological events is the key to studying and predicting extreme weather events (such as lightning). Traditional numerical weather forecast models usually use a fixed-resolution grid system to simulate atmospheric states and processes, and achieve regional high-resolution simulation through downscaling technology. In the demand for high-precision simulation of complex terrain or local details, fixed-resolution grid models show their inherent limitations. Although increasing the grid resolution can improve the simulation quality, it also leads to a sharp increase in the demand for computing resources, affecting the overall computing efficiency. Especially in global-scale simulation activities, such models will lead to excessive use of computing resources in areas with weak response to meteorological changes, while facing insufficient resources in key areas that require accurate simulation, resulting in reduced computing resource utilization efficiency. In addition, the boundary conditions introduced by traditional downscaling methods may cause boundary problems, which not only affect the model accuracy, but also may restrict the accurate simulation of the interaction between the regional atmosphere and large-scale circulation. And fixed-resolution grids lack the necessary adaptability and flexibility when facing rapidly changing meteorological conditions and extreme events. This model structure is rigid and cannot be easily adjusted to meet specific simulation requirements or to improve the model's response speed.

[0003] In addition, the prediction of extreme weather events such as lightning requires not only high-precision simulation data, but also the understanding and interpretation of the physical processes and factors behind the model predictions. Although traditional models can provide a certain degree of prediction results, these methods usually rely on direct simulation of physical processes, ignoring the potential of machine learning technology in pattern recognition, data-driven feature extraction and prediction performance improvement, limiting the model's ability to process complex meteorological data, discover nonlinear relationships and improve prediction accuracy, and lacking analysis of the interpretability of prediction results, limiting the reliability and trust of the model in practical applications. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a lightning prediction method based on variable resolution SCVT grid and machine learning. The variable resolution SCVT grid is used for meteorological simulation, and combined with the machine learning method, SHAP is used for interpretability analysis, which effectively solves the limitations of traditional fixed resolution grid simulation, optimizes the configuration of computing resources, and improves the interpretability of model prediction, thereby making the prediction and understanding of lightning events more accurate.

[0005] The technical solution of the present invention is:

[0006] The lightning prediction method based on variable resolution SCVT grid and machine learning specifically includes the following steps:

[0007] (1) Obtain variable-resolution SCVT grid data and relocate the refined area;

[0008] (2) Perform regional cropping on the variable-resolution SCVT grid data after repositioning and refining the area to form a limited-area SCVT grid and generate a grid connectivity file;

[0009] (3) Perform graph partitioning on the limited area SCVT grid to obtain a graph partitioning information file;

[0010] (4) Use the MPAS-A model to perform regional meteorological simulation in a limited area SCVT grid, and perform parallel operations based on the graph division information file to obtain the meteorological simulation result file;

[0011] (5) Convert the meteorological simulation result file output after the meteorological simulation into a polygonal geometric object in vector form and extract the meteorological attributes required for machine learning;

[0012] (6) Read lightning observation data and convert longitude and latitude coordinates into point geometric objects, traverse all polygonal geometric objects, generate lightning event labels for each polygonal object, and export the attribute table of the polygonal geometric objects with lightning event labels as a data set; wherein the polygonal geometric objects with lightning event labels include polygonal geometric objects with lightning events occurring inside and polygonal geometric objects with no lightning events occurring inside;

[0013] (7) Perform stratified sampling on the data set to obtain a training set and a test set. Then, perform machine learning training on the training set and test on the test set to obtain the trained model. Finally, after using the trained model for prediction, perform SHAP interpretability analysis to obtain the analysis results of the influence of various meteorological attributes on the model prediction results.

[0014] The specific steps of obtaining variable-resolution SCVT grid data and repositioning the refined area are as follows: after obtaining the variable-resolution SCVT grid data, use the grid_rotate tool to translate and counterclockwise rotate the high-resolution area in the variable-resolution SCVT grid data to the key focus area, thereby optimizing the grid positioning; the following parameters are set in the counterclockwise rotation configuration file: the original latitude and the original longitude, that is, the geographic coordinates of the center of the grid before rotation, the new latitude and the new longitude, that is, the geographic coordinates of the new center after rotation, and the angle of counterclockwise rotation around the new center from a bird's-eye view.

[0015] The specific steps of performing regional clipping on the variable-resolution SCVT grid data after repositioning the refined area to form a limited-area SCVT grid and generating a grid connectivity file are as follows:

[0016] S21, using the pts point file to define the required area shape and obtain an area file;

[0017] Area shapes include polygons, circles, ellipses, and equatorial channels;

[0018] The definition of the regional shape is as follows: a polygon is defined by a series of coordinate points arranged counterclockwise, a circle is defined by specifying the center point, i.e., the center of the circle, and its radius, an ellipse is defined by determining the center point, the semi-major axis, the semi-minor axis, and the rotation angle of the ellipse, and an equatorial channel is defined as a channel area extending along the equator, across longitude, and between two latitude points;

[0019] S22. Regional specification analysis: Analyze the regional file, that is, generate corresponding boundary points according to the regional shape, specifically:

[0020] S221, polygon: directly read the coordinate points listed in the region file as boundary points;

[0021] S222, circle: First, initialize an empty list P for storing points on the circumference of the circle, then convert the longitude and latitude coordinates of the center of the circle into Cartesian coordinates, and store the converted Cartesian coordinates of the center of the circle in the center vector C. The conversion is shown in the following formula (1):

[0022]

[0023] In formula (1), radius is the radius of the sphere, that is, the average radius of the earth is 6371 kilometers; lon is the longitude of the center of the circle in the regional file; lat is the latitude of the center of the circle in the regional file; x, y, z are the coordinates of the X, Y, and Z axes in the converted Cartesian coordinate system;

[0024] Then calculate the points on the circumference of the circle: select a vector perpendicular to the center vector C as the reference of the rotation axis, divide the angle into 100 equal parts in the interval [0,2π], and perform a rotation around the center vector C for each angle r. Each rotation generates a point on the circumference based on the angle r, and the generated boundary points on the circumference are written into the list P in sequence;

[0025] S223, ellipse: First, initialize an empty list Q to store the points on the circumference of the ellipse. After converting the longitude and latitude coordinates of the center of the ellipse into Cartesian coordinates, the converted Cartesian coordinates are stored in vector C1. A vector orthogonal to vector C1 is selected as the reference of the rotation axis. Then, the boundary points of the ellipse are generated, that is, 100 angles r are equally divided in the interval [0,2π]. For each angle r, a rotation around vector C1 is performed. Each rotation generates a point based on angle r. The distance from each point to the center of the ellipse is calculated using the semi-major axis and semi-minor axis of the ellipse. The calculation formula is shown in the following formula (2):

[0026]

[0027] In formula (2), semi_major represents the semi-major axis, and semi_minor represents the semi-minor axis;

[0028] Finally, the rotation angle angle of each point is calculated to adjust the point to match the rotation direction of the ellipse. The calculation formula of angle is as follows (3):

[0029] angle=arctan2(semi_major×cos(r),semi_minor×sin(r)) (3);

[0030] In formula (3), arctan2 represents the np.arctan2 function;

[0031] After determining the rotation angle angle of each point, these points are rotated again according to the rotation direction orientation of the ellipse, that is, each point is rotated around the vector C1 with the rotation angle angle and the rotation direction orientation. The boundary points generated after the rotation are written into the list Q in sequence;

[0032] S224, equatorial channel: generating a list of boundary points of the equatorial channel according to the latitudes of the upper and lower edges of the equatorial channel;

[0033] S23, marking the internal area: applying the flood filling algorithm to mark the grid cells in the area inside the boundary point, that is, marking the grid cells in the area inside the boundary point as the internal area;

[0034] S24, transition layer setting and marking: the eight layers of grid outside the boundary points of the region shape are taken as eight transition layers, and each grid cell iCell is first traversed. For each grid cell iCell, it is checked whether it has been marked as part of the internal region or has been classified into a transition layer with a lower number. If the iCell is not marked, that is, it belongs neither to the internal region nor to any marked transition layer, then all grid cells directly adjacent to it are checked. When it is found that any adjacent grid cell has been marked as part of the internal region or belongs to any transition layer before the current layer, then the iCell is marked as the transition layer currently being processed;

[0035] S25. Generation of subset grids and grid connectivity files: Based on the marking results of internal areas and transition layers, grids marked as internal areas and transition layers are extracted from the optimized variable-resolution SCVT grid data to form a limited-area SCVT grid. The limited-area SCVT grid data is saved in NetCDF format, and a grid connectivity file is generated at the same time. The grid connectivity file contains the following information: a. The number of grids, that is, the total number of grid cells in the optimized variable-resolution SCVT grid data; b. Edge information: For each grid cell, a detailed description is given of which adjacent grid cells it is connected to.

[0036] The limited area SCVT grid is divided into graphs using METIS, that is, after reading the limited area SCVT grid and its grid connectivity file, a multi-level graph division method combining top-down and bottom-up strategies is adopted, as follows:

[0037] S31, top-down coarsening stage: the limited area SCVT grid is taken as the original image, each grid unit in the limited area SCVT grid is taken as a node, adjacent nodes are selected and merged to form new nodes, the new nodes inherit the adjacency relationship of the original node pairs, the grid graph obtained after each merger is regarded as a new level simplified graph, the new level simplified graph continues to repeat the above steps to merge again, until the number of merged grid units is reduced to a preset threshold, and the final simplified graph is obtained;

[0038] S32, initial partitioning: on the final simplified graph, perform a recursive bisection method to determine a starting partitioning scheme;

[0039] S33, bottom-up refinement stage: starting from the final simplified graph, restore the simplified graph to the original graph step by step, and improve and adjust the partitioning on the simplified graph at each level, that is, use a greedy algorithm to identify the nodes on the boundary, and calculate the potential benefits of moving these nodes from the current partition to the adjacent partition, and then select the exchange operation with the largest positive benefit to execute, in order to maintain or improve the balance between partitions while reducing the number of cut edges, and finally repeat this process until the partitioning quality cannot be significantly improved by node exchange, or the predetermined upper limit of the number of iterations is reached, the graph partitioning process is completed, and the graph partitioning information file is obtained.

[0040] The specific steps of using the MPAS-A mode to perform regional meteorological simulation in a limited area SCVT grid and performing parallel calculations based on the graph division information file to obtain the meteorological simulation result file are as follows:

[0041] S41. First, the limited area simulation is initialized in the MPAS-A mode: the static field data, i.e., terrain height, land cover type, vegetation coverage, and surface reflectivity data are interpolated into the limited area SCVT grid, and a vertical grid is generated to form a three-dimensional grid, i.e., the basic terrain and surface features, as well as the vertical structure of the atmosphere, for the operation of the MPAS-A model are established;

[0042] S42, horizontally and vertically interpolating the meteorological data at the start time of the simulation onto the three-dimensional grid to provide the MPAS-A model with the initial atmospheric state for simulation;

[0043] S43, running the MPAS-A model, setting the model time step, the start time of the model simulation and the model output interval, and then performing regional meteorological simulation. During the regional meteorological simulation, parallel calculations are performed according to the graph partitioning information file;

[0044] After the S44 and MPAS-A model simulation runs, the output is stored in netCDF format as a meteorological simulation result file, which records the meteorological variables of the SCVT grid in a limited area during the simulation.

[0045] The limited area SCVT grid includes multiple meteorological variables during the simulation period, and 19 meteorological variables are selected from the multiple meteorological variables as meteorological attributes. The 19 meteorological variables are two-meter temperature t2m, two-meter specific humidity q2, convective effective potential energy cape, convective inhibition cin, storm relative helicity srh_0_1km at an altitude of 0 to 1 km, storm relative helicity srh_0_3km at an altitude of 0 to 3 km, 10 cm maximum radar reflectivity refl10_max, 1km Radar reflectivity at AGL refl10_1km, temperature at 500 hPa layer tem_500hPa, temperature at 700 hPa layer tem_700hPa, temperature at 850 hPa layer 850tem_850hPa, dew point temperature at 850 hPa layer dew_850hPa, dew point temperature at 925 hPa layer dew_925hPa, dew point temperature near the ground dew_surf, wind speed at 850 hPa layer tW_850, wind speed at 700 hPa layer tW_700, wind speed at 500 hPa layer tW_500, wind speed difference between 700 and 500 hPa layer W5_W7, temperature difference between 700 and 500 hPa layer T5_T7; the above 19 meteorological variables are numbered 1 to 19.

[0046] The specific steps of converting the meteorological simulation result file output after the meteorological simulation into a polygonal geometric object in vector form and extracting the meteorological attributes required for machine learning are:

[0047] S51, read data and initialize basic storage structure: first use NetCDF4 library to read meteorological simulation result file, and define two empty lists: 'polygons = []' and 'attr = []', the 'polygons = []' list is used to store the generated polygon geometry objects, and the 'attr = []' list is used to store the attribute dictionary corresponding to each polygon geometry object;

[0048] S52, traversing vertex indexes: using the enumerate function to traverse the vertex index array vertices_on_cell of all grid cells in the meteorological simulation result file, obtaining the vertex index set cell_vertices of each grid cell and its index position in the vertex index array, as shown in the following formula (4):

[0049] for i,cell_vertices in enumerate(vertices_on_cell) (4);

[0050] In formula (4), enumerate is a Python built-in function, which is used to combine iterable vertex index arrays into an index sequence; for i, cell_vertices in enumerate(vertices_on_cell) represents the use of the enumerate function to traverse vertices_on_cell based on a for loop, i is the counter or index of the current iteration, and its value is automatically generated by the enumerate function. cell_vertices is the vertex index set of each grid cell, and its index position in the vertex index array is i. The meteorological attributes are accessed according to the index position in the future.

[0051] S53, extract vertex coordinates and generate polygonal geometric objects:

[0052] For each vertex index set cell_vertices, extract the valid longitude and latitude coordinate pairs, as shown in the following formula (5):

[0053] coords = [(x [v-1] ,y [v-1] )for v in cell_vertices if v>0] (5);

[0054] In formula (5), coords is the generated list containing the longitude and latitude coordinate pairs of all vertices of each grid cell, x is the longitude array, and y is the latitude array;

[0055] Formula (5) represents traversing each vertex index v in vertices_on_cell and performing the following steps:

[0056] S531, conditional filtering: excluding invalid vertex indexes through filtering condition if v>0, ensuring that only valid data is processed;

[0057] S532, Index adjustment: Since the vertex index in the NetCDF dataset starts from 1, and the index of the Python array starts from 0, perform the v-1 operation on each vertex index to correctly access the longitude and latitude values ​​in the vertex index array;

[0058] S533, coordinate extraction: For each vertex index v that meets the conditions, extract the coordinate pair (x [v -1],y [v -1]) is written into the coordinate pair list coords, and the extracted coordinate pair list coords is used to create a polygon geometry object through the Polygon class of the shapely library. The specific operation is shown in the following formula (6):

[0059] poly = Polygon(coords) (6);

[0060] In formula (6), the vertices in coords are connected clockwise or counterclockwise to form a closed polygonal geometric object poly;

[0061] S54, construct a meteorological attribute dictionary: for each vertex index set cell_vertices, create an attribute dictionary attributes, the attribute dictionary attributes contains meteorological attribute names and corresponding data values, and is defined as shown in the following formula (7):

[0062] attributes={key1:value1,key2:value2,key3:value3...key 19 :value 19} (7);

[0063] In formula (7), key1 to key 19 Corresponding to the meteorological variables numbered 1 to 19, as the names of meteorological attributes; values ​​from value1 to value 19 are the corresponding data values ​​of each meteorological attribute;

[0064] S55. During the traversal process, the polygon geometry objects and the corresponding meteorological attribute dictionary attributes generated in each iteration are written into the polygons and attr lists respectively, ensuring that the position of each polygon geometry object in the polygons list matches the position of its corresponding meteorological attribute data in the attr list. At the same time, a GeoDataFrame is created and the two lists are saved in Shapefile format.

[0065] The specific steps of reading lightning observation data and converting longitude and latitude coordinates into point geometric objects, traversing all polygonal geometric objects, generating lightning event labels for each polygonal object, and exporting the attribute table of the polygonal geometric objects with lightning event labels as a data set are as follows:

[0066] S61. Read lightning observation data and convert longitude and latitude coordinates into point geometry objects:

[0067] First, read the lightning observation data and use the read_csv function of the pandas library to read the lightning location data from the CSV file. The lightning location data contains the longitude and latitude information of each lightning event.

[0068] Then, coordinate conversion is performed to convert the longitude and latitude coordinates of each lightning event into a point geometry object, thereby forming a list of longitude and latitude tuples, each of which corresponds to a specific geographical location of a lightning event;

[0069] Finally, a point object list is generated, as shown in the following formula (8):

[0070] geometry=[Point(xy)for xy in zip(df_lightning.longitude,df_lightning.latitude)] (8);

[0071] In formula (8), geometry represents a list of point geometry objects generated by longitude and latitude coordinates; Point is a class in the shapely.geometry module, which is used to create point geometry objects; xy is a temporary variable, representing the tuple of longitude and latitude returned from the zip function. The zip function pairs the longitude column and the latitude column in the df_lightning data frame to generate an iterator of tuples; formula (8) represents that xy is passed to the constructor of the Point class to create a point geometry object;

[0072] S62, traversing the polygonal geometric objects, and for each polygonal geometric object, using the within method to check whether the point geometric object of the lightning event is located within the polygonal geometric object;

[0073] The main processing flow of the within method is:

[0074] First, traverse the point geometry objects, and for each point geometry object in the df_lightning database, use the ray method to determine whether the point geometry object is inside the polygon geometry object. The ray method is to draw a ray from the point geometry object and calculate the number of intersections between the ray and the boundary of the polygon geometry object. When the number of intersections is an odd number, the point geometry object is inside the polygon geometry object, and when the number of intersections is an even number, the point geometry object is outside the polygon geometry object.

[0075] Then the result is returned. For each point geometry object, the within method returns a Boolean value, indicating whether the point geometry object is inside the polygon geometry object. The within method is used to check the point geometry objects of all lightning events to generate a Boolean value sequence.

[0076] S63. Mark the polygonal geometric objects of the lightning events. According to the judgment result of the within method, add a new field occurred to each polygonal geometric object to mark whether a lightning event has occurred in the polygonal geometric object. The value 1 indicates that it has occurred, and the value 0 indicates that it has not occurred. Finally, export the attribute table with the new field occurred as a data set. The data set includes the meteorological attributes of each polygonal geometric object and the lightning label field occurred.

[0077] The data set is stratified sampled to obtain a training set and a test set, and then the training set is trained by machine learning, and the test set is tested to obtain a trained model. Finally, after the trained model is used for prediction, SHAP interpretability analysis is performed to obtain the analysis results of the influence of various meteorological attributes on the model prediction results. The specific steps are:

[0078] S71. First, determine the proportion of each category in the data set: the data set contains N samples, and the number of samples of category k is N k , then the target proportion p of category k k Calculated by the following formula:

[0079] The StratifiedKFold function is used to perform stratified sampling on the data set. In each segmentation process of the StratifiedKFold function, the data set is divided into K subsets, and the proportion of each category in each subset is close to p. k ; For each class k, there are m classes of that class in a particular fold k samples, N / K is the theoretical number of samples per fold, since in practice m k It must be an integer. The rounding method is used to ensure that the actual number of samples in each fold is close to the theoretical value. At the same time, the total number of samples of the same category in all folds is equal to the number of samples of the category in the entire data set, thereby obtaining the training set and test set.

[0080] S72. Use the random forest method to perform machine learning training on the model, and use grid search to adjust the parameters of the random forest classifier to optimize model performance. The grid search specifically defines a parameter grid, which includes the various parameters of the random forest classifier and the search value range, the maximum depth of the tree max_depth, the number of features considered for optimal segmentation max_features, the minimum number of samples required to split internal nodes min_samples_split, the minimum number of samples required on leaf nodes min_samples_leaf, whether to use bootstrap samples, and the number of trees in the forest n_estimators. Then perform a grid search, traverse all parameter combinations, use cross-validation to evaluate each parameter combination, and obtain the best model. The score of the best model is to use the best parameter combination to obtain the highest accuracy in cross-validation.

[0081] S73. After using the best model confirmed by grid search for prediction, the SHAP method is used to calculate and display the influence of meteorological attributes on the model prediction results, that is, the Shapley value; the calculation formula of the Shapley value is shown in the following formula (9):

[0082]

[0083] In formula (9), is the Shapley value; N is the set of all meteorological attributes, and S is a subset of N; is a weight term, which indicates the average impact of feature i added to S on the prediction result; model V(S∪{X i}) and V(S) represent the input variables X i The larger the Shapley value, the more important the meteorological attribute is to the model prediction results.

[0084] Advantages of the present invention:

[0085] (1) The present invention adopts variable-resolution SCVT grids for meteorological simulation. Compared with the traditional fixed-resolution grid model, the present invention achieves high resolution in key areas that require fine simulation, while maintaining lower resolution in areas that are less sensitive to meteorological changes, thereby optimizing the allocation of computing resources. This method not only significantly improves the accuracy of simulation of complex terrain and local meteorological phenomena (such as lightning), but also effectively reduces resource consumption in low-sensitivity areas, thereby improving computing efficiency. At the same time, it avoids the problems caused by the setting of downscaling boundary conditions and maintains the effective interaction between the regional atmosphere and the large-scale circulation.

[0086] (2) The present invention significantly enhances the model's ability to process complex meteorological data through the integration of machine learning and traditional numerical simulation. In particular, in predicting extreme weather events, the present invention can accurately capture and analyze nonlinear relationships in meteorological data, which not only improves the adaptability and flexibility of the model, but also significantly increases the accuracy of the prediction.

[0087] (3) By introducing SHAP interpretability analysis, the present invention enhances the transparency and depth of understanding of model prediction results, provides a clear explanation path for model predictions, and enables users to have greater trust in model predictions, especially when analyzing and predicting complex meteorological events, providing solid technical support for decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 Flowchart of the present invention.

[0089] Figure 2 It is an optimized variable-resolution SCVT grid diagram in an embodiment of the present invention.

[0090] Figure 3 It is a SHAP feature importance ranking diagram in an embodiment of the present invention.

[0091] Figure 4It is a SHAP summary graph in an embodiment of the present invention.

[0092] Figure 5 It is an explanation diagram of the prediction results in the embodiment of the present invention. DETAILED DESCRIPTION

[0093] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0094] See Figure 1 , a lightning prediction method based on variable resolution SCVT grid and machine learning includes the following steps:

[0095] (1) A SCVT grid with a variable resolution of 3 km to 60 km was selected. The grid has 835,586 horizontal grid points and the refinement area spans approximately 16 degrees of latitude and longitude. The grid_rotate tool (algorithm integration package, https: / / github.com / MPAS-Dev / MPAS-Tools / tree / master / mesh_tools / grid_rotate) was used to rotate the original center point (0 degrees of longitude and latitude) to (117.5°E, 32°N) and align it with the Hefei area (see Figure 2 );

[0096] (2) Use the create_region tool (algorithm integration package, https: / / github.com / MPAS-Dev / MPAS-Limited-Area / blob / master) to generate a rectangular area (115°E~120°E, 29.3°N~34.7°N), run MPAS-Atmosphere (MPAS-A model) in the Linux environment, set the time step of the MPAS-A model to 15 seconds, the start time of the model simulation to 2022-07-24_12:00:00, and the model output interval to 10 minutes, then convert the meteorological simulation result file output by the MPAS-A model after meteorological simulation into a polygonal geometric object in vector form and extract the meteorological attributes required for machine learning, and then generate labels with lightning observation data for machine learning training;

[0097] (3) The data set was divided into a training set and a test set in a ratio of 8:2. Eight methods were selected to build the model, including Random Forest Classifier, CatBoost Algorithm, XGBoost Classifier, LightGBM Classifier, Decision Tree Algorithm, Gradient Boosting Algorithm, AdaBoost Algorithm and Neural Net Classifier. Accuracy, Recall, Precision, F1 score and ROC_AUC were used as indicators to evaluate the performance. The evaluation index scores of each algorithm or classifier are shown in Table 1 below:

[0098] Table 1 Evaluation index scores of each classifier

[0099]

[0100]

[0101] (4) As shown in Table 1, the random forest classifier with the highest evaluation score is selected for machine learning training of the model, and grid search (GridSearchCV) is used to adjust the parameters of the random forest classifier to optimize the model performance. Set the maximum depth of the tree (max_depth) to None (indicates that the tree will continue to split until all leaves belong to the same category or contain less than min_samples_split samples), the number of features considered for the best split (max_features) search range is {1,3,10}, the minimum number of samples required to split internal nodes (min_samples_split) search range is {2,3,10}, the minimum number of samples required on leaf nodes (min_samples_leaf) search range is {1,3,10}, bootstrap samples (bootstrap) are not used, forest The number of trees in the forest (n_estimators) is searched in the range of {100,300}, and then a grid search is performed to traverse all parameter combinations. Each parameter combination is evaluated using cross-validation to find the best parameter combination {'bootstrap':False,'max_depth':None,'max_features':3,'min_samples_leaf':1,'min_samples_split':2,'n_estimators':300} to obtain the best model. The score of the best model is the best parameter combination that achieves the highest accuracy in cross-validation.

[0102] (5) After using the best model after grid search for prediction, the SHAP (SHapley Additive ex Planations) method is used to calculate and display the degree of influence of the feature (meteorological attribute) on the model prediction results, that is, the Shapley value of the feature.

[0103] See Figure 3 , SHAP feature importance ranking diagram, the horizontal axis represents the average absolute value of the Shapley value, reflecting the magnitude of the feature's impact on the model's prediction results. The larger the Shapley value of the feature, the more significant its impact on the model's prediction results. In this paper, the top five features (meteorological variables) with the greatest impact are the temperature difference between 700 and 500 hPa (T5_T7), convective effective potential (cape), relative helicity of the storm at 0 to 3 km (srh_0_3km), wind speed at 850 hPa (tW_850), and wind speed difference between 700 and 500 hPa (W5_W7). The last two features with the least impact are relative helicity of the storm at 0 to 1 km (srh_0_1km) and maximum radar reflectivity of 10 cm (refl10_max).

[0104] See Figure 4 ,The SHAP summary plot provides a global view by showing the SHAP value of each feature on the model output, that is, understanding how different features affect the predictive behavior of the model.

[0105] See Figure 4 , the horizontal axis represents the Shapley value, which reflects the degree and direction of the feature's impact on the model's prediction. The Shapley value is positive (pushing the predicted value to move in a higher direction) or negative (pushing the predicted value to move in a lower direction).

[0106] The vertical axis lists the features in the dataset, usually sorted by the average impact of the feature on the model's predictions (i.e., the absolute value of the Shapley value), with the most important features at the top. Figure 4 Each point in represents the SHAP value of a feature, that is, the specific impact of the value on the feature on the model prediction. The color of the point represents the actual value of the feature, from low (light color) to high (dark color). The area with more concentrated points indicates that more features are within the Shapley value range defined in this area, which is used to identify the dominant characteristics and patterns of model behavior. In this embodiment, the higher the value of the temperature difference (T5_T7) between the 700 and 500 hPa altitude layers, the higher the predicted value is pushed to move in a higher direction, and the lower the convective effective potential energy (cape) value is, the higher the predicted value is pushed to move in a higher direction.

[0107] See Figure 5, Prediction result explanation diagram, the baseline value (Base Value) defines the predicted output of the model in the absence of any input features. Figure 5 The direction of the arrows in reveals the specific impact of each feature on the prediction result: the right arrow indicates that the increase in the feature value leads to an increase in the predicted value, and the left arrow indicates that the decrease in the feature value causes the predicted value to decrease. The length of the arrow quantifies the magnitude of the feature's impact. In this embodiment, the baseline prediction value f(x) of the grid is 0.062, indicating that the predicted probability of a lightning event is 6.2% without considering any specific feature input. Among them, the temperature difference between the 700 and 500 hPa altitude layers (T5_T7) reduces the probability of a lightning event by 4%, and the near-ground dew point temperature (dew_surf) increases the probability of a lightning event by 1%.

[0108] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A lightning prediction method based on variable resolution SCVT grid and machine learning, characterized by: The specific steps include: (1) Obtain variable-resolution SCVT grid data and reposition the refined area. The specific steps are as follows: After obtaining the variable-resolution SCVT grid data, use the grid_rotate tool to translate and rotate the high-resolution area in the variable-resolution SCVT grid data counterclockwise to the focus area, thereby optimizing the grid positioning; (2) Perform regional cropping on the variable-resolution SCVT grid data after repositioning and refinement to form a limited-area SCVT grid, and generate a grid connectivity file at the same time; the grid connectivity file contains the following information: a. The number of grids, that is, the total number of grid cells in the optimized variable-resolution SCVT grid data; b. Edge information: for each grid cell, describe in detail which adjacent grid cells it is connected to; (3) Perform graph partitioning on the limited area SCVT grid to obtain a graph partitioning information file; (4) Use the MPAS-A model to perform regional meteorological simulation in a limited area SCVT grid, and perform parallel operations based on the graph division information file to obtain the meteorological simulation result file; (5) Convert the meteorological simulation result file output after the meteorological simulation into a polygonal geometric object in vector form and extract the meteorological attributes required for machine learning; (6) Read lightning observation data and convert longitude and latitude coordinates into point geometric objects, traverse all polygonal geometric objects, generate lightning event labels for each polygonal object, and export the attribute table of the polygonal geometric objects with lightning event labels as a data set; wherein the polygonal geometric objects with lightning event labels include polygonal geometric objects with lightning events occurring inside and polygonal geometric objects with no lightning events occurring inside; (7) Perform stratified sampling on the data set to obtain a training set and a test set. Then, perform machine learning training on the training set and test on the test set to obtain the trained model. Finally, after using the trained model for prediction, perform SHAP interpretability analysis to obtain the analysis results of the influence of various meteorological attributes on the model prediction results.

2. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 1 is characterized in that: The following parameters are set in the counterclockwise rotation configuration file: original latitude and original longitude, new latitude and new longitude, and the angle of counterclockwise rotation around the new center from a bird's-eye view; the original latitude and original longitude are the geographic coordinates of the grid center before rotation, and the new latitude and new longitude are the geographic coordinates of the new center after rotation.

3. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 2 is characterized in that: The specific steps of performing regional clipping on the variable-resolution SCVT grid data after repositioning the refined area to form a limited-area SCVT grid and generating a grid connectivity file are as follows: S21, using the pts point file to define the required area shape and obtain an area file; Area shapes include polygons, circles, ellipses, and equatorial channels; The definitions of regional shapes are as follows: polygons are defined by a series of coordinate points arranged counterclockwise, circles are defined by specifying the center and its radius, ellipses are defined by determining the center point, semi-major axis, semi-minor axis, and the rotation angle of the ellipse, and equatorial channels are defined as a channel area extending along the equator, across longitude, and between two latitude points; S22. Regional specification analysis: Analyze the regional file, that is, generate corresponding boundary points according to the regional shape, specifically: S221, polygon: directly read the coordinate points listed in the region file as boundary points; S222, circle: First, initialize an empty list P for storing points on the circumference of the circle, then convert the longitude and latitude coordinates of the center of the circle into Cartesian coordinates, and store the converted Cartesian coordinates of the center of the circle in the center vector C. The conversion is shown in the following formula (1): In formula (1), radius is the average radius of the earth, 6371 kilometers; lon is the longitude of the center of the circle in the region file; lat is the latitude of the center of the circle in the region file; x, y, z are the coordinates of the X, Y, and Z axes in the converted Cartesian coordinate system; Then calculate the points on the circumference of the circle: select a vector perpendicular to the center vector C as the reference of the rotation axis, divide the angle into 100 equal parts in the interval [0,2π], and perform a rotation around the center vector C for each angle r. Each rotation generates a point on the circumference based on the angle r, and the generated boundary points on the circumference are written into the list P in sequence; S223. Ellipse: First, initialize an empty list Q to store points on the circumference of the ellipse. After converting the longitude and latitude coordinates of the center of the ellipse into Cartesian coordinates, the converted Cartesian coordinates are stored in vector C1. A vector orthogonal to vector C1 is selected as the reference of the rotation axis. Then, the boundary points of the ellipse are generated, that is, 100 angles r are equally divided in the interval [0, 2π]. For each angle r, a rotation around vector C1 is performed. Each rotation generates a point based on angle r. The distance from each point to the center of the ellipse is calculated using the semi-major axis and semi-minor axis of the ellipse. The calculation formula is shown in the following formula (2): In formula (2), semi_major represents the semi-major axis, and semi_minor represents the semi-minor axis; Finally, the rotation angle angle of each point is calculated to adjust the point to match the rotation direction of the ellipse. The calculation formula of angle is as follows (3): angle=arctan2(semi_major×cos(r),semi_minor×sin(r)) (3); In formula (3), arctan2 represents the np.arctan2 function; After determining the rotation angle angle of each point, these points are rotated again according to the rotation direction orientation of the ellipse, that is, each point is rotated around the vector C1 with the rotation angle angle and the rotation direction orientation. The boundary points generated after the rotation are written into the list Q in sequence; S224, equatorial channel: generating a list of boundary points of the equatorial channel according to the latitudes of the upper and lower edges of the equatorial channel; S23, marking the internal area: applying the flood filling algorithm to mark the grid cells in the area inside the boundary point, that is, marking the grid cells in the area inside the boundary point as the internal area; S24, transition layer setting and marking: the eight layers of grid outside the boundary points of the region shape are taken as eight transition layers, and each grid cell iCell is first traversed. For each grid cell iCell, it is checked whether it has been marked as part of the internal region or has been classified into a transition layer with a lower number. If the iCell is not marked, that is, it belongs neither to the internal region nor to any marked transition layer, then all grid cells directly adjacent to it are checked. When it is found that any adjacent grid cell has been marked as part of the internal region or belongs to any transition layer before the current layer, then the iCell is marked as the transition layer currently being processed; S25. Generation of subset grids and grid connectivity files: Based on the marking results of the internal area and transition layer, the grids marked as the internal area and transition layer are extracted from the optimized variable resolution SCVT grid data to form a limited area SCVT grid, and the limited area SCVT grid data is saved in NetCDF format, and a grid connectivity file is generated at the same time.

4. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 3 is characterized in that: The limited area SCVT grid is divided into graphs using METIS, that is, after reading the limited area SCVT grid and its grid connectivity file, a multi-level graph division method combining top-down and bottom-up strategies is adopted, as follows: S31, top-down coarsening stage: the limited area SCVT grid is taken as the original image, each grid unit in the limited area SCVT grid is taken as a node, adjacent nodes are selected and merged to form new nodes, the new nodes inherit the adjacency relationship of the original node pairs, the grid graph obtained after each merger is regarded as a new level simplified graph, the new level simplified graph continues to repeat the above steps to merge again, until the number of merged grid units is reduced to a preset threshold, and the final simplified graph is obtained; S32, initial partitioning: on the final simplified graph, perform a recursive bisection method to determine a starting partitioning scheme; S33, bottom-up refinement stage: starting from the final simplified graph, restore the simplified graph to the original graph step by step, and improve and adjust the partitioning on the simplified graph at each level, that is, use a greedy algorithm to identify the nodes on the boundary, and calculate the potential benefits of moving these nodes from the current partition to the adjacent partition, and then select the exchange operation with the largest positive benefit to execute, in order to maintain or improve the balance between partitions while reducing the number of cut edges, and finally repeat this process until the partitioning quality cannot be significantly improved by node exchange, or the predetermined upper limit of the number of iterations is reached, the graph partitioning process is completed, and the graph partitioning information file is obtained.

5. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 4 is characterized in that: The specific steps of using the MPAS-A mode to perform regional meteorological simulation in a limited area SCVT grid and performing parallel calculations based on the graph division information file to obtain the meteorological simulation result file are as follows: S41. First, the limited area simulation is initialized in the MPAS-A mode: the static field data, i.e., terrain height, land cover type, vegetation coverage, and surface reflectivity data are interpolated into the limited area SCVT grid, and a vertical grid is generated to form a three-dimensional grid, i.e., the basic terrain and surface features, as well as the vertical structure of the atmosphere, for the operation of the MPAS-A model are established; S42, horizontally and vertically interpolating the meteorological data at the start time of the simulation onto the three-dimensional grid to provide the MPAS-A model with the initial atmospheric state for simulation; S43, running the MPAS-A model, setting the model time step, the start time of the model simulation and the model output interval, and then performing regional meteorological simulation. During the regional meteorological simulation, parallel calculations are performed according to the graph partitioning information file; After the S44 and MPAS-A model simulation runs, the output is stored in netCDF format as a meteorological simulation result file, which records the meteorological variables of the SCVT grid in a limited area during the simulation.

6. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 5 is characterized in that: The limited area SCVT grid includes multiple meteorological variables during the simulation period, and 19 meteorological variables are selected from the multiple meteorological variables as meteorological attributes. The 19 meteorological variables are two-meter temperature t2m, two-meter specific humidity q2, convective effective potential energy cape, convective inhibition cin, storm relative helicity srh_0_1km at an altitude of 0 to 1 km, storm relative helicity srh_0_3km at an altitude of 0 to 3 km, 10 cm maximum radar reflectivity refl10_max, 1km Radar reflectivity at AGL refl10_1km, temperature at 500 hPa layer tem_500hPa, temperature at 700 hPa layer tem_700hPa, temperature at 850 hPa layer 850tem_850hPa, dew point temperature at 850 hPa layer dew_850hPa, dew point temperature at 925 hPa layer dew_925hPa, dew point temperature near the ground dew_surf, wind speed at 850 hPa layer tW_850, wind speed at 700 hPa layer tW_700, wind speed at 500 hPa layer tW_500, wind speed difference between 700 and 500 hPa layer W5_W7, temperature difference between 700 and 500 hPa layer T5_T7; the above 19 meteorological variables are numbered 1 to 19.

7. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 6 is characterized in that: The specific steps of converting the meteorological simulation result file output after the meteorological simulation into a polygonal geometric object in vector form and extracting the meteorological attributes required for machine learning are as follows: S51, read data and initialize basic storage structure: first use NetCDF4 library to read meteorological simulation result file, and define two empty lists: 'polygons = []' and 'attr = []', the 'polygons = []' list is used to store the generated polygon geometry objects, and the 'attr = []' list is used to store the attribute dictionary corresponding to each polygon geometry object; S52, traversing vertex indexes: using the enumerate function to traverse the vertex index array vertices_on_cell of all grid cells in the meteorological simulation result file, obtaining the vertex index set cell_vertices of each grid cell and its index position in the vertex index array, as shown in the following formula (4): for i,cell_vertices in enumerate(vertices_on_cell) (4); In formula (4), enumerate is a Python built-in function, which is used to combine iterable vertex index arrays into an index sequence; for i, cell_vertices in enumerate(vertices_on_cell) represents the use of the enumerate function to traverse vertices_on_cell based on a for loop, i is the counter or index of the current iteration, and its value is automatically generated by the enumerate function. cell_vertices is the vertex index set of each grid cell, and its index position in the vertex index array is i. The meteorological attributes are accessed according to the index position in the future. S53, extract vertex coordinates and generate polygonal geometric objects: For each vertex index set cell_vertices, extract the valid longitude and latitude coordinate pairs, as shown in the following formula (5): coords=[(x [v-1] ,y [v-1] )for v in cell_vertices if v>0] (5); In formula (5), coords is the generated list containing the longitude and latitude coordinate pairs of all vertices of each grid cell, x is the longitude array, and y is the latitude array; Formula (5) represents traversing each vertex index v in vertices_on_cell and performing the following steps: S531, conditional filtering: excluding invalid vertex indexes through filtering condition if v>0, ensuring that only valid data is processed; S532, Index adjustment: Since the vertex index in the NetCDF dataset starts from 1, and the index of the Python array starts from 0, perform the v-1 operation on each vertex index to correctly access the longitude and latitude values ​​in the vertex index array; S533, coordinate extraction: For each vertex index v that meets the conditions, extract the coordinate pair (x [v-1] ,y [v-1] ) is written into the coordinate pair list coords, and the extracted coordinate pair list coords is used to create a polygon geometry object through the Polygon class of the shapely library. The specific operation is shown in the following formula (6): poly = Polygon(coords) (6); In formula (6), the vertices in coords are connected clockwise or counterclockwise to form a closed polygonal geometric object poly; S54, construct a meteorological attribute dictionary: for each vertex index set cell_vertices, create an attribute dictionary attributes, the attribute dictionary attributes contains meteorological attribute names and corresponding data values, and is defined as shown in the following formula (7): attributes={key1:value1,key2:value2,key3:value3...key 19 :value 19 } (7); In formula (7), key1 to key 19 Corresponding to the meteorological variables numbered 1 to 19, as the names of meteorological attributes; values ​​from value1 to value 19 are the corresponding data values ​​of each meteorological attribute; S55. During the traversal process, the polygon geometry objects and the corresponding meteorological attribute dictionary attributes generated in each iteration are written into the polygons and attr lists respectively, ensuring that the position of each polygon geometry object in the polygons list matches the position of its corresponding meteorological attribute data in the attr list. At the same time, a GeoDataFrame is created and the two lists are saved in Shapefile format.

8. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 7 is characterized in that: The specific steps of reading lightning observation data and converting longitude and latitude coordinates into point geometric objects, traversing all polygonal geometric objects, generating lightning event labels for each polygonal object, and exporting the attribute table of the polygonal geometric objects with lightning event labels as a data set are as follows: S61. Read lightning observation data and convert longitude and latitude coordinates into point geometry objects: First, read the lightning observation data and use the read_csv function of the pandas library to read the lightning location data from the CSV file. The lightning location data contains the longitude and latitude information of each lightning event. Then, coordinate conversion is performed to convert the longitude and latitude coordinates of each lightning event into a point geometry object, thereby forming a list of longitude and latitude tuples, each of which corresponds to a specific geographical location of a lightning event; Finally, a point object list is generated, as shown in the following formula (8): geometry=[Point(xy)for xy in zip(df_lightning.longitude,df_lightning.latitude)] (8); In formula (8), geometry represents a list of point geometry objects generated by longitude and latitude coordinates; Point is a class in the shapely.geometry module, which is used to create point geometry objects; xy is a temporary variable representing the tuple of longitude and latitude returned from the zip function. The zip function pairs the longitude column and the latitude column in the df_lightning data frame to generate an iterator of tuples. Formula (8) represents xy being passed to the constructor of the Point class to create a point geometry object. S62, traversing the polygonal geometric objects, and for each polygonal geometric object, using the within method to check whether the point geometric object of the lightning event is located within the polygonal geometric object; The processing flow of the within method is: First, traverse the point geometry objects, and for each point geometry object in the df_lightning database, use the ray method to determine whether the point geometry object is inside the polygon geometry object. The ray method is to draw a ray from the point geometry object and calculate the number of intersections between the ray and the boundary of the polygon geometry object. When the number of intersections is an odd number, the point geometry object is inside the polygon geometry object, and when the number of intersections is an even number, the point geometry object is outside the polygon geometry object. Then the result is returned. For each point geometry object, the within method returns a Boolean value, indicating whether the point geometry object is inside the polygon geometry object. The within method is used to check the point geometry objects of all lightning events to generate a Boolean value sequence. S63. Mark the polygonal geometric objects of the lightning events. According to the judgment result of the within method, add a new field occurred to each polygonal geometric object to mark whether a lightning event has occurred in the polygonal geometric object. The value 1 indicates that it has occurred, and the value 0 indicates that it has not occurred. Finally, export the attribute table with the new field occurred as a data set. The data set includes the meteorological attributes of each polygonal geometric object and the lightning label field occurred.

9. The lightning prediction method based on variable resolution SCVT grid and machine learning according to claim 8 is characterized in that: The data set is stratified sampled to obtain a training set and a test set, and then the training set is trained by machine learning, and the test set is tested to obtain a trained model. Finally, after the trained model is used for prediction, SHAP interpretability analysis is performed to obtain the analysis results of the influence of various meteorological attributes on the model prediction results. The specific steps are: S71. First, determine the proportion of each category in the data set: the data set contains N samples, and the number of samples of category k is N k , then the target proportion p of category k k Calculated by the following formula: The StratifiedKFold function is used to perform stratified sampling on the data set. In each segmentation process of the StratifiedKFold function, the data set is divided into K subsets, and the proportion of each category in each subset is close to p. k ; For each class k, there are m classes of that class in a particular fold k samples, N / K is the theoretical number of samples per fold, since in practice m k It must be an integer. The rounding method is used to ensure that the actual number of samples in each fold is close to the theoretical value. At the same time, the total number of samples of the same category in all folds is equal to the number of samples of the category in the entire data set, thereby obtaining the training set and test set. S72. Use the random forest method to perform machine learning training on the model, and use grid search to adjust the parameters of the random forest classifier to optimize model performance. The grid search specifically defines a parameter grid, which includes the various parameters of the random forest classifier and the search value range, the maximum depth of the tree max_depth, the number of features considered for optimal segmentation max_features, the minimum number of samples required to split internal nodes min_samples_split, the minimum number of samples required on leaf nodes min_samples_leaf, whether to use bootstrap samples, and the number of trees in the forest n_estimators. Then perform a grid search, traverse all parameter combinations, use cross-validation to evaluate each parameter combination, and obtain the best model. The score of the best model is to use the best parameter combination to obtain the highest accuracy in cross-validation. S73. After using the best model confirmed by grid search for prediction, the SHAP method is used to calculate and display the influence of meteorological attributes on the model prediction results, that is, the Shapley value; the calculation formula of the Shapley value is shown in the following formula (9): In formula (9), is the Shapley value; N is the set of all meteorological attributes, and S is a subset of N; is a weight term, which indicates the average impact of feature i added to S on the prediction result; model V(S∪{X i }) and V(S) represent the input variables X i The training is performed with and without input variables; the larger the Shapley value, the more important the meteorological attribute is to the model prediction results.