Surface wind speed data gridding method based on image inpainting deep learning model

CN123015276APending Publication Date: 2026-10-30YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610120556.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

针对传统插值法的各类缺陷——全局插值法对异常值敏感、局部细节捕捉弱,局部插值法在站点稀疏区域易产生同心圆状异常值且适配复杂地形能力差,地学统计法计算复杂、泛化能力弱且对数据分布要求高,同时各类传统插值法均不适用于高缺失率场景的问题,本发明可实现全面优化;针对现有随机森林等传统机器学习插补法在高缺失率数据集下插补效果差、甚至无法完成插补的局限,本发明通过将图像修复深度学习模型应用于地表风速数据插补,借助学习模式数据集或再分析数据集网格间的空间自相关性完成观测数据网格化,有效保障高缺失值情况下插补结果的可信度,最终获得高精度、高适用性的地表风速网格化数据

Benefits of technology

本发明通过在UNet结构中引入部分卷积(PConv)与掩码更新机制,将风速数据网格的缺失区域视为“孔洞”,在编码器中进行下采样时能有效传播未缺失像素的信息,从而实现对大面积无观测数据区域的合理推断和填充。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015276A_ABST
    Figure CN123015276A_ABST
Patent Text Reader

Abstract

The application discloses a surface wind speed data gridding method based on an image repairing deep learning model, which comprises four steps: firstly, the ERA5 reanalysis data, FNL data and surface wind speed observation station data are cropped, resampled, binary mask constructed and data set divided; a PConvUNet model is constructed by fusing a partial convolution layer (PConv), a mask updating mechanism and a jump connection, and is adapted to the repairing requirements of the surface wind speed data; then, the input data are processed through two-step normalization, and a multi-task weighted loss function is used to constrain the iterative training of the model until the loss function value converges; finally, the performance of the model is verified through a three-layer verification mechanism, and high-precision surface wind speed gridded data are output. The application effectively avoids the "bull's eye effect" and error divergence problem of the traditional method, and can still guarantee the reliability and spatial heterogeneity of the gridded results under the high missing rate data set and complex terrain scene, and can be widely applied to the fields of wind energy resource assessment, disaster warning and agricultural meteorological service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of meteorological data processing and deep learning technology. Specifically, it relates to a method for gridding surface wind speed data based on an image inpainting deep learning model, which is suitable for gridding surface wind speed observation data in scenarios with high missing rates and complex terrain. Background Technology

[0002] Gridding of meteorological observation data is a core component of meteorological analysis, disaster early warning, and climate research. Its purpose is to transform discrete meteorological station data (such as temperature, precipitation, and wind speed) into continuous regional grid data, providing intuitive and complete data support for subsequent data analysis and applications. Currently, commonly used methods for meteorological data gridding are mainly divided into two categories: traditional interpolation methods and machine learning methods.

[0003] Traditional interpolation methods, based on the core logic of "the closer the distance, the more similar the meteorological conditions," include distance-weighted interpolation and linear interpolation. These methods estimate blank grid values ​​using known station data according to simple rules. While these methods are simple in principle and computationally inexpensive, they have significant limitations: relying solely on distance relationships fails to fully consider the influence of complex environmental factors such as topography, altitude, and land-sea distribution on meteorological elements, resulting in insufficient accuracy of the gridded results. This is especially true in areas with complex terrain (such as mountains and hills), where errors are substantial, making it difficult to meet the demands of high-precision meteorological analysis. Traditional interpolation methods can also lead to serious systematic biases, making it difficult to reproduce the true physical structure of the near-surface flow field.

[0004] To improve the accuracy of gridding, the industry is gradually adopting machine learning methods to mine the potential correlation between meteorological data and environmental factors and optimize the estimation results. Among them, the random forest algorithm is widely used in meteorological data gridding scenarios due to its strong nonlinear fitting ability and anti-interference ability. It can integrate multi-dimensional environmental features for modeling and, to some extent, make up for the shortcomings of traditional interpolation methods.

[0005] However, existing meteorological data gridding schemes based on random forests still have room for improvement: on the one hand, the selection of model input features lacks specificity, which can easily introduce redundant features and lead to low modeling efficiency. At the same time, it may ignore key environmental factors and affect prediction accuracy. On the other hand, the adaptability to different meteorological elements (such as the spatiotemporal distribution differences of precipitation and temperature) is insufficient. General models are difficult to take into account the gridding needs of various elements, resulting in gridding results in some scenarios that still cannot meet the standards for practical applications.

