Meteorological wind field data rapid downscaling calculation method based on diffusion model and attention mechanism

By using a diffusion model based on the UNet network and attention mechanism, the problems of low computational efficiency and unreasonable generation results in existing meteorological downscaling techniques are solved, achieving high-precision and efficient wind field data generation, which is suitable for renewable energy assessment, extreme weather early warning, and dynamic simulation of nuclear, biological and chemical accident emergency response.

CN120911520APending Publication Date: 2025-11-07NORTHWEST INST OF NUCLEAR TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511011617.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing meteorological downscaling techniques have bottlenecks in terms of computational efficiency, multi-source data fusion, and physical consistency. They are difficult to accurately characterize the local wind field turbulence features under complex terrain, and the generated high-precision wind fields may exhibit non-physical vortex structures or pseudo-high-resolution results that violate the law of conservation of mass.

Method used

We employ a diffusion model and attention mechanism based on the UNet network. We gradually denoise and refine the wind field details through a noise prediction network. Combined with a multi-head attention mechanism, we achieve cross-modal information fusion of multi-source data, construct a multi-scale downscaling process, avoid model collapse, and improve physical rationality.

Benefits of technology

It enables rapid generation of high-resolution wind fields, significantly improves generation quality, captures large-scale spatial correlations, reduces sampling steps, and meets the demand for high-precision wind field data generation in complex terrain areas within seconds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911520A_ABST
    Figure CN120911520A_ABST
Patent Text Reader

Abstract

The invention discloses a rapid downscaling calculation method for meteorological wind field data based on a diffusion model and an attention mechanism, and solves the problems that a non-physical vortex structure appears in a generated high-precision wind field due to a mode collapse phenomenon in the prior art, and multi-scale dynamic association between atmospheric variables and topographic features cannot be established. The method specifically comprises the following steps: step 1, acquiring a data sample set comprising low-resolution meteorological wind field data and terrain elevation data, and dividing the data sample set into a training set and a test set; 2, constructing an initial target diffusion model based on a UNet network, wherein the initial target diffusion model comprises a noise prediction network; 3, training the noise prediction network of the initial target diffusion model by using the training set, and constructing a final target diffusion model; 4, testing the final target diffusion model by using the test set to determine a qualified final target diffusion model; and 5, carrying out fast downscaling calculation on meteorological wind field data through the qualified final target diffusion model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a meteorological wind field rapid downscaling calculation method, in particular to a meteorological wind field data rapid downscaling calculation method based on a diffusion model and an attention mechanism. BACKGROUND

[0002] Meteorological downscaling technology, as a key link connecting large-scale climate models and regional refined prediction, plays a key role in national strategic fields such as renewable energy development, extreme weather warning, and pollutant atmospheric transport simulation. Existing global reanalysis data (such as ERA5) are limited to a grid scale of 25-50 kilometers, making it difficult to accurately depict local circulation mutations (such as leeside vortex, sea-land wind front, etc.) caused by complex underlying surfaces such as mountain valleys and coastlines, thus failing to meet the following needs:

[0003] (1) Renewable energy assessment and site optimization: In view of the spatial heterogeneity of wind and light resources in complex terrain areas, it is necessary to break through the limitations of the temporal and spatial grid resolution of reanalysis data, accurately depict the local wind field turbulence characteristics or the influence of cloud layer dynamics on photovoltaic power generation under complex terrain, and as far as possible to reduce the error of wind turbine site selection and photovoltaic array arrangement design;

[0004] (2) Extreme weather warning: High-precision meteorological data and satellite remote sensing information need to be integrated, coupled with atmospheric thermodynamic parameters, to construct a refined evolution process of disaster-causing factors such as typhoons and rainstorms, supporting the assessment of urban lifeline engineering resilience and the precise scheduling of emergency supplies;

[0005] (3) Nuclear, biological and chemical accident emergency dynamic deduction: Real-time wind field and terrain dynamics parameters with a kilometer resolution need to be integrated to construct a three-dimensional transport path probability cloud map of nuclear, biological and chemical accident plume, supporting real-time assessment of accident hazards.

