A method and device for constructing urban meteorological gridding data based on spatial interpolation
By constructing a gridded urban meteorological data system based on spatial interpolation, and utilizing KD-tree indexing and Kriging interpolation, the problems of regional differences in precipitation and uneven distribution of base stations in urban meteorological monitoring were solved, achieving high-precision and efficient meteorological data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2025-07-09
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional Kriging interpolation methods cannot accurately characterize regional differences in precipitation in urban meteorological monitoring, and it is difficult to construct a suitable variogram function in areas with sparse base stations, resulting in data loss and low computational efficiency.
A spatial interpolation-based urban meteorological gridded data construction method is adopted. Through meteorological data clustering, zonal interpolation and regional boundary point interpolation, KD tree indexing and Kriging interpolation methods are used, combined with global and regional variograms to perform data imputation and smoothing.
It improves the forecasting accuracy and computational efficiency of urban meteorological data, adapts to the meteorological characteristics of different regions, ensures the smoothness of interpolation results at the boundary line, and solves the problems of uneven base station distribution and data loss.
Smart Images

Figure CN120873644B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of urban meteorological data processing and spatial information computing technology, specifically relating to a method and apparatus for constructing urban meteorological gridded data based on spatial interpolation. Background Technology
[0002] Due to its high spatiotemporal resolution and all-weather observation capabilities, BeiDou meteorological inversion technology has become a key tool for urban meteorological monitoring. By inverting atmospheric precipitable water (PWV), the BeiDou Navigation Satellite System enables minute-level water vapor monitoring in urban areas, providing crucial data support for extreme weather warnings. Currently, the accuracy and real-time performance of BeiDou PWV inversion technology have significantly improved, with a correlation coefficient of up to 0.98 with radiosonde data, meeting the high-precision requirements of meteorological operations. Furthermore, the integration of deep learning models further enhances data processing efficiency and forecast accuracy, promoting the widespread application of BeiDou meteorological inversion technology in urban extreme weather monitoring.
[0003] Because satellite base stations are unevenly distributed and the data received by each base station may be incomplete, data preprocessing is required. Interpolation can help fill in missing data and smooth the data, transforming the unevenly distributed base station data into a data format suitable for subsequent model training.
[0004] Kriging interpolation is a widely used interpolation method with relatively good performance. The basis of Kriging interpolation is the spatial correlation of the data to be interpolated; this method assumes that things that are spatially close have more similar attribute values (spatial autocorrelation). Kriging uses a variogram to quantify and model this spatial autocorrelation. Taking precipitation as an example, Kriging interpolation assumes that locations closer together have similar precipitation amounts. However, due to the influence of topography, airflow, and the urban heat island effect, two nearby locations may have significantly different precipitation amounts. Traditional Kriging methods cannot accurately characterize this regional difference in precipitation; while local Kriging can fit the local characteristics of the data, the determination of its neighborhood window size depends on experience. If the window is too large, it will introduce variation patterns from unrelated areas; if the window is too small, the number of sample points in the neighborhood will be insufficient, leading to unstable or failed fitting of the variogram.
[0005] Meanwhile, due to varying base station densities, in sparsely populated areas, there may be a lack of sufficient sample points, making it difficult to construct a suitable mutation function. Furthermore, in densely populated areas, the Kriging method's advantages over other methods may not be significant, and its computational complexity may result in slower speeds. Summary of the Invention
[0006] In view of this, the present invention provides a method and apparatus for constructing urban meteorological gridded data based on spatial interpolation, which fully adapts to the spatial correlation of precipitation data and the distribution characteristics of base stations, can fill in missing data, realize the construction of urban meteorological gridded data, and improve the accuracy of precipitation forecasting.
[0007] The technical solution for implementing the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for constructing urban meteorological gridded data based on spatial interpolation, the specific process of which is as follows:
[0009] Meteorological data clustering: The region is divided into several grids, and a KD-tree spatial index is established based on the base station locations; for each grid, a neighborhood radius is determined, and the measured meteorological data of the base stations within the neighborhood radius, i.e., sample points, are obtained based on the KD-tree spatial index; a distance matrix is constructed based on the Euclidean distance of the meteorological data; based on the distance matrix, density-connected sample point clusters are identified to achieve initial clustering partitioning; based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering;
[0010] Regional interpolation: Based on the clustering results of meteorological data, the region is spatially divided and processed. The number of base stations in each region is counted, and the region type is determined based on the spatial distribution density of the base stations. The global variogram function and the regional variogram function for each region are determined. Based on the variogram function, the corresponding Kriging interpolation method is used to calculate the estimated value of the interpolation point for different region types.
[0011] Regional boundary point interpolation: For points near the boundary lines of different regions, interpolation is performed using meteorological data from base stations in the relevant regions;
[0012] Ultimately, the construction of urban meteorological gridded data based on spatial interpolation was achieved.
[0013] Optionally, the meteorological data described in this invention may be: atmospheric precipitable water volume (PWV), temperature, humidity, air pressure, or other spatially correlated meteorological data.
[0014] Optionally, the objective function of this invention is:
[0015]
[0016] Where K is the number of clusters, C i Let z be the i-th cluster, representing meteorological data (samples) at position x, and μ be the position of the sample. i For clustering C i The mean of meteorological data, α is the spatial weighting factor, dist(x,C) i (x) represents the distance from position x to cluster C. i The Euclidean distance from the center;
[0017] By iteratively adjusting the sample affiliation to minimize the objective function J, the optimal partitioning result of clustering is achieved.
[0018] Optionally, the present invention sets the update interval for dynamically adjusting clustering as follows:
[0019]
[0020] Among them, T update For the update interval, D weather V is a characteristic scale of large-scale weather systems. front This represents the movement speed of large-scale weather systems.
[0021] Optionally, the present invention counts the number of base stations in each region and calculates the spatial distribution density of base stations, and divides the region into three types based on the density distribution: first, insufficient base station region; second, moderate number region; and third, high density region.
[0022] Optionally, the regional variogram function described in this invention is:
[0023] Extract the measured meteorological data from all base stations within region k, group them according to the distance between the base stations, and count the number of sample pairs N(h) in each distance group; calculate the semivariance γ. k (h):
[0024]
[0025] Where z(x) i ) and z(x i +h) represent the positions x and x, respectively. i and x i Meteorological data at +h;
[0026] Plot the experimental variability curve: with distance h as the horizontal axis and experimental semivariance γ... k Using (h) as the vertical axis, a scatter plot is drawn to obtain the experimental variability curve for region k;
[0027] Construct an exponential model, and adjust the model parameters to make the exponential model curve similar to the experimental variogram curve. The exponential model obtained at this time is denoted as the regional variogram.
[0028] Optionally, the global variogram described in this invention is: extracting the measured meteorological data values of all base stations in the entire region, and obtaining the experimental variogram curve of the entire region according to the method of obtaining the regional variogram;
[0029] Construct a Gaussian model, and adjust the model parameters to make the Gaussian model curve similar to the experimental variogram curve. The Gaussian model obtained at this time is denoted as the global variogram.
[0030] Optionally, for areas with a moderate number of base stations, the present invention uses the regional kriging interpolation method and performs interpolation calculations using the regional variogram; for areas with insufficient base stations, the invention uses the dual-scale kriging interpolation method and performs interpolation calculations using both the global variogram and the regional variogram; for high-density areas, the invention uses the regional kriging interpolation method and performs interpolation calculations using the regional variogram, or uses the IDW algorithm to estimate meteorological data for missing areas.
[0031] Optionally, the IDW algorithm described in this invention estimates the meteorological data for the missing area as follows:
[0032]
[0033] in, It is the estimated value of the interpolation point x0; z(x i ) represents the actual meteorological data for the i-th sample point; d i is the distance between the interpolation point x0 and the i-th sample point; p is the distance decay exponent.
[0034] Optionally, the interpolation value of the boundary point of the region in this invention is:
[0035]
[0036] in, Point x near the boundary line of different partitions b Interpolation estimate at k b Is with x b The associated set of partitions; x represents b Distance to the reference point within partition k; It is the variogram of partition k at distance The reciprocal of the value at that point, It is the sum of the reciprocals of the variograms of all associated partitions; It is x b Interpolation estimate in partition k.
[0037] Secondly, the present invention provides an urban meteorological gridded data construction device based on spatial interpolation, comprising:
[0038] The meteorological data clustering module is used to divide the region into several grids and establish a KD-tree spatial index based on the base station locations. For each grid, a neighborhood radius is determined, and the measured meteorological data of the base stations within the neighborhood radius, i.e., sample points, are obtained based on the KD-tree spatial index. A distance matrix is constructed based on the Euclidean distance of the meteorological data. Based on the distance matrix, clusters of sample points with density connections are identified to achieve initial clustering partitioning. Based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering.
[0039] The partitioned interpolation module performs spatial division and processing of regions based on meteorological data clustering results, counts the number of base stations in each region, and determines the region type based on the spatial distribution density of base stations; it determines the global variogram function and the regional variogram function for each region, and calculates the estimated value of the interpolation point based on the corresponding Kriging interpolation method for different region types based on the variogram function.
[0040] The regional boundary point interpolation module uses meteorological data from base stations in the boundary areas to interpolate points near the boundary lines of different regions.
[0041] Beneficial effects:
[0042] First, this invention, based on cluster analysis, can fully adapt to the spatial correlation of meteorological elements and the distribution characteristics of base stations. It is suitable for solving the problem of insufficient meteorological forecast accuracy caused by uneven distribution of observation stations and missing data in urban environments. It can fill in missing data and perform data smoothing, converting unevenly distributed base station data into a data format suitable for subsequent model training.
[0043] Secondly, this invention can automatically divide the meteorological elements (such as precipitation) regions across the country, and use different models for interpolation fitting for different meteorological regions, fully taking into account the spatial characteristics of meteorological elements in different regions.
[0044] Third, this invention uses base station data from different regions to interpolate points near the boundary lines of different areas, and then weights the results to obtain the final result, which makes the interpolation results at the boundary lines smoother.
[0045] Fourth, when the number of base stations is insufficient, the present invention adopts a weighted method of global kriging and regional kriging to avoid the instability problem of regional kriging when the number of base stations is insufficient.
[0046] Fifth, when the base station density is high, the present invention can use the IDW method for fast calculation, which improves interpolation efficiency while ensuring spatial smoothness. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0049] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0050] It should be noted that, in the absence of conflict, the following embodiments and features can be combined with each other; and, based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0051] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0052] like Figure 1 As shown in the figure, this application provides a method for constructing urban meteorological gridded data based on spatial interpolation. The method includes the following steps:
[0053] Meteorological data clustering: The region is divided into several grids, and a KD-tree spatial index is established based on the base station locations; for each grid, a neighborhood radius is determined, and the measured meteorological data of the base stations within the neighborhood radius, i.e., sample points, are obtained based on the KD-tree spatial index; a distance matrix is constructed based on the Euclidean distance of the meteorological data; based on the distance matrix, density-connected sample point clusters are identified to achieve initial clustering partitioning; based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering;
[0054] Regional interpolation: Based on the clustering results of meteorological data, the region is spatially divided and processed. The number of base stations in each region is counted, and the region type is determined based on the spatial distribution density of the base stations. The global variogram function and the regional variogram function for each region are determined. Based on the variogram function, the corresponding Kriging interpolation method is used to calculate the estimated value of the interpolation point for different region types.
[0055] Regional boundary point interpolation: For points near the boundary lines of different regions, interpolation is performed using meteorological data from base stations in the relevant regions;
[0056] Ultimately, the construction of urban meteorological gridded data based on spatial interpolation was achieved.
[0057] The above process will be explained in detail below:
[0058] 1. Construct a spatial dataset based on the base station's latitude and longitude, and the corresponding measured meteorological factors such as atmospheric precipitable water volume (PWV), temperature, humidity, and air pressure. Steps 2-10 below will be explained in detail using atmospheric precipitable water volume (PWV) as an example. It should also be noted that the following steps are also applicable to meteorological data such as temperature, humidity, and air pressure.
[0059] 2. Spatial Constraints and Dynamic Optimization in PWV Clustering Analysis
[0060] To achieve accurate segmentation of regions with similar meteorological characteristics, this step follows the logic of "efficiency framework construction → cluster optimization → dynamic adaptation," integrating PWV numerical similarity and spatial continuity constraints, and combining computational efficiency optimization and dynamic update mechanisms to complete clustering. Specifically, it includes the following sub-steps:
[0061] 2.1 Optimization of computational efficiency
[0062] A hierarchical clustering architecture is built and a spatial index is introduced to provide an efficient computational foundation for subsequent clustering:
[0063] (1) Coarse division of geographic grids: The study area is divided into several grids at a macro scale, and the sample similarity is initially calculated only within the grid to reduce invalid cross-regional calculations.
[0064] (2) KD tree index construction: A KD tree spatial index is built for all base station coordinates to realize the fast retrieval of the nearest neighbor of the target sample, which speeds up the subsequent distance calculation.
[0065] (3) In-grid fine clustering preparation: Initialize the OPTICS algorithm parameters (neighborhood radius ε, minimum number of neighborhood samples MinPts) in each grid, and construct the distance matrix based on the Euclidean distance of the PWV value to adapt to the scenario of uneven base station density.
[0066] 2.2 Spatial Continuity Constraint Optimization
[0067] Based on the efficient computational framework in step 2.1, the spatial rationality of the clustering results is optimized through the objective function:
[0068] (1) Initial cluster generation: Run the OPTICS algorithm within each grid to identify clusters of density-connected sample points based on the PWV numerical distance matrix, and output the initial cluster partitions.
[0069] (2) Objective function construction and optimization: For the initial partitioning, an objective function with a fusion spatial penalty term is constructed to ensure the spatial continuity of the clustering results. The formula is as follows:
[0070]
[0071] Where K is the number of clusters, C iFor the i-th cluster, PWV x Let μ be the PWV value at position x. i For clustering C i The mean PWV, where α is the spatial weighting factor, dist(x,C) i (x) represents the distance from position x to cluster C. i The Euclidean distance to the center; by iteratively adjusting the sample affiliation to minimize the objective function J, the clustering results simultaneously satisfy PWV numerical similarity and spatial concentration, avoiding unreasonable spatially discrete clustering. Output optimized partitions.
[0072] 2.3 Time-varying update mechanism
[0073] (1) Calculation of update interval:
[0074] The update frequency of clustering results is dynamically adjusted based on changes in large-scale weather systems. The formula for calculating the update interval is as follows:
[0075]
[0076] Among them, T update For the update interval, D weather V is a characteristic scale of large-scale weather systems. front This represents the movement speed of large-scale weather systems; when the movement speed of large-scale weather systems is relatively fast, it is based on the minimum interval T. min Update the clustering results; when the large-scale weather system is stable, update according to the calculated larger interval to achieve dynamic adaptation of the clustering results, but the maximum time interval shall not exceed T. max .
[0077] (2) Dynamic reconstruction: When the update interval is reached, steps 2.1 and 2.2 are re-executed to generate new partition results.
[0078] Through the above process, PWV clustering partitions that combine computational efficiency, spatial rationality, and temporal dynamics are output, providing a reliable foundation for subsequent meteorological data gridding.
[0079] The above process is based on PWV data and uses cluster analysis (other machine learning methods can also be used) to adaptively classify base stations across the country, grouping base stations with similar PWV data characteristics into the same category, and dividing precipitation areas according to the PWV classification results.
[0080] 3. Based on the clustering results of PWV, the precipitation area is spatially divided.
[0081] 4. Morphological filtering is used to process the precipitation area division results, eliminating areas that are too small, filling in area holes, and removing noise interference.
[0082] 5. Count the number of base stations in each region and calculate the spatial distribution density of base stations. Divide the regions into three types: First, areas with insufficient base stations; second, areas with a moderate number of base stations; and third, high-density areas.
[0083] 6. Using Kriging interpolation as the basic interpolation method, the regional variability function and global variability function of each region are calculated through spatial correlation analysis to determine the parameters of the Kriging interpolation model.
[0084] 6.1 Regional variogram
[0085] (1) Calculate the experimental variability function
[0086] Data preparation: Extract the measured values of meteorological elements from all base stations within region k, and record the coordinates of each base station.
[0087] Distance grouping: Calculate the distance h between all pairs of base stations in the partition, and group them according to the distance range (e.g., 0-10km, 10-20km, etc.). Count the number of sample point pairs N(h) in each distance group.
[0088] Calculate the semivariance γ k (h): For each distance group, use the formula
[0089]
[0090] Calculate the experimental semivariance (i.e., the experimental variogram value), z(x i ) and z(x i +h) represent the positions x and x, respectively. i and x i The meteorological element value at +h; the formula as a whole represents half the average of the squares of the differences in meteorological element values at a distance of h, reflecting the degree of spatial variation of meteorological elements with distance.
[0091] Plot the experimental variability curve: with distance h as the horizontal axis and experimental semivariance γ... k Using (h) as the vertical axis, a scatter plot is drawn to obtain the experimental variability curve for region k.
[0092] (2) Model Fitting
[0093] Due to the exponential model This model can effectively simulate the characteristics of regional meteorological elements, therefore it was chosen to fit the experimental variogram curve. k (h) represents the model variability function value in partition k at a distance of h; c k It is the sill value, representing the maximum degree of variability of meteorological elements within that region; a kIt is a range, reflecting the spatial autocorrelation range of meteorological elements. When the distance exceeds a... k At that time, the autocorrelation of meteorological elements weakened significantly. Through optimization algorithms such as the least squares method, a was adjusted... k and c k The value is used to make the scatter points of the theoretical model curve and the experimental variogram as close as possible.
[0094] 6.2 Global Mutation Function
[0095] The method for determining the global variogram is the same as that for the regional variogram; however, the calculation of the global variogram is performed on a global scale. Furthermore, a Gaussian model is selected for model fitting.
[0096] 7. For areas with moderate quantities, use the regional kriging interpolation method and perform interpolation calculations using the regional variogram.
[0097]
[0098] in, It is the estimated value of the interpolation point x0; λ i It is the i-th known sample point x i The weights are calculated using the Kriging equations and satisfy the conditions of unbiasedness and minimum variance; z(x i ) is the actual meteorological element value of the i-th sample point; by weighted summation of the known sample points, the estimated value of the point to be interpolated is obtained.
[0099] 8. For areas with insufficient base stations, a two-scale Kriging interpolation method is used. Based on the geographical coordinates (latitude and longitude) of the base stations and the measured environmental data, interpolation calculations are performed simultaneously using a global variogram and a regional variogram, and the weighted average is used to obtain the final interpolation result, filling in the missing data.
[0100]
[0101] in, It is the estimated value of the interpolation point x0. It is the estimated value of the interpolation point obtained using the global mutation function, w G It is its corresponding weight; It is the estimated value of the interpolation point obtained using the regional variogram, w k This refers to its weights. This hybrid weighted model integrates global and regional meteorological information, improving interpolation accuracy in areas with insufficient base stations.
[0102] Weights can be obtained through optimization methods, such as the least squares method:
[0103]
[0104] Constraints:
[0105] w G +w k =1
[0106] This formula is used to optimize the weights w in a mixed weighted model. G and w k (collectively referred to as w). m is the number of sample points used to optimize the weights, z(x i ) represents the actual meteorological element value of the i-th sample point. This is the estimated value of the sample point obtained through a mixed weighted model. The goal of the formula is to minimize the sum of squared errors between the estimated and actual values, while satisfying w. G +w k The constraint condition = 1 is used to obtain the optimal weight combination and improve the accuracy of interpolation.
[0107] 9. For high-density areas, the regional kriging interpolation method can be used, following the method in step 7, to perform interpolation calculations using the regional variogram.
[0108] Meanwhile, during rapid calculations, the IDW algorithm can also be used to estimate environmental data in missing regions. This method does not require fitting a variogram function, has high computational efficiency, and is suitable for scenarios where observation points are dense but unevenly distributed.
[0109] (i ranges from 1 to n, p = 2)
[0110] in, z(x) is the estimated value of the interpolation point x0; n is the number of known sample points involved in the calculation; z(x) is the estimated value of the interpolation point x0. i ) represents the actual meteorological element value of the i-th sample point; d i is the distance between the interpolation point x0 and the i-th sample point; p is the distance decay exponent, where closer sample points have greater weight. The formula quickly obtains the estimated value of the interpolation point by weighting the meteorological element values of the sample points according to distance, thus improving computational efficiency.
[0111] In scenarios where observation points are dense but unevenly distributed, the IDW method is introduced to improve interpolation efficiency while ensuring spatial smoothness.
[0112] 10. For points near the boundary of different regions, interpolate using base station data from different regions and weight them to obtain the final result.
[0113]
[0114] This formula is used to calculate the point x near the boundary line between different zones. b Interpolation estimate at point k b Is with xb The associated set of partitions; x represents b Distance to the reference point within partition k; It is the variogram of partition k at distance The reciprocal of the value at x reflects the partition's relevance to x. b The degree of impact; It is the sum of the reciprocals of the variograms of all associated partitions; It is x b Interpolated estimates in partition k. By weighted summation of the effects of each associated partition, the interpolation results near the boundary line are ensured to transition smoothly, improving the continuity of the entire gridded data field.
[0115] The embodiments of this application can also provide a variety of interpolation functions and error evaluation mechanisms, allowing users to choose the optimal interpolation strategy in different meteorological scenarios.
[0116] This application provides an embodiment of an urban meteorological gridded data construction device based on spatial interpolation, comprising:
[0117] The meteorological data clustering module is used to divide the region into several grids and establish a KD-tree spatial index based on the base station locations. For each grid, a neighborhood radius is determined, and the measured meteorological data of the base stations within the neighborhood radius, i.e., sample points, are obtained based on the KD-tree spatial index. A distance matrix is constructed based on the Euclidean distance of the meteorological data. Based on the distance matrix, clusters of sample points with density connections are identified to achieve initial clustering partitioning. Based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering.
[0118] The partitioned interpolation module performs spatial division and processing of regions based on meteorological data clustering results, counts the number of base stations in each region, and determines the region type based on the spatial distribution density of base stations; it determines the global variogram function and the regional variogram function for each region, and calculates the estimated value of the interpolation point based on the corresponding Kriging interpolation method for different region types based on the variogram function.
[0119] The regional boundary point interpolation module interpolates points near the boundary lines of different regions using meteorological data from base stations in the relevant regions.
[0120] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing urban meteorological gridding data based on spatial interpolation, characterized in that, The specific process is as follows: Meteorological data clustering: The region is divided into several grids, and a KD-tree spatial index is established based on the base station locations; for each grid, a neighborhood radius is determined, and the measured meteorological data of the base stations within the neighborhood radius, i.e., sample points, are obtained based on the KD-tree spatial index; a distance matrix is constructed based on the Euclidean distance of the meteorological data; based on the distance matrix, density-connected sample point clusters are identified to achieve initial clustering partitioning; based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering; Regional interpolation: Based on the clustering results of meteorological data, the region is spatially divided and processed. The number of base stations in each region is counted, and the region type is determined based on the spatial distribution density of the base stations. The global variogram function and the regional variogram function for each region are determined. Based on the variogram function, the corresponding Kriging interpolation method is used to calculate the estimated value of the interpolation point for different region types. Regional boundary point interpolation: For points near the boundary lines of different regions, meteorological data from base stations in the boundary areas are used for interpolation; Ultimately, the construction of urban meteorological gridded data based on spatial interpolation was achieved; The number of base stations in each region is counted, and the spatial distribution density of base stations is calculated. Based on the density distribution, three region types are defined: first, insufficient base station areas; second, areas with a moderate number of base stations; and third, high-density areas. The region variation function is as follows: Extraction region The weather data measured values of all base stations are grouped according to the distance between base stations, and the number of sample pairs in each distance group is counted ; Calculate semi-variance : wherein, and are weather data at locations and respectively. Plot the experimental variogram curve: plot the scatter plot with distance as the horizontal axis and experimental semivariance as the vertical axis to obtain the experimental variogram curve for the area ; Construct an exponential model, and adjust the model parameters to make the exponential model curve similar to the experimental variogram curve. The exponential model obtained at this time is denoted as the regional variogram.
2. The method of claim 1, wherein the method further comprises: The objective function is: in, For the number of clusters, For the first One cluster, Meteorological data, i.e., samples, For clustering The average of meteorological data, Spatial weighting factor, For the sample To clustering The Euclidean distance from the center; minimizing an objective function by iteratively adjusting sample assignments to achieve optimal partitioning of the PWV cluster output.
3. The method of claim 2, wherein the method further comprises: Set the update interval for dynamically adjusting clustering as follows: wherein is an update interval, is a characteristic scale of the large-scale weather system, is a large-scale weather system movement speed.
4. The method of claim 1, wherein the method further comprises: The global variogram is obtained by extracting the measured meteorological data of all base stations in the entire region and obtaining the experimental variogram curve of the entire region according to the method of obtaining the regional variogram. Construct a Gaussian model, and adjust the model parameters to make the Gaussian model curve similar to the experimental variogram curve. The Gaussian model obtained at this time is denoted as the global variogram.
5. The method of claim 4, wherein the method further comprises: For areas with a moderate number of base stations, the regional kriging interpolation method is used, with interpolation calculations performed using the regional variogram. For areas with insufficient base stations, the dual-scale kriging interpolation method is used, with interpolation calculations performed simultaneously using the global variogram and the regional variogram. For high-density areas, the regional kriging interpolation method is used, with interpolation calculations performed using the regional variogram, or the IDW algorithm is used to estimate meteorological data for missing areas.
6. The method of claim 5, wherein the method further comprises: The IDW algorithm estimates the meteorological data for the missing areas as follows: wherein, is an estimated value of the point to be interpolated; is actual meteorological data of the th sample point; is a distance between the point to be interpolated and the th sample point; is a distance decay exponent.
7. The method of claim 1, wherein the method further comprises: The interpolation value of the region boundary points is: wherein is an interpolated estimate of the value of the function at a point near the intersection of the different partitions, is a set of partitions associated with ; denotes the distance to a reference point within a partition ; is the inverse of the value of the variogram function of the partition at the distance , is the sum of the inverses of the variogram functions of all associated partitions; is an interpolated estimate of the value of the function in the partition . 8.A device for constructing urban meteorological gridded data based on spatial interpolation, characterized in that, include: The meteorological data clustering module is used to divide the region into several grids and build a KD tree spatial index based on the base station location; For each grid, a neighborhood radius is determined, and the measured meteorological data of the base station within the neighborhood radius, i.e., sample points, is obtained based on the KD tree spatial index. A distance matrix is constructed based on the Euclidean distance of the meteorological data. Based on the distance matrix, the density-connected sample point clusters are identified to achieve initial clustering partitioning. Based on the initial partitioning results, partitioning optimization is performed using an objective function to achieve meteorological data clustering; The partitioned interpolation module performs spatial division and processing of regions based on meteorological data clustering results, counts the number of base stations in each region, and determines the region type based on the spatial distribution density of base stations; it determines the global variogram function and the regional variogram function for each region, and calculates the estimated value of the interpolation point based on the corresponding Kriging interpolation method for different region types based on the variogram function. The regional boundary point interpolation module interpolates points near the boundary lines of different regions using meteorological data from base stations in the boundary areas. The number of base stations in each region is counted, and the spatial distribution density of base stations is calculated. Based on the density distribution, three region types are defined: first, insufficient base station areas; second, areas with a moderate number of base stations; and third, high-density areas. The region variation function is as follows: Extraction region The weather data measured values of all base stations are grouped according to the distance between base stations, and the number of sample pairs in each distance group is counted ; Calculate semi-variance : in, and They are the locations and Meteorological data at the location; Plot the experimental variability curve: using distance The horizontal axis represents the experimental semivariance. Plot a scatter plot with the vertical axis as the ordinate to obtain the region. The experimental variogram curve; Construct an exponential model, and adjust the model parameters to make the exponential model curve similar to the experimental variogram curve. The exponential model obtained at this time is denoted as the regional variogram.