[0006] Therefore, there is an urgent need for a gridded processing solution that balances accuracy and efficiency and is adaptable to various meteorological elements, in order to solve the problems of insufficient accuracy and poor adaptability of existing methods in complex scenarios, and to provide reliable support for the efficient use of meteorological data. Summary of the Invention

[0007] Therefore, the purpose of this invention is to provide a surface wind speed data gridding method based on an image inpainting deep learning model to address the shortcomings of existing technologies. Addressing the various deficiencies of traditional interpolation methods—global interpolation is sensitive to outliers and weak at capturing local details; local interpolation easily produces concentric circle outliers in sparsely populated areas and has poor adaptability to complex terrain; geostatistical methods are computationally complex, have weak generalization ability, and are highly dependent on data distribution; and all traditional interpolation methods are unsuitable for high missing rate scenarios—this invention achieves comprehensive optimization. Addressing the limitations of existing traditional machine learning interpolation methods such as random forests in achieving poor interpolation results or even failing to interpolate at high missing rate datasets, this invention applies an image inpainting deep learning model to surface wind speed data interpolation. By leveraging the spatial autocorrelation between grids in the learning pattern dataset or reanalysis dataset, the observation data is gridded, effectively ensuring the reliability of the interpolation results under high missing value conditions, ultimately obtaining high-precision and highly applicable surface wind speed gridded data.

[0008] To achieve the above objectives, the present invention provides the following technical solution comprising the following four steps: Step 1: Data preprocessing. Surface wind speed data from ERA5 reanalysis is obtained as the basic data for training and testing. NCEP GDAS / FNL data is selected as additional test data, and surface wind speed observation station data is also obtained. The above data is processed by cropping, resampling, binary mask construction, and dataset partitioning to obtain standardized training, validation, and test sets. Step 2: PConvUNet model construction. The UNet basic architecture of encoder-decoder is adopted, and the traditional convolutional layers are replaced with some convolutional layers of PConv. Combined with mask update mechanism and skip connection, deep semantic information and shallow detail information are fused. The convolution operation and activation function of encoder and decoder are configured to build a PConvUNet model suitable for surface wind speed data repair. Step 3: Parameter setting and training. First, perform two-step normalization on the input data, then configure the model training parameters. Employ a loss function strategy that uses multiple weighted loss functions, and iteratively optimize the model parameters until the loss function value converges to a preset threshold, thus completing the PConvUNet model training. The iterative optimization process is as follows: input the training set data into the model according to a preset batch size, calculate the multi-task weighted loss between the predicted result and the true value through forward propagation, then update the parameters of each layer of the model through backpropagation, and repeat the forward and backpropagation steps until the number of iterations reaches a preset value or the loss function value stabilizes within a preset threshold range, at which point training stops. Step 4: Model performance verification. Through three methods—ERA5 test set verification, FNL test set generalization verification, and observation dataset cross-validation—the difference, root mean square error (RMSE), and correlation coefficient are calculated to verify the reliability of the model's gridding results and output high-precision surface wind speed gridded data.

[0009] Preferably, in step one, the grid size after data cropping is 0.25°×0.25°, and the cropping range is adapted to the geographical boundary of the target study area; the resampling adopts the inverse distance weighting method, and the grid without stations within the sampling radius is recorded as a missing value.

[0010] Preferably, the binary mask construction in step one is as follows: the region with no observed data is set to 0, and the region with observed data is set to 1; the dataset division is as follows: a portion of the ERA5 data is selected as the test set at a preset time interval, and the remaining data is randomly divided into the training set and the validation set at a ratio of 12:1; the FNL test set is collected and preprocessed synchronously at a preset time frequency.

[0011] Preferably, the operation logic of the partial convolutional layer in step two is as follows: the output value is calculated based only on the unmasked input, and the output is normalized by a scaling factor; the mask update mechanism is as follows: if the convolutional output is based on at least one valid input value, the corresponding position is marked as valid 1, otherwise it is marked as invalid 0.

[0012] Preferably, in step two, the encoder performs downsampling using partial convolution with a stride of 2 and ReLU activation function; the decoder uses 3×3 partial convolution with a stride of 1 to fuse semantic features, LeakyReLU activation function, nearest neighbor upsampling method, and the final output layer uses ReLU activation function to limit the output to positive values.