[0006] Meteorological downscaling techniques improve spatial resolution through physical modeling or data-driven methods, but existing schemes have significant bottlenecks in computational efficiency, multi-source data fusion, and physical consistency. Traditional dynamic downscaling methods (such as the WRF model) have high accuracy, but their computational complexity increases exponentially with resolution, generating kilometer-level resolution wind field data that consumes hundreds of CPU hours, making it difficult to meet real-time business needs, and the parameterization of nonlinear processes such as terrain-atmosphere interaction may have systematic errors. Statistical downscaling methods require a strong correlation assumption of historical data and have insufficient prediction ability for rare weather events, and cannot effectively fuse high-dimensional terrain features. Traditional deep learning methods (such as CNN) achieve high-resolution wind field reconstruction through end-to-end learning, but the mean square error loss function will over-smooth the output field, losing small-scale features such as turbulent eddies, and the traditional convolution kernel cannot capture the large-scale spatial correlation of long-range interactions between terrain and wind field. In addition, the evolution of meteorological fields has inherent randomness (such as turbulent fluctuations), and CNN and other deep learning models only output deterministic results, which cannot generate a result set that meets the probability distribution of the real wind field, resulting in a significant increase in the false negative rate of extreme weather events. Existing generative models (such as GAN, VAE, etc.) attempt to solve the above problems, but still have key defects:

[0007] ① The inherent mode collapse phenomenon of GAN models leads to non-physical vortex structures in the generated high-precision wind field;

[0008] ② Traditional conditional generation methods cannot establish a multi-scale dynamic correlation between atmospheric variables and terrain features by simply splicing and fusing terrain data;

[0009] ③ Pure data-driven models are prone to produce "pseudo-high-resolution" results that violate the law of conservation of mass or energy balance. SUMMARY

[0010] In order to solve the technical problems that the existing technology cannot establish a multi-scale dynamic correlation between atmospheric variables and terrain features due to the mode collapse phenomenon of the generated high-precision wind field, or is prone to produce "pseudo-high-resolution" results that violate the law of conservation of mass or energy balance, the present application provides a meteorological wind field data fast downscaling calculation method based on diffusion model and attention mechanism.

[0011] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0012] A meteorological wind field data fast downscaling calculation method based on diffusion model and attention mechanism, characterized in that it comprises the following steps:

[0013] Step 1, obtain a data sample set including low-resolution meteorological wind field data and terrain elevation data, and divide it into a training set and a test set;

[0014] Step 2, construct an initial target diffusion model based on a UNet network, which is used to input low-resolution meteorological wind field data for rapid downscaling calculation to obtain high-resolution meteorological wind field data; the initial target diffusion model includes a noise prediction network ε θ ; the noise prediction network ε θ is used to predict noise;

[0015] Step 3, train the noise prediction network ε θ of the initial target diffusion model with the training set to construct a final target diffusion model;

[0016] Step 4, test the trained final target diffusion model with the test set to determine a qualified final target diffusion model;

[0017] Step 5, perform rapid downscaling calculation of meteorological wind field data through the qualified final target diffusion model.

[0018] Further, step 1 specifically includes:

[0019] Step 1.1, obtain ERA5 reanalysis data, fine meteorological data and terrain elevation data;

[0020] Step 1.2, perform spatio-temporal alignment on the ERA5 reanalysis data, fine meteorological data and terrain elevation data, and extract the hourly wind speed vector wind1 at the target height and the hourly wind speed vector wind2 at the target pressure layer from the ERA5 reanalysis data, and extract the hourly wind speed vector wind3 at the target height and the hourly wind speed vector wind4 at the surface pressure layer from the fine meteorological data;

[0021] Step 1.3, preprocess the wind speed vector wind1, wind speed vector wind2, wind speed vector wind3, wind speed vector wind4 and terrain elevation data after spatial dimension alignment;

[0022] Step 1.4, create a data sample set using the preprocessed wind speed vector wind1, wind speed vector wind2, wind speed vector wind3, wind speed vector wind4 and terrain elevation data, and randomly divide the created data sample set into a training set and a test set.

[0023] Further, step 2 specifically includes:

[0024] Step 2.1, obtain an initial diffusion model;

[0025] Step 2.2, design a forward noise adding process for the initial diffusion model:

[0026]

[0027] where x t is the noisy result of the t-th time step, x0 is the result of tensor splicing of the wind speed vector wind3 and the wind speed vector wind4 in the channel dimension, as the initial data without noise, ε ~ N(0, I) is a standard Gaussian random noise, α t = 1-β t , β t = β min + (β max - β min ) · (t / T) and β t ∈ (0, 1) represent the intensity coefficient of the added noise, which is generated by linear scheduling, T is the total number of time steps of the diffusion process, α i is the weight coefficient of the last time step of the added noise, β max and β min are the preset maximum noise intensity and minimum noise intensity, respectively;

[0028] Step 2.3, constructing a noise prediction network ε of the initial diffusion model inverse denoising process based on the UNet network and the attention mechanism θ to obtain an initial target diffusion model.

[0029] Further, step 3 specifically comprises:

[0030] Step 3.1, setting hyperparameters for the noise prediction network ε θ of the initial target diffusion model;

[0031] Step 3.2, tensor splicing the wind speed vector wind3 and the wind speed vector wind4 in the channel dimension to obtain the initial data x0 without noise, and tensor splicing the wind speed vector wind1 and the wind speed vector wind2 in the channel dimension to obtain the conditional input s, uniformly sampling the time step t from {1, …, T}, and sampling the random noise ε from the standard Gaussian noise ε ~ N(0, I) to obtain the sampling data;

[0032] Step 3.3, calculating the gradient of the noise prediction network ε θ using the sampling data obtained in step 3.2, updating the parameters of the noise prediction network ε θ ; wherein θ is the trainable parameter of the noise prediction network in the target diffusion model, and h is the terrain elevation data in the training set.

[0033] Step 3.4, repeating step 3.2-step 3.3 until the noise prediction network ε of the initial target diffusion model converges to obtain a final target diffusion model. θ converges to obtain a final target diffusion model.

[0034] Further, step 4 specifically comprises:

[0035] Step 4.1, tensor splicing the wind velocity vector wind1 and the wind velocity vector wind2 in the channel dimension in the test set to obtain a conditional input s test , sampling random noise x from a standard Gaussian noise ε ~ N(0, I) T ;

[0036] Step 4.2, starting from the time step τ M =T, performing cross-step sampling calculation, and calculating the hidden state k of the time step τ test , the conditional input s k , the terrain elevation h test in the test set, and inputting the noise prediction network ε of the final target diffusion model θ , calculating the hidden state k-1 of the time step τ

[0037]

[0038] wherein k=1, 2, …, M, M is the total number of time steps, and M

[0039] Step 4.3, repeating step 4.2 until the hidden state of the 0th time step is generated to obtain corresponding meteorological wind field data;

[0040] Step 4.4, comparing the obtained meteorological wind field data with a preset error range;

[0041] If the meteorological wind field data is within the preset error range, it is determined that the trained target diffusion model is a qualified final target diffusion model;

[0042] If the meteorological wind field data is outside the preset error range, return to step 1 and reacquire the data sample set until a qualified final target diffusion model is obtained.

[0043] Further, step 5 specifically comprises:

[0044] ​The low-resolution meteorological wind field data collected on site is input into the qualified final target diffusion model, and the low-resolution meteorological wind field data is calculated by the qualified final target diffusion model to obtain high-resolution meteorological wind field data, and the meteorological wind field data rapid downscaling calculation based on the diffusion model and the attention mechanism is completed.

[0045] Further, in step 1.2, the step of spatio-temporal alignment is specifically:

[0046] In the time dimension, the ERA5 reanalysis data and the fine weather data are corresponded hour by hour; in the space dimension, the corresponding spatial region centers of the ERA5 reanalysis data, the fine weather data and the terrain elevation data are overlapped, and the region range corresponding to the fine weather data is located within the region range corresponding to the ERA5 reanalysis data.