[0013] Preferably, the two-step normalization process in step three specifically involves: first removing outliers, then standardizing the data to a distribution with a mean of 0 and a standard deviation of 1 using the dataset mean and standard deviation, and finally limiting the data range to between 0 and 1 using Min-Max normalization.

[0014] Preferably, the training parameters in step three include: iterative training using the Adam optimizer, with an initial learning rate of 6×10⁻. 4 A multi-step learning rate scheduler is used to adjust the learning rate according to a preset number of iterations and a decay coefficient; the preset threshold is that the fluctuation range of the loss function value does not exceed a preset order of magnitude after a preset number of consecutive iterations.

[0015] Preferably, the weighted loss function strategy in step three is a weighted combination of the effective pixel region loss L_valid, the missing pixel region loss L_hole, the perceptual loss L_perceptual, the original style output loss L_styleout, the synthesized output loss L_stylecomp, and the total variational loss L_tv. The calculation steps for each loss term and the synthesis steps for the total loss are as follows: First, calculate the loss of the effective pixel region L_valid and the loss of the missing pixel region L_hole: ; ; ; ; in express The total number of elements in C, H, W represent the images The number of channels, height, and width; The input image contains holes, and M is the initial binary mask. It is the network's predicted output, The image represents the true value; ⊙ indicates element-wise multiplication; L_valid and L_hole calculate the L1 loss of the network output in the holed and non-holed regions, respectively. The specific formula for calculating the perceptual loss L_perceptual is as follows: ; ; Here, Ψ represents the feature extraction function, p represents the feature layer index, specifying the use of the outputs of the three pooling layers pool1, pool2, and pool3, with p being 0, 1, and 2 respectively; P represents the total number of feature layers, which is 3. This refers to the images input to the VGG-16 network, including , , ;in This refers to the raw output image directly generated by the network, where the hole areas have been filled with predicted values; It is a real image, that is, an original image without holes, used as a comparison target; It refers to the combination of the two mentioned above, that is... The non-perforated areas in the text are directly replaced with The true value ensures that the perceptual loss is zero in non-hole regions, allowing the loss calculation to focus more on evaluating the feature coherence between the repaired hole region and its surrounding real background; ∑ represents the summation of the losses of all selected feature layers from layer 0 to layer P-1. This is the total number of elements in the feature maps of the real image. Dividing by this number is to normalize feature maps of different sizes, preventing large layers from having too much weight in the total loss and ensuring a balanced contribution from each layer. yes The number of elements in; perceptual loss is calculated as and The L1 distance between the images and the true values ​​is calculated on the premise that these images have been projected into a higher-level feature space using a VGG-16 network pre-trained on ImageNet. Given the original input At that time, the activation mapping of the p-th selected layer; The specific formula for calculating the original style output loss L_styleout is as follows: ; ; ; Where Cp is the feature map of the p-th layer. The number of channels; for example, the pool1 layer of VGG-16 has 128 channels, so Cp = 128 in this layer; the superscript T refers to the transpose matrix in matrix operations, which is the calculation process of the Gram matrix. Its element in the i-th row and j-th column is the average of the product of the i-th feature channel and the j-th feature channel over the entire feature map space, reflecting the correlation between the responses of different feature channels; matrix operations assume that the shape of the high-level feature Ψ(x)p is (HpWp)×Cp, thus producing a Gram matrix of Cp×Cp; Kp is the normalization factor 1 / CpHpWp of the p-th selected layer; similarly, the style loss function includes loss terms for the original output and the composite output; The specific formula for calculating the total variational loss L_tv is as follows: ; The total variational loss L_tv is a smoothing penalty term calculated on region R, which is formed by extending the boundary of the original hole region outward by 1 pixel; where i refers to the row index of the image pixel and j is the column index of the image; for example, the top left corner is the origin (0,0), i increments downward and j increments to the right; It refers to a composite input image. This refers to the pixel value of the composite image at coordinates (i, j). It refers to the difference in pixel values ​​between two adjacent pixels in the same row; using the L1 norm of the difference between adjacent pixels as the loss function can ensure that the repaired area is smooth and coherent, and minimize isolated color blocks or noise. The total loss function is a weighted combination of the above loss functions, and its calculation formula is as follows: .