[0047] Further, in step 1.3, the step of preprocessing is specifically:

[0048] The mean and standard deviation of the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data are calculated respectively; then the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data are subtracted by the corresponding mean and divided by the corresponding standard deviation, to complete the preprocessing of the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data.

[0049] Further, step 3.3 is specifically:

[0050] The output value of the noise prediction network involving the attention mechanism is calculated by forward propagation using the sampling data obtained in step 3.2 And the gradient of the noise prediction network ε θ is calculated by back propagation The parameters of the noise prediction network ε θ are updated using the AdamW optimizer; wherein θ is the parameter of the noise prediction network of the target diffusion model.

[0051] Further, step 1.1 is specifically: downloading ERA5 reanalysis data from a meteorological website; obtaining fine weather data and terrain elevation data using a WRF model; the spatial resolution of the ERA5 reanalysis data is 0.25°; the time resolution of the fine weather data and the terrain elevation data is 1h, and the spatial resolution is less than or equal to 3km;

[0052] In step 3.1, the hyperparameters include batch size, learning rate, training round number and optimizer parameters;

[0053] In step 3.3, the output value The attention mechanism calculation mode related to the output value is as follows:

[0054]

[0055] Wherein, j represents the jth attention head, d j is the head dimension size, Q j is the linear projection transformation result of the output value of the intermediate layer of the UNet network, K j and V j are the linear projection transformation results of the conditional input s and the terrain elevation h in different projection spaces, and T is the transpose symbol.

[0056] Advantages of the present application:

[0057] 1. The present application adopts a conditional diffusion model based on a UNet network to construct a multi-scale downscaling process, gradually denoises and refines the wind field details through a noise prediction network, and significantly improves the generation quality of high-resolution wind fields compared with traditional GAN architectures, and avoids non-physical generated results caused by model collapse.

[0058] 2. The present application effectively realizes the cross-modal information fusion of low-resolution wind fields, terrain elevations and other multi-source data through a multi-head attention mechanism, so that the downscaling model has the ability to capture large-scale spatial correlation, and improves the physical rationality of the wind field downscaling process based on the deep learning framework.

[0059] 3. The present application designs a non-Markov chain sampling generation process by using a cross-step sampling algorithm to solve the slow inference speed of traditional diffusion models, greatly reduces the sampling steps through hidden space deterministic mapping, and realizes the high-precision wind field data generation of complex terrain areas within seconds. BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 is a flowchart of an embodiment of the meteorological wind field data fast downscaling calculation method based on a diffusion model and an attention mechanism of the present application;

[0061] Figure 2 is a complex terrain area in the embodiment of the present application;

[0062] Figure 3 is the noise prediction network structure constructed in the embodiment of the present application;

[0063] Figure 4 is the residual module of the noise prediction network in the embodiment of the present application;

[0064] Figure 5 Encoding network for time step embedding vector in embodiments of the present application;

[0065] Figure 6 Multi-head cross attention module for noise prediction network in embodiments of the present application;

[0066] Figure 7 CNN-based low-resolution wind field data and high-resolution terrain data encoding network in embodiments of the present application;

[0067] Figure 8 Comparison of high-resolution wind field true value and predicted value in embodiments of the present application. DETAILED DESCRIPTION

[0068] The technical solutions of the present application will be described in detail below with reference to the drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0069] As shown in Figure 1 The meteorological wind field data fast downscaling calculation method based on diffusion model and attention mechanism proposed in the present embodiment specifically includes the following steps:

[0070] Step 1, obtain a data sample set and divide it into a training set and a test set;

[0071] Step 1.1, obtain ERA5 reanalysis data, fine meteorological data and terrain elevation data;

[0072] Download ERA5 reanalysis data from a meteorological website; obtain fine meteorological data and terrain elevation data using a WRF model. The spatial resolution of ERA5 reanalysis data is 0.25°; the time resolution of fine meteorological data and terrain elevation data is 1h, and the spatial resolution is less than or equal to 3km. The complex terrain area of interest is shown in Figure 2 .