[0016] Preferably, the cross-validation of the observation dataset in step four specifically involves: creating a mask by treating the areas with stations as empty areas, retraining the model under the same hyperparameters, reconstructing the numerical data of the stations through the model to back-infer the station observation data, and comparing the difference and root mean square error between the back-inferred values ​​and the original observation data to verify the model's generalization ability.

[0017] Compared with the prior art, the beneficial effects of the present invention are: This invention introduces partial convolution (PConv) and a mask update mechanism into the UNet structure, treating missing regions of the wind speed data grid as "holes". During downsampling in the encoder, it can effectively propagate information of non-missing pixels, thereby achieving reasonable inference and filling of large areas without observation data.

[0018] This invention utilizes ERA5 reanalysis data as a training basis, enabling the model to learn the physical laws and spatial patterns in large-scale climate fields. In the application phase, by resampling and aligning the station observation data with the model framework, it achieves an effective fusion of the global physical field information provided by the reanalysis data and the precise local information from station observations.

[0019] This invention designs a loss function that not only ensures the reconstructed mesh is as close as possible to the observed values ​​numerically, but also constrains the reconstruction results to maintain similarity to the real field in spatial structure and texture features through perceptual loss and style loss. Simultaneously, it utilizes total variational loss to promote a smooth spatial transition and effectively suppress unreasonable noise. This multi-objective optimization strategy overcomes the limitations of single-index optimization. Attached Figure Description

[0020] Figure 1 This is a flowchart of the present invention; Figure 2 Here is a diagram of the PConvUNet model structure; Figure 3 This is a graph showing the advantages of the PConvUNet model in sparsely populated areas. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Step 1: Data Preprocessing. To create a gridded observation dataset, we used hourly surface wind speed data from the ERA5 reanalysis dataset as both training and testing data, spanning 75 years from 1950 to 2024, with a spatial resolution of 0.25° × 0.25°. Within these 75 years, one year from each decade (10 years) was selected as the test set, for a total of 8 years: 1953, 1967, 1974, 1982, 1991, 2002, 2014, and 2024. The remaining years yielded a total of 587,352 samples (images), which were then randomly selected for the training and validation sets at a ratio of 12:1. Ultimately, a total of 538,406 samples (images) were used as the training set, and 48,946 samples (images) were used as the validation set. To align with the observed data, all ERA5 data were cropped to the latitude range of 18°N–53.75°N and the latitude range of 72°E–137.75°E, with a grid size of 0.25° and a resolution of 144×264. The binary mask for the test set was the same as that for the training set, with regions without observed data set to 0 and regions with observed data set to 1.

[0023] To further verify the generalization ability of the model in reconstructing wind speed, we also used the NCEP GDAS / FNL 0.25 six-hourly dataset as the test set. This dataset has a spatial resolution of 0.25°×0.25° and a time span of ten years from 2016 to 2025. The preprocessing method for the FNL 0.25 test set is the same as that for the ERA5 test set.

[0024] The original data to be reconstructed consisted of surface wind speed observations from 2438 observation stations across the country, spanning 44 years from 1980 to 2023. After quality control, 1498 stations were selected. Since the latitude and longitude of the meteorological stations were not on the standard grid, all station observations were first resampled to the grid using the inverse distance weighting method, with a sampling radius of 0.25°. Grids without stations within this radius were marked as empty to minimize error. The data shape remained 144×264, and the latitude and longitude range was consistent with the training data.

[0025] Step 2: PConvUNet Model Construction. Similar to many deep learning models, UNet consists of a shrinking path (encoder) and an expanding path (decoder). The shrinking path follows the typical architecture of convolutional neural networks, containing multiple repeatedly applied convolutional operations, while doubling the number of feature channels through convolutional layers with a stride of 2 or 2×2 pooling layers. Each step in the expanding path involves upsampling the feature maps, ultimately outputting an image at the restored resolution. Skip connections are a core feature and advantage of the UNet structure; by connecting feature maps of the same resolution in the encoder and decoder, the decoder can simultaneously utilize high-level semantic information from deep layers and low-level detail information from shallow layers.

[0026] The PConvUNet model replaces the convolutional layers in the traditional UNet with partially convolutional layers (PConv). Utilizing partially convolution and a mask update mechanism, it treats wind speed data as a single-channel grayscale image for restoration, thereby achieving the goal of reconstructing the dataset. The partially convolutional operation and the mask update function are collectively called the partially convolutional layer. Let W be the weight of the convolutional filter, and b be its corresponding bias. X is the feature value (pixel value) of the current convolutional window, and M is the corresponding binary mask. The partially convolution at each position is represented as: (1)