[0073] Step 1.2, perform spatio-temporal alignment on the ERA5 reanalysis data, fine meteorological data and terrain elevation data, and extract the hourly wind speed vector wind1 at the target height and the hourly wind speed vector wind2 at the target pressure layer from the ERA5 reanalysis data, and extract the hourly wind speed vector wind3 at the target height and the hourly wind speed vector wind4 at the ground surface pressure layer from the fine meteorological data;

[0074] The spatio-temporal alignment step specifically includes:

[0075] In the time dimension, the ERA5 reanalysis data and the fine weather data are corresponded hour by hour; in the space dimension, the corresponding spatial region centers of the ERA5 reanalysis data, the fine weather data and the terrain elevation data are overlapped, and the region range corresponding to the fine weather data is located within the region range corresponding to the ERA5 reanalysis data.

[0076] Step 1.3, preprocessing the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the terrain elevation data after spatial dimension alignment;

[0077] The preprocessing step is specifically:

[0078] For the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the terrain elevation data after spatial dimension alignment, the mean and standard deviation thereof are calculated respectively; then the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the terrain elevation data after spatial dimension alignment are subtracted by the corresponding mean and divided by the corresponding standard deviation, to complete the preprocessing of the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the terrain elevation data after spatial dimension alignment.

[0079] Step 1.4, creating a data sample set (the total number of samples is 3568) using the preprocessed wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the terrain elevation data, and randomly dividing the created data sample set into a training set (90%) and a test set (10%).

[0080] Step 2, constructing an initial target diffusion model based on UNet network;

[0081] Step 2.1, obtaining an initial diffusion model;

[0082] Step 2.2, designing a forward noise adding process of the initial diffusion model:

[0083]

[0084] wherein, x t is the noise adding result of the t-th time step, x0 is the result of tensor splicing of the wind speed vector wind3 and the wind speed vector wind4 in the channel dimension, as the initial data without noise, ε ~ N(0, I) is a standard Gaussian random noise, α t = 1-β t , β t = β min +(βmax -β min )·(t / T) and β t ∈(0, 1) represents the intensity coefficient of the added noise, generated by linear scheduling, T is the total number of time steps of the diffusion process, a i is the weight coefficient of the last time step noise retention, β max and β min are the preset maximum and minimum noise intensities, respectively; the specific parameter setting is: β min = 0.0001, β max = 0.02, T = 1000 steps;

[0085] Step 2.3, design the noise prediction network ε of the initial diffusion model inverse denoising process based on UNet network (Pytorch-2.1 deep learning framework) and attention mechanism θ , to obtain the initial target diffusion model.

[0086] Where:

[0087] The improved UNet network contains multiple residual modules and multi-head cross attention modules, as shown in Figure 3 , the core structure is:

[0088] ① Five layers of down-sampling, each layer is: residual module → multi-head cross attention module → average pooling;

[0089] ② Five layers of up-sampling: each layer is: residual module → multi-head cross attention module → bilinear up-sampling, while increasing the skip connection with the down-sampling process;

[0090] The residual module is shown in Figure 4 , the specific structure is: first, the encoded time step embedding vector (the encoding method is a fully connected neural network, as shown in Figure 5 ) is sent to the fully connected network FC after SiLU activation to obtain the output of the time step, then the hidden variable of the inverse denoising process is processed by convolution Conv operation and Group Normalization, and then SiLU activation is performed to obtain the output of the hidden variable, then the two types of outputs are added element by element, and then the convolution Conv operation, Group Normalization and SiLU activation are performed in turn to obtain the third type of output, finally, the third type of output and the hidden variable processed by convolution Conv operation are added element by element as the final output of the residual module. Among them, the method of generating time step embedding vector follows the Sinusoidal position encoding method:

[0091]

[0092] Where t represents the t-th time step (from 1000 to 1), and H is the dimension of the time step embedding vector, which is set to 128 in this embodiment.

[0093] Multi-head cross-attention module, such as Figure 6 As shown, the specific structure is as follows: First, the output of the residual module is linearly projected (the projection matrix is ​​W). Q The query tensor Q is obtained by first obtaining the low-resolution wind field data and the high-resolution terrain data (encoded using a CNN network, such as...) after convolutional encoding. Figure 7 As shown, bilinear interpolation is performed to match the size of the tensor output by the residual module. Then, the tensors are concatenated, and the concatenated tensors are subjected to two linear projections (projection matrices W and W respectively). K and W V After obtaining the key tensor K and value tensor V, the three tensors Q, K, and V are then split into four heads and multi-head attention is performed. The multi-head attention results are then concatenated into tensors along the head dimension. Finally, the concatenated result is linearly projected (projection matrix W). O Then, the output of the residual module is added element by element to obtain the final output of the entire multi-head cross-attention module.

[0094] Step 3: Use the training set to train the noise prediction network ε of the initial target diffusion model. θ Train the model to build the final target diffusion model;

[0095] Step 3.1: The noise prediction network ε of the initial target diffusion model θ Hyperparameter settings are performed; hyperparameters include batch size, learning rate, number of training epochs, and optimizer parameters. In this embodiment, the batch size is 8, the learning rate is 0.0008, the number of training epochs is 1000, and the AdamW optimizer parameters are β1 = 0.9, β2 = 0.999, and the weight decay coefficient is 0.01.

[0096] Step 3.2: After tensor concatenation of wind speed vectors wind3 and wind4 in the training set along the channel dimension, noise-free initial data x0 is obtained. After tensor concatenation of wind speed vectors wind1 and wind2 in the training set along the channel dimension, conditional input s is obtained. Time step t is uniformly sampled from {1,…,T}, and random noise ε is sampled from standard Gaussian noise ε~N(0,I) to obtain sampled data.

[0097] Step 3.3: Using the sampling data obtained in Step 3.2, calculate the output value of the noise prediction network involving the attention mechanism through forward propagation. The noise prediction network ε is calculated through backpropagation. θ gradient Using AdamW to predict noise network εθ The parameters are updated; where θ is the trainable parameter of the noise prediction network in the target diffusion model, and h is the terrain elevation data in the training set.

[0098] Output value The attention mechanism involved is calculated as follows:

[0099]

[0100] Where j represents the j-th attention head, d j Q is the size of the head dimension. j K is the linear projection transformation result of the output value of the intermediate layer of the UNet network. j and V j These are the linear projection transformation results of input s and terrain elevation h under different projection spaces, respectively, where T is the transpose symbol.

[0101] Step 3.4: Repeat steps 3.2 to 3.3 until the noise prediction network ε of the initial target diffusion model is completed. θ The convergence yields the final target diffusion model.

[0102] Step 4: Test the trained final target diffusion model using the test set to determine the qualified final target diffusion model;

[0103] Step 4.1: Perform tensor concatenation of the wind speed vectors wind1 and wind2 in the test set along the channel dimension to obtain the conditional input s. test Random noise x is sampled from standard Gaussian noise ε ~ N(0,I). T ;

[0104] Step 4.2, from time step τ M =Start step sampling calculation at time step τ =T k Hidden state The conditional input s test Time step τ k and test set terrain elevation h test The noise prediction network ε input to the final target diffusion model θ Calculate τ i-1 Hidden state of time step

[0105]

[0106] Where k = 1, 2, ..., M, M is the total number of time steps, and M < T. The step difference Δτ = τ between two adjacent time steps k -τ k-1 =10;

[0107] Step 4.3, repeat step 4.2 until the hidden state of the 0th time step is generated Obtain the corresponding meteorological wind field data;

[0108] Step 4.4, as shown in the formula, compare the obtained meteorological wind field data with the preset error range; Figure 7

[0109] If the meteorological wind field data is within the preset error range, determine that the trained target diffusion model is a qualified final target diffusion model;

[0110] If the meteorological wind field data is outside the preset error range, return to step 1 and reacquire the data sample set until a qualified final target diffusion model is obtained.

[0111] As shown in the formula, wherein the four comparison samples are randomly selected from the test set, and the left column of each test sample is the true value and the right column is the predicted value. Figure 8