[0027] Where ⊙ denotes element-wise multiplication, and 1 is a matrix with the same shape as M but all elements are 1. It can be seen that the output value depends only on the unmasked input. Applying a scaling factor... Scaling is performed to normalize the output of convolutional windows containing different numbers of valid values ​​to a similar order of magnitude. After each partial convolution operation, the mask is updated according to a certain mechanism: if the convolution can build its output on at least one valid input value, then we mark that position as valid. This is represented as: (2) This gives the model an advantage in repairing large areas of missing images. As long as the input contains any valid pixels, applying partial convolutional layers a sufficient number of times will eventually turn the mask into a valid value of all 1s.

[0028] Our PConvUNet model uses nearest-neighbor upsampling in the decoding stage. Skip connections concatenate the output of a layer in the encoder with the input of the corresponding layer in the decoder. Specifically, after upsampling at each layer in the decoder, the image is concatenated with a feature map of the same size from the encoder path. The final output tensor contains a concatenation of the original input image with holes and the original mask, allowing the model to preserve features of non-hole pixels. Downsampling is performed in the encoder using partial convolutions with a stride of 2 and ReLU activation, while in the decoder, 3×3 partial convolutions with a stride of 1 fuse the semantic features concatenated by skip connections and LeakyReLU activation. The final output layer uses ReLU activation to constrain the model output values ​​to positive values.

[0029] Step 3: Parameter Setting and Training. To make the training process more stable, the model input data underwent two-step normalization. First, values ​​exceeding 70 in the training data were considered outliers and removed. Then, the tensor image was normalized using the mean and standard deviation of the dataset, resulting in a single-channel data distribution with a mean of 0 and a standard deviation of 1. The calculation formula is as follows: (3) Where x represents the input data. The mean, The standard deviation is then used. Min-Max normalization is then applied to limit the input data range to between 0 and 1, which effectively dilutes the impact of extreme values ​​on model training.

[0030] (4) This network is implemented based on the PyTorch framework, with the PConv layer created using PyTorch's default Conv2D. Training was performed on an A800 (80GB) GPU for approximately 120 hours. To maximize GPU memory utilization, the batch size was adjusted to 265. The network was trained for 50,000 iterations using the Adam optimizer, with an initial learning rate of 6 × 10⁻⁴ and a multi-step learning rate scheduler. The learning rate decay factor was 0.3, triggered at 70% (35,000) and 90% (45,000) of the total iterations. The loss function strategy employed a weighted combination of various loss functions: effective pixel region loss (L_valid), missing pixel region loss (L_hole), perceptual loss (L_perceptual), original style output loss (L_styleout), synthetic output loss (L_stylecomp), and total variational loss (L_tv). Specifically, given an input image with holes... Initial binary mask M (hole regions are 0), network prediction output and the true value image First, there are two types of pixel-wise losses: (5) (6) in express The total number of elements in ( C, H, W represent the images The number of channels, height, and width. These two parameters calculate the L1 loss of the network output in the hollow and non-hollow regions, respectively. Next is the perceptual loss: (7) Here, It is the original output image. However, its non-hole pixels are directly set to the real values; yes The number of elements in the dataset. This perceptual loss is calculated as... and The L1 distance between the images and the true values ​​is calculated, but this is based on the premise that these images have been projected into a higher-level feature space using a VGG-16 network pre-trained on ImageNet. Given the original input At that time, the activation mapping of the p-th selected layer. Next is the style loss term: (8) (9) Matrix operations assume the high-level feature Ψ(x)p has a shape of (HpWp)×Cp, thus producing a Cp×Cp Gram matrix; Kp is the normalization factor 1 / CpHpWp for the p-th selected layer. Similarly, the style loss function includes loss terms for both the original and composite outputs. Finally, there is the total variation loss Ltv: this is a smoothing penalty term calculated on region R (formed by extending the boundary of the original hole region outward by 1 pixel). (10) in, yes The number of elements in the dataset. The total loss Ltotal is a weighted combination of all the loss functions mentioned above: (11) This weight has been verified through multiple experiments and can achieve good convergence results.