[0112] Table 1 lists the evaluation index values of the prediction results of the test samples, and it can be seen that the MSE and MAE are small, and most of the Corr and SSIM are greater than 0.7, indicating that the predicted value is in good agreement with the true value.

[0113] Table 1 Evaluation index values of the prediction results of the test samples

[0114]

[0115] Step 5, perform meteorological wind field data rapid downscaling calculation through the qualified final target diffusion model.

[0116] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.​​

Claims

1. A method for fast downscaling of meteorological wind field data based on diffusion model and attention mechanism, characterized in that, The method comprises the following steps: Step 1, obtaining a data sample set comprising low-resolution meteorological wind field data and terrain elevation data, and dividing the data sample set into a training set and a test set; Step 2, an initial target diffusion model based on a UNet network is constructed, which is used for inputting low-resolution meteorological wind field data to perform fast downscaling calculation to obtain high-resolution meteorological wind field data; the initial target diffusion model includes a noise prediction network ε θ ; the noise prediction network ε θ is used for predicting noise; Step 3, use the training set to train the noise prediction network ε of the initial target diffusion model θ Training is performed to build the final target diffusion model; Step 4, testing the trained final target diffusion model with the test set to determine a qualified final target diffusion model; Step 5, performing rapid downscaling calculation of meteorological wind field data through the qualified final target diffusion model.

2. The method of claim 1, wherein the method is characterized by, Step 1 specifically comprises: Step 1.1, obtaining ERA5 reanalysis data, fine meteorological data and terrain elevation data; Step 1.2, performing spatio-temporal alignment on the ERA5 reanalysis data, fine meteorological data and terrain elevation data, and extracting wind speed vector wind1 at the target height every hour and wind speed vector wind2 at the target pressure layer every hour from the ERA5 reanalysis data, and extracting wind speed vector wind3 at the target height every hour and wind speed vector wind4 at the surface pressure layer every hour from the fine meteorological data; Step 1.3, preprocessing the wind speed vector wind1, wind speed vector wind2, wind speed vector wind3, wind speed vector wind4 and spatial dimension aligned terrain elevation data; Step 1.4, creating a data sample set by using the preprocessed wind speed vector wind1, wind speed vector wind2, wind speed vector wind3, wind speed vector wind4 and terrain elevation data, and randomly dividing the created data sample set into a training set and a test set.

3. The method of claim 2, wherein the method is characterized by, Step 2 specifically comprises: Step 2.1, obtaining an initial diffusion model; Step 2.2, designing a forward noise adding process for the initial diffusion model: wherein x t is the noisy result of the t-th time step, x0 is the result of tensor splicing of the wind speed vector wind3 and the wind speed vector wind4 in the channel dimension, as the initial data without noise, ε ~ N(0, I) is a standard Gaussian random noise, α t = 1-β t , β t = β min + (β max - β min )·(t / T) and β t ∈(0, 1) represent the intensity coefficient of the added noise, which is generated by linear scheduling, T is the total number of time steps of the diffusion process, α i is the weight coefficient of retaining the noisy result of the last time step, β max and β min are the preset maximum noise intensity and minimum noise intensity, respectively; Step 2.

3. Constructing a noise prediction network ε based on UNet network and attention mechanism to design the initial diffusion model reverse denoising process θ , obtaining the initial target diffusion model.

4. The method of claim 3, wherein the method is characterized by, Step 3 specifically comprises: Step 3.1, Noise prediction network ε for the initial target diffusion model θ Hyperparameter setting is performed; Step 3.2, tensor splicing wind speed vector wind3 and wind speed vector wind4 in the channel dimension in the training set to obtain noise-free initial data x0, and tensor splicing wind speed vector wind1 and wind speed vector wind2 in the channel dimension in the training set to obtain a conditional input s, uniformly sampling a time step t from {1,…,T}, and sampling random noise ε from standard Gaussian noise ε ~ N(0,I) to obtain sampling data; Step 3.3: Calculate the noise prediction network ε using the sampling data obtained in Step 3.