[0031] Step 4: Model Performance Validation. To comprehensively test the model's ability to grid surface wind speed data, the reliability of the model output was tested using the following three methods: First, eight years of ERA5 data from different decades (10 years) were randomly selected and not used in model training as the test set. The reliability of the model reconstruction was measured by calculating the spatial distribution of the difference, root mean square error (RMSE), and time series correlation coefficient. Second, the generalization ability of the model was tested using six-hourly data from the FNL 0.25 dataset (2016-2025), which was not used in model training to ensure the reliability of the results. Finally, cross-validation was performed using the observation dataset. First, the missing values ​​in the existing station areas were filled in. Then, the binary mask was inverted, and the areas with stations were treated as missing areas to create a mask. The model was retrained with the hyperparameters unchanged. Then, the reconstructed regional values ​​were substituted into the model to back-calculate the values ​​of the station observation data. The difference and root mean square error between the back-calculated values ​​and the original observation data were compared to measure the reliability of the model output.

[0032] In the following figures, Figure 2 This is a diagram of the PConvUNet model architecture. The model uses the UNet architecture, replacing convolutional layers with partially convolutional layers (PConv). Both the encoder and decoder have three layers. Upsampling in the decoder uses the nearest neighbor method. Figure 2 It demonstrates the model structure and the entire process from training to testing to application.

[0033] Figure 3 To demonstrate the advantages of the PConvUNet model in areas with sparse meteorological stations, China was divided into seven climate zones, and the regional meteorological station density index (MSADI) for each of these seven zones was calculated. (a) The figure shows the root mean square error (RMSE) over time series between the PConvUNet model output and the actual values ​​of the traditional linear interpolation and ERA5 test set data under different MSADI values ​​in the seven zones. (b) The figure shows the average error over time series between the PConvUNet model output and the actual values ​​of the traditional linear interpolation and ERA5 test set data.

[0034] Figure 3 This demonstrates the superiority of the PConvUNet model over traditional methods when interpolating sparse regions of sites. MSADI is defined as: As can be seen from Figures (a) and (b), the traditional method is more sensitive to site density. Therefore, in areas with sparse sites, the interpolation error of PConvUNet is significantly smaller than that of the traditional method.

Claims

1. A method for gridding surface wind speed data based on an image inpainting deep learning model, characterized in that: It includes the following four steps: Step 1: Data preprocessing. Surface wind speed data from ERA5 reanalysis is obtained as the basic data for training and testing. NCEP GDAS / FNL data is selected as additional test data, and surface wind speed observation station data is also obtained. The above data is processed by cropping, resampling, binary mask construction, and dataset partitioning to obtain standardized training, validation, and test sets. Step 2: PConvUNet model construction. The UNet basic architecture of encoder-decoder is adopted, and the traditional convolutional layers are replaced with some convolutional layers of PConv. Combined with mask update mechanism and skip connection, deep semantic information and shallow detail information are fused. The convolution operation and activation function of encoder and decoder are configured to build a PConvUNet model suitable for surface wind speed data repair. Step 3: Parameter setting and training. First, perform two-step normalization on the input data, then configure the model training parameters. Employ a loss function strategy that uses multiple weighted loss functions, and iteratively optimize the model parameters until the loss function value converges to a preset threshold, thus completing the PConvUNet model training. The iterative optimization process is as follows: input the training set data into the model according to a preset batch size, calculate the multi-task weighted loss between the predicted result and the true value through forward propagation, then update the parameters of each layer of the model through backpropagation, and repeat the forward and backpropagation steps until the number of iterations reaches a preset value or the loss function value stabilizes within a preset threshold range, at which point training stops. Step 4: Model performance verification. Through three methods—ERA5 test set verification, FNL test set generalization verification, and observation dataset cross-validation—the difference, root mean square error (RMSE), and correlation coefficient are calculated to verify the reliability of the model's gridding results and output high-precision surface wind speed gridded data.

2. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The data cropping in step one results in a grid size of 0.25° × 0.25°, with the cropping range adapted to the geographical boundary of the target study area. The resampling uses the inverse distance weighting method, and grids without stations within the sampling radius are recorded as missing values.

3. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The binary mask construction in step one is as follows: the region with no observed data is set to 0, and the region with observed data is set to 1; the dataset division is as follows: a portion of the ERA5 data is selected as the test set at a preset time interval, and the remaining data is randomly divided into the training set and the validation set at a ratio of 12:1; the FNL test set is collected and preprocessed synchronously at a preset time frequency.

4. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The operation logic of the partial convolutional layer in step two is as follows: the output value is calculated based only on the unmasked input, and the output is normalized by a scaling factor; the mask update mechanism is as follows: if the convolution output is based on at least one valid input value, the corresponding position is marked as valid 1, otherwise it is marked as invalid 0.

5. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, In step two, the encoder performs downsampling using partial convolutions with a stride of 2 and ReLU activation function; the decoder uses 3×3 partial convolutions with a stride of 1 to fuse semantic features, LeakyReLU activation function, nearest neighbor upsampling method, and finally, the output layer uses ReLU activation function to limit the output to positive values.

6. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The two-step normalization process described in step three is as follows: first, outliers are removed; then, the data is standardized to a distribution with a mean of 0 and a standard deviation of 1 using the mean and standard deviation of the dataset; and finally, the data range is limited to 0-1 using Min-Max normalization.

7. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The training parameters mentioned in step three include: iterative training using the Adam optimizer, with an initial learning rate of 6×10⁻. 4 A multi-step learning rate scheduler is used to adjust the learning rate according to a preset number of iterations and a decay coefficient; the preset threshold is that the fluctuation range of the loss function value does not exceed a preset order of magnitude after a preset number of consecutive iterations.

8. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The loss function strategy for weighting multiple loss functions in step three is a weighted combination of the effective pixel region loss L_valid, the missing pixel region loss L_hole, the perceptual loss L_perceptual, the original style output loss L_styleout, the synthesized output loss L_stylecomp, and the total variational loss L_tv. The calculation steps for each loss term and the synthesis steps for the total loss are as follows: First, calculate the loss of the effective pixel region L_valid and the loss of the missing pixel region L_hole: ; ; in express The total number of elements in C, H, W represent the images The number of channels, height, and width; The input image contains holes, and M is the initial binary mask. It is the network's predicted output, The image represents the true value; ⊙ indicates element-wise multiplication; L_valid and L_hole calculate the L1 loss of the network output in the holed and non-holed regions, respectively. The specific formula for calculating the perceptual loss L_perceptual is as follows: ; Here, Ψ represents the feature extraction function, p represents the feature layer index, specifying the use of the outputs of the three pooling layers pool1, pool2, and pool3, with p being 0, 1, and 2 respectively; P represents the total number of feature layers, which is 3. This refers to the images input to the VGG-16 network, including , , ;in This refers to the raw output image directly generated by the network, where the hole areas have been filled with predicted values; It is a real image, that is, an original image without holes, used as a comparison target; It refers to the combination of the two mentioned above, that is... The non-perforated areas in the text are directly replaced with The true value; ∑ represents the sum of the losses of all selected feature layers from layer 0 to layer P-1; It is the total number of elements in the feature map of the real image; the perceptual loss is calculated as... and L1 distance from the true value, Given the original input At that time, the activation mapping of the p-th selected layer; The specific formula for calculating the original style output loss L_styleout is as follows: ; ; ; ; Where Cp is the feature map of the p-th layer. The number of channels, T refers to the transpose matrix in matrix operations; Kp is the normalization factor 1 / CpHpWp of the p-th selected layer; similarly, the style loss function includes loss terms for the original output and the composite output; The specific formula for calculating the total variational loss L_tv is as follows: ; The total variational loss L_tv is a smoothing penalty term calculated on region R, which is formed by extending the boundary of the original hole region outward by 1 pixel; where i refers to the row index of the image pixel, j is the column index of the value image; the top left corner is the origin (0,0), i increments downwards, and j increments to the right; It refers to a composite input image. This refers to the pixel value of the composite image at coordinates (i, j). It refers to the difference in pixel values ​​between two adjacent pixels in the same row; the L1 norm of the difference between adjacent pixels is used as the loss function; The total loss function is a weighted combination of the above loss functions, and its calculation formula is as follows: 。 9. The method for gridding surface wind speed data based on an image inpainting deep learning model according to claim 1, characterized in that, The cross-validation of the observation dataset in step four specifically involves: creating a mask by treating the areas with stations as empty areas, retraining the model under the same hyperparameters, reconstructing the numerical data of the stations through the model, and comparing the difference and root mean square error between the reversed values ​​and the original observation data to verify the model's generalization ability.