2. θ gradient For noise prediction network ε θ The parameters are updated; where θ is the trainable parameter of the noise prediction network in the target diffusion model, and h is the terrain elevation data in the training set. Step 3.4, repeat Step 3.2~Step 3.3 until the noise prediction network ε of the initial target diffusion model converges, obtaining a final target diffusion model. θ converges, obtaining a final target diffusion model.

5. The method of claim 4, wherein the method is characterized by, Step 4 specifically comprises: Step 4.1, concatenate the wind velocity vector wind1 and the wind velocity vector wind2 in the channel dimension to obtain the conditional input s test sample a random noise x from a standard Gaussian noise ε ~ N(0, I) T ; Step 4.2, from time step T M = Tstart k the hidden state at time step T test , the conditional input s k , and the terrain elevation h test in the test set θ , the noise prediction network e k-1 that inputs the final target diffusion model, computes the hidden state wherein k = 1, 2,... M, M is the total number of time steps, and M < T, Step 4.

3. Repeat Step 4.2 until the hidden state of the 0th time step is generated obtaining corresponding meteorological wind field data; Step 4.4, comparing the obtained meteorological wind field data with the preset error range; If the meteorological wind field data is within the preset error range, the trained target diffusion model is determined as a qualified final target diffusion model; If the meteorological wind field data is outside the preset error range, return to step 1 and reacquire the data sample set until a qualified final target diffusion model is obtained.

6. The method of claim 5, wherein the method is characterized by, Step 5 specifically comprises: Collecting on-site low-resolution meteorological wind field data and inputting the qualified final target diffusion model, performing rapid downscaling calculation of the low-resolution meteorological wind field data through the qualified final target diffusion model to obtain high-resolution meteorological wind field data, and completing the rapid downscaling calculation of meteorological wind field data based on the diffusion model and attention mechanism.

7. The method of claim 6, wherein the method is characterized by, In step 1.2, the spatio-temporal alignment step specifically comprises: In the time dimension, the ERA5 reanalysis data and the fine weather data are corresponded hour by hour; in the space dimension, the corresponding space region centers of the ERA5 reanalysis data, the fine weather data and the terrain elevation data are overlapped, and the region range corresponding to the fine weather data is located in the region range corresponding to the ERA5 reanalysis data.

8. The method of claim 7, wherein the method is characterized by, In step 1.3, the preprocessing step is specifically: For the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data, the mean and standard deviation thereof are calculated respectively; then the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data are subtracted by the corresponding mean and divided by the corresponding standard deviation, to complete the preprocessing of the wind speed vector wind1, the wind speed vector wind2, the wind speed vector wind3, the wind speed vector wind4 and the spatial dimension aligned terrain elevation data.

9. The method of claim 8, wherein the method is characterized by, Step 3.3 is specifically: The output values of the noise prediction network involving attention mechanism are calculated by forward propagation using the sampling data obtained in step 3.2 And the gradient of the noise prediction network ε θ is calculated by back propagation The parameters of the noise prediction network ε θ are updated using the AdamW optimizer; wherein θ is the parameters of the noise prediction network of the target diffusion model.

10. The diffusion model and attention mechanism based meteorological wind field data rapid downscaling calculation method according to claim 9, characterized in that: Step 1.1 is specifically downloading ERA5 reanalysis data from a meteorological website; obtaining fine weather data and terrain elevation data by using a WRF model; the spatial resolution of the ERA5 reanalysis data is 0.25°; the time resolution of the fine weather data and the terrain elevation data is 1h, and the spatial resolution thereof is less than or equal to 3km; In step 3.1, the hyperparameters include batch size, learning rate, training round number and optimizer parameters; In step 3.3, the output value The attention mechanism involved in the calculation is as follows: where j represents the jth attention head, d j is the head dimension size, Q j is the linear projection transformation result of the output value of the intermediate layer of the UNet network, K j and V j are the linear projection transformation results of the conditional input s and the terrain elevation h in different projection spaces, respectively, and T is the transpose symbol.

Citation Information

Cited By

  • Precipitation downscaling method, equipment and medium

    CN121213356A