WACCM model product space downscaling method based on diffusion model, electronic device and storage medium
By adopting a spatial downscaling method for WACCM model products based on a diffusion model, the problem of high computational resource consumption in traditional dynamic downscaling methods is solved, achieving efficient generation of high-resolution meteorological fields and improving generation accuracy.
Patent Information
- Application Number
- CN202611291672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional meteorological spatiotemporal downscaling methods, which employ dynamic downscaling, suffer from high computational resource consumption.
A spatial downscaling method for WACCM model products based on a diffusion model is adopted. By acquiring and stitching low-resolution meteorological element fields and high-resolution topographic data, the data are input into a pre-trained diffusion downscaling model for back-diffusion sampling to generate a high-resolution meteorological element field, which is then subjected to inverse normalization processing.
It reduces computational complexity and saves computing resources, while the generated high-resolution meteorological field is more consistent with atmospheric physics, thus improving the accuracy of generation.
Smart Images

Figure CN123071673A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of meteorological data downscaling technology, and more specifically, to a spatial downscaling method for WACCM model products based on a diffusion model, electronic equipment, and storage medium. Background Technology
[0002] The meteorological time-space downscaling method mainly involves downscaling the low-resolution (e.g., 1°) meteorological element fields output by the whole-layer atmospheric climate model (WACCM) to a high-resolution (e.g., 0.25°) level to improve the precision of regional climate simulation and forecasting.
[0003] Currently, the traditional meteorological spatiotemporal downscaling method adopts the dynamic downscaling method, which uses the nested global climate model (GCM) and regional climate model (RCM) to use the boundary conditions provided by the GCM to drive the RCM to generate high-resolution regional climate data. However, this dynamic downscaling method has the problem of high computational resource consumption. Summary of the Invention
[0004] The purpose of this application is to provide a spatial downscaling method for WACCM model products based on a diffusion model, an electronic device, and a storage medium, in order to solve the problem of high computational resource consumption in traditional meteorological spatiotemporal downscaling methods that use dynamic downscaling methods.
[0005] In a first aspect, this application provides a spatial downscaling method for WACCM model products based on a diffusion model. The method includes: acquiring a target low-resolution meteorological element field and target high-resolution topographic data of the corresponding region, wherein the target low-resolution meteorological element field is obtained by normalizing and resampling the initial low-resolution meteorological element field output by the WACCM model; stitching the target low-resolution meteorological element field and the target high-resolution topographic data to generate a target conditional image; inputting the target conditional image into a pre-trained diffusion downscaling model, and performing a condition-guided backdiffusion sampling process through the diffusion downscaling model to generate a normalized high-resolution meteorological element field; and performing denormalization processing on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0006] The spatial downscaling method for WACCM model products based on the diffusion model provided in this solution first acquires preprocessed low-resolution meteorological element fields and corresponding high-resolution topographic data, and then stitches them together to form a conditional image, providing the model with necessary meteorological background information and topographic constraints. The conditional image is then input into a pre-trained diffusion downscaling model. Guided by the conditional image, the model gradually removes initial noise through a backdiffusion sampling process to generate a high-resolution meteorological element field. Finally, the generated normalized high-resolution field is denormalized to restore its physical units and dimensions, yielding the final target high-resolution meteorological element field. Thus, this method, based on diffusion model technology in generative artificial intelligence, achieves spatial downscaling by explicitly modeling the complex nonlinear mapping relationship and probability distribution from low-resolution to high-resolution meteorological fields. Because it uses a deep learning model for end-to-end inference, it eliminates the need to solve complex atmospheric dynamic equations, significantly reducing computational complexity and saving computational resources. Furthermore, topography is an important lower boundary forcing factor affecting the distribution of regional meteorological elements. By introducing high-resolution topographic data as a conditional constraint, it can accurately reflect the local modulation effect of topography on meteorological elements, resulting in a more consistent generation of atmospheric physical laws and improving the accuracy of generating the target high-resolution meteorological field.
[0007] In an optional implementation of the first aspect, before acquiring the target low-resolution meteorological element field and the high-resolution terrain data of the region corresponding to the target low-resolution meteorological element field, the method further includes: acquiring the initial low-resolution meteorological element field and the initial high-resolution terrain data output by the WACCM model, wherein the initial low-resolution meteorological element field includes multiple meteorological variables; resampling the initial low-resolution meteorological element field to the high-resolution target grid using bilinear interpolation to generate an initial interpolated low-resolution field; and standardizing the initial interpolated low-resolution field and the initial high-resolution terrain data based on the mean and standard deviation corresponding to the spatiotemporal region where the initial low-resolution meteorological element field is located to obtain the target low-resolution meteorological element field and the target high-resolution terrain data.
[0008] In the above implementation method, this scheme uses a normalization method to adjust the data to a distribution with a mean of 0 and a standard deviation of 1, which can effectively alleviate the gradient vanishing or gradient exploding problem, making model training more stable and convergence faster. At the same time, spatial resampling is performed through bilinear interpolation to ensure that the low-resolution meteorological element field has the same geographic projection and grid coordinates as the high-resolution terrain data and the high-resolution meteorological element field, avoiding model training errors caused by spatial misalignment.
[0009] In an optional implementation of the first aspect, a condition-guided backdiffusion sampling process is performed through a diffusion downscaling model to generate a normalized high-resolution meteorological element field, including: initializing the backdiffusion sampling process to generate an initial input current noisy image; obtaining the target number of sampling time steps configured by the DDIM accelerator sampler; at the current sampling time step, inputting the current noisy image, the corresponding time step feature vector generated by sinusoidal position encoding, and the target conditional image into the denoising network of the diffusion downscaling model; extracting multi-scale spatiotemporal features, time step feature vectors, and preset conditional constraints through the denoising network to predict the predicted noise corresponding to the current sampling time step; calculating the noisy image of the previous sampling time step of backdiffusion based on the predicted added noise, the current noisy image, and the target conditional image; and obtaining the normalized high-resolution meteorological element field after completing the iteration of the target number of sampling time steps.
[0010] In the above implementation, this solution uses the DDIM accelerated sampler to skip some unnecessary sampling steps through an implicit probabilistic model, significantly improving inference speed and meeting near real-time operational requirements. Simultaneously, by introducing time-step encoding and conditional guidance, the model can generate features at different scales in different denoising stages, ultimately producing a high-resolution meteorological field with clear spatial structure and rich detail.
[0011] In an optional implementation of the first aspect, the training process of the diffusion downscaling model includes: acquiring a target training dataset, wherein the target training dataset includes multiple sets of spatiotemporally aligned sample pairs, each set of sample pairs including normalized and resampled low-resolution meteorological element field samples, normalized ERA5 high-resolution meteorological element field samples corresponding to the spatiotemporal range, and normalized high-resolution terrain data of the target area; performing a first-stage pre-training on the constructed Temresnet-based pre-trained model according to the target training dataset to obtain a pre-trained model; and performing a second-stage noise addition and removal training on the pre-trained model to obtain the diffusion downscaling model.
[0012] The above implementation adopts a two-stage training strategy. The first stage of deterministic pre-training can provide good parameter initialization for the diffusion model, enabling the second stage of fine-tuning to converge quickly and significantly reducing the total training time. At the same time, the first stage of deterministic pre-training ensures the overall accuracy of the generated results, while the second stage of diffusion model fine-tuning enhances the detail richness and statistical rationality of the generated results. The combination of the two can generate high-quality, high-resolution meteorological fields.
[0013] In an optional implementation of the first aspect, a first-stage pre-training of the constructed pre-trained model based on the Temresnet architecture is performed on the target training dataset to obtain the pre-trained model, including: extracting a batch of sample pairs from the target training dataset; performing preprocessing on the low-resolution meteorological element field samples and high-resolution terrain data samples in the sample pairs to generate first target conditional image samples; inputting the first target conditional image samples into the pre-trained Temresnet network, wherein the pre-trained Temresnet network is a U-net network structure with the time-step input module removed, which includes an encoder, a bottleneck layer, and a decoder. The encoder is composed of multiple residual blocks cascaded with downsampling modules, and the decoder is composed of multiple upsampling modules cascaded with residual blocks. Each residual block contains a two-dimensional convolutional layer, a group normalization layer, and a Mish activation function. The pre-trained Temresnet network introduces a sinusoidal positional encoding time-step encoding injection mechanism; performing layer-by-layer feature extraction and spatial resolution compression on the first target conditional image samples through the encoder of the Temresnet network to obtain a deep encoded feature map; and then using Temresnet... The network's decoder performs upsampling reconstruction and fusion with the shallow feature maps of the corresponding encoder layer by layer, from deep to shallow, until the high-resolution target grid size is restored, thus obtaining the predicted high-resolution meteorological element field. The predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field samples are input into a preset combined loss function to calculate the loss value between the prediction result and the true label. It is then determined whether the loss value has converged or whether the number of model iterations has reached the first-stage target number. If the loss value has not converged and the number of iterations has not reached the first-stage target number, the model parameters are updated by backpropagation using the gradient descent algorithm based on the loss value, and the process returns to the step of extracting a batch of sample pairs from the training set. If the loss value has converged or the number of iterations has reached the first-stage target number, the model weights of the first-stage pre-trained model are saved, and the pre-trained model is obtained.
[0014] In the above implementation, the Temresnet network employs an encoder-decoder structure and skip connections. The encoder extracts features at different scales, and the decoder fuses deep and shallow features to recover detailed information. This simultaneously captures both large-scale background information and small-scale details of the meteorological field, improving the model's feature extraction capability. Furthermore, the use of residual blocks, group normalization, and the Mish activation function effectively alleviates the vanishing gradient problem, improves the stability of the training process, and enables the network to be trained to greater depths.
[0015] In an optional implementation of the first aspect, the preset combination loss function is: ;in, For mean square error loss, It is a structural similarity index used to preserve texture structure. The loss is calculated based on the image gradient magnitude, used to enhance the sharp edges of the field distribution. It is 1.0. It is 0.2. It is 0.05.
[0016] The above implementation method employs a combined loss function for the first stage of pre-training, comprehensively considering three aspects: overall bias, structural similarity, and edge sharpness. Mean squared error loss ensures the overall accuracy of the prediction results, structural similarity exponential loss preserves the image's texture structure and visual quality, and gradient loss enhances the image's edge sharpness and detail information. By adjusting the weight coefficients of different loss functions, the performance of each aspect is balanced, enabling the model to generate a high-resolution weather field that possesses both high overall accuracy and rich detail information with good visual quality.
[0017] In an optional implementation of the first aspect, a second-stage noise addition and removal training is performed on the pre-trained model to obtain a diffusion downscaling model, including: loading the model weights of the pre-trained model as initial parameters and configuring diffusion process parameters, wherein the diffusion process parameters include the total number of diffusion steps and residual mixing coefficients; extracting a batch of target sample pairs from the target training dataset, and generating second target conditional image samples based on the low-resolution meteorological element field samples and high-resolution terrain data samples in the target sample pairs; performing a forward noise addition process on the ERA5 high-resolution meteorological element field samples in the target sample pairs to obtain a noisy image; inputting the noisy image, the corresponding time step encoding, and the second target conditional image samples into the Temresnet network to obtain a network pre-trained model. The noise value is measured; the predicted noise value and the real noise added during the forward process are input into the preset noise loss function to calculate the total loss value; it is determined whether the total loss value has converged or whether the number of model iterations has reached the target number of the second stage; if it is determined that the total loss value has not converged and the number of iterations has not reached the target number of the second stage, the model parameters are updated by performing backpropagation using the gradient descent algorithm based on the total loss value, and the process is returned to execute the step of extracting a batch of target sample pairs from the training set and generating the second target conditional image sample based on the low-resolution meteorological element field sample and high-resolution terrain data sample in the target sample pair; if it is determined that the total loss value has converged or the number of iterations has reached the target number of the second stage, the model weights after the second stage fine-tuning are saved to obtain the diffusion downscaling model.
[0018] In the above implementation method, the second-stage noise addition and removal training enables the model to learn the high-frequency detailed features of the data, effectively recovering the small-scale meteorological information that was smoothed out by low resolution. Simultaneously, the improved forward noise addition process, which introduces residual mixing coefficients, better guides the generation process, improving the stability and consistency of the generated results.
[0019] In an optional implementation of the first aspect, obtaining the target training dataset includes: obtaining multiple sets of data pairs, each set of data pairs containing a low-resolution meteorological element field output by the WACCM model, a corresponding spatiotemporal range ERA5 high-resolution meteorological element field, and high-resolution terrain data of the target area; performing outlier removal and normalization on the ERA5 high-resolution meteorological element field in each data pair to obtain normalized ERA5 high-resolution meteorological element field samples for the corresponding spatiotemporal range; resampling the initial low-resolution meteorological element field in each data pair to a high-resolution target grid using bilinear interpolation to generate an initial interpolated low-resolution field for each data pair; standardizing the initial interpolated low-resolution field and initial high-resolution terrain data of each data pair based on the mean and standard deviation of the corresponding variables of all samples to obtain normalized and resampled low-resolution meteorological element field samples and normalized high-resolution terrain data of the target area, thereby obtaining the target training dataset.
[0020] The above implementation methods, through outlier removal and standardization, can effectively improve the quality of training data and avoid the negative impact of outliers and data distribution differences on model training. Simultaneously, spatiotemporal alignment ensures accurate correspondences between low-resolution fields, high-resolution fields, and terrain data, providing a foundation for the model to learn the correct mapping relationships.
[0021] Secondly, this application provides a spatial downscaling device for WACCM model products based on a diffusion model. The device includes an acquisition module, a stitching module, a diffusion downscaling module, and an inverse normalization processing module. The acquisition module acquires a target low-resolution meteorological element field and target high-resolution topographic data of the corresponding area. The target low-resolution meteorological field elements are obtained by normalizing and resampling the initial low-resolution meteorological element field output by the WACCM model. The stitching module stitches the target low-resolution meteorological element field and the target high-resolution topographic data to generate a target conditional image. The diffusion downscaling module inputs the target conditional image into a pre-trained diffusion downscaling model, and performs a condition-guided inverse diffusion sampling process through the diffusion downscaling model to generate a normalized high-resolution meteorological element field. The inverse normalization processing module performs inverse normalization processing on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0022] The spatial downscaling device for WACCM model products based on the diffusion model provided in this solution first acquires preprocessed low-resolution meteorological element fields and corresponding high-resolution topographic data, and then stitches them together to form a conditional image, providing the model with necessary meteorological background information and topographic constraints. The conditional image is then input into a pre-trained diffusion downscaling model. Guided by the conditional image, the model gradually removes initial noise through a back-diffusion sampling process to generate a high-resolution meteorological element field. Finally, the generated normalized high-resolution field is denormalized to restore its physical units and dimensions, yielding the final target high-resolution meteorological element field. Thus, this method, based on diffusion model technology in generative artificial intelligence, achieves spatial downscaling by explicitly modeling the complex nonlinear mapping relationship and probability distribution from low-resolution to high-resolution meteorological fields. Because it uses a deep learning model for end-to-end inference, there is no need to solve complex atmospheric dynamic equations, significantly reducing computational complexity and saving computational resources. Furthermore, topography is an important lower boundary forcing factor affecting the distribution of regional meteorological elements. By introducing high-resolution topographic data as a conditional constraint, the local modulation effect of topography on meteorological elements can be accurately reflected, resulting in a more consistent generation of atmospheric physical laws and improving the accuracy of generating the target high-resolution meteorological field.
[0023] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method described in the first aspect and any optional embodiment of the first aspect.
[0024] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the method described in the first aspect or any optional embodiment of the first aspect.
[0025] Fifthly, the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, perform the method described in the first aspect and any optional embodiment of the first aspect.
[0026] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0027] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 A first flowchart of the spatial downscaling method for WACCM pattern products based on a diffusion model provided in this application embodiment; Figure 2 A second flowchart of the spatial downscaling method for WACCM pattern products based on a diffusion model provided in this application embodiment; Figure 3 The third flowchart of the spatial downscaling method for WACCM pattern products based on the diffusion model provided in this application embodiment; Figure 4 The fourth flowchart of the spatial downscaling method for WACCM pattern products based on the diffusion model provided in this application embodiment; Figure 5 The fifth flowchart of the spatial downscaling method for WACCM pattern products based on the diffusion model provided in this application embodiment; Figure 6 A schematic diagram of the spatial downscaling device for WACCM model products based on a diffusion model provided in this application embodiment; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0029] Icons: 600 - Acquisition module; 610 - Stitching module; 620 - Diffusion downscaling module; 630 - Inverse normalization processing module; 7 - Electronic device; 701 - Processor; 702 - Memory; 703 - Communication bus. Detailed Implementation
[0030] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0032] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0033] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0034] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0035] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0036] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0037] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0038] The meteorological time-space downscaling method mainly involves downscaling the low-resolution (e.g., 1°) meteorological element fields output by the whole-layer atmospheric climate model (WACCM) to a high-resolution (e.g., 0.25°) level to improve the precision of regional climate simulation and forecasting.
[0039] Currently, the traditional meteorological spatiotemporal downscaling method adopts the dynamic downscaling method, which uses the nested global climate model (GCM) and regional climate model (RCM) to use the boundary conditions provided by the GCM to drive the RCM to generate high-resolution regional climate data. However, this dynamic downscaling method has the problem of high computational resource consumption.
[0040] To address the aforementioned issues, this application provides a spatial downscaling method, electronic device, and storage medium for WACCM model products based on a diffusion model. First, preprocessed low-resolution meteorological element fields and corresponding high-resolution terrain data are acquired. These are then stitched together to form a conditional image, providing the model with necessary meteorological background information and terrain constraints. Next, the conditional image is input into a pre-trained diffusion downscaling model. Guided by the conditional image, the model gradually removes initial noise through a backdiffusion sampling process to generate a high-resolution meteorological element field. Finally, the generated normalized high-resolution field is denormalized to restore its physical units and dimensions, yielding the final target high-resolution meteorological field. Based on the diffusion model technique in generative artificial intelligence, this method achieves spatial downscaling by explicitly modeling the complex nonlinear mapping relationship and probability distribution from low-resolution meteorological fields to high-resolution meteorological fields. Since it uses a deep learning model for end-to-end inference, there is no need to solve complex atmospheric dynamic equations, which greatly reduces computational complexity and saves computing resources. At the same time, topography is an important lower boundary forcing factor affecting the distribution of regional meteorological elements. By introducing high-resolution topographic data as a condition constraint, it can accurately reflect the local modulation effect of topography on meteorological elements. The generated results are more in line with atmospheric physical laws, thus improving the accuracy of generating the target high-resolution meteorological field.
[0041] Based on the above ideas, this application first provides a spatial downscaling method for WACCM pattern products based on a diffusion model. This method can be applied to computing devices, including but not limited to computers, servers, control chips, and host computers, etc. Figure 1 As shown, the spatial downscaling method for this meteorological element field can be implemented in the following ways: Step S100: Obtain the target low-resolution meteorological element field and the target high-resolution terrain data of the corresponding area.
[0042] Step S110: Stitch together the target low-resolution meteorological field and the target high-resolution terrain data to generate a target conditional image.
[0043] Step S120: Input the target conditional image into the pre-trained diffusion downscaling model, and perform a condition-guided reverse diffusion sampling process through the diffusion downscaling model to generate a normalized high-resolution meteorological element field.
[0044] Step S130: Perform inverse normalization on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0045] In the above embodiments, the target low-resolution meteorological element field represents the meteorological element field data obtained by normalizing and resampling the initial low-resolution meteorological element field output by the WACCM model. The WACCM model, short for Whole Atmosphere Community Climate Model, is a global climate model developed by the National Center for Atmospheric Research (NCAR) in the United States, capable of simulating atmospheric processes from the Earth's surface to the thermosphere. Normalization refers to adjusting the numerical range of meteorological data to a unified standard interval. This invention uses the Z-score standardization method, which involves subtracting the mean and dividing by the standard deviation to make the data follow a normal distribution with a mean of 0 and a standard deviation of 1. Data resampling refers to the process of converting low-resolution grid data into high-resolution grid data. This invention uses bilinear interpolation for spatial resampling. The meteorological element field data may include multiple meteorological variables, such as 2m temperature, zonal wind U, meridional wind V, and specific humidity.
[0046] Specifically, as one possible implementation, for step S100, this scheme can first read the original NetCDF format meteorological data output by the WACCM mode, extract the meteorological elements of the target area and time range, obtain the initial low-resolution meteorological element field, and read the digital elevation model (DEM) terrain data of the corresponding area with the same resolution.
[0047] Then, this scheme normalizes each meteorological variable in the initial low-resolution meteorological field by performing Z-score standardization based on the mean and standard deviation of the spatiotemporal region where the initial low-resolution meteorological field is located, thereby eliminating the dimensional differences between different meteorological variables. Furthermore, this scheme uses bilinear interpolation to resample the normalized initial low-resolution meteorological field to the same high-resolution target grid (e.g., 0.25°) as the topographic data. Based on this, this scheme acquires the corresponding high-resolution (e.g., 0.25°) digital elevation model (DEM) topographic data for the target area and performs the same normalization process to obtain the target high-resolution topographic data, achieving spatial alignment. Here, bilinear interpolation refers to the interpolation method that calculates the target point value by weighted average of the four nearest low-resolution grid points around the target point. This achieves spatial grid alignment between the low-resolution meteorological field and the high-resolution topographic field and target field, ensuring consistency in the spatial coordinates of the input and output data.
[0048] Based on obtaining the target low-resolution meteorological element field and the target high-resolution topographic data, this scheme executes step S110 to stitch the target low-resolution meteorological element field and the target high-resolution topographic data to generate a target conditional image. Specifically, as a possible implementation, this scheme can stitch the target low-resolution meteorological element field and the target high-resolution topographic data along the channel dimension to form a multi-channel conditional vector, thereby obtaining the target conditional image. For example, if the target low-resolution meteorological element field consists of three meteorological variables: 2m temperature, zonal wind U, and meridional wind V, then the stitched conditional image will have 4 channels (3 meteorological variable channels: 2m temperature, zonal wind U, and meridional wind V, and 1 topographic data channel). This integrates meteorological information and topographic constraints into a unified input condition, enabling the model to simultaneously utilize large-scale meteorological background and local topographic information for downscaling.
[0049] Based on the target conditional image obtained through the above method, this scheme inputs the target conditional image into a pre-trained diffusion downscaling model, performs a condition-guided backdiffusion sampling process, and generates a normalized high-resolution meteorological element field. The diffusion downscaling model employs the Temresnet network.
[0050] As a specific implementation method, this scheme can load a pre-trained diffusion downscaling model, and use the target conditional image as a guide to gradually add and remove noise from random noise to generate a normalized high-resolution meteorological field.
[0051] Based on the normalized high-resolution meteorological field obtained by the above method, this scheme can perform step S130 to perform inverse normalization processing on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0052] Specifically, this scheme can use the mean and standard deviation of the training set stored in the preprocessing stage to denormalize the generated normalized high-resolution field, restore its physical units and dimensions, obtain the target high-resolution meteorological element field, and then convert the standardized data output by the model into meteorological element values with actual physical meaning, which is convenient for subsequent meteorological analysis and application.
[0053] The spatial downscaling method for WACCM model products based on the diffusion model provided in this solution first acquires preprocessed low-resolution meteorological element fields and corresponding high-resolution topographic data, and then stitches them together to form a conditional image, providing the model with necessary meteorological background information and topographic constraints. The conditional image is then input into a pre-trained diffusion downscaling model. Guided by the conditional image, the model gradually removes initial noise through a backdiffusion sampling process to generate a high-resolution meteorological element field. Finally, the generated normalized high-resolution field is denormalized to restore its physical units and dimensions, yielding the final target high-resolution meteorological element field. Thus, this method, based on diffusion model technology in generative artificial intelligence, achieves spatial downscaling by explicitly modeling the complex nonlinear mapping relationship and probability distribution from low-resolution to high-resolution meteorological fields. Because it uses a deep learning model for end-to-end inference, it eliminates the need to solve complex atmospheric dynamic equations, significantly reducing computational complexity and saving computational resources. Furthermore, topography is an important lower boundary forcing factor affecting the distribution of regional meteorological elements. By introducing high-resolution topographic data as a conditional constraint, it can accurately reflect the local modulation effect of topography on meteorological elements, resulting in a more consistent generation of atmospheric physical laws and improving the accuracy of generating the target high-resolution meteorological field.
[0054] In an optional implementation of this embodiment, step S120 can be implemented as follows: Figure 2 As shown, this solution can be implemented in the following ways, including: Step S200: Initialize the backdiffusion sampling process to generate the current noisy image of the initial input.
[0055] Step S210: Obtain the target number of sampling time steps configured for the DDIM accelerated sampler.
[0056] Step S220: At the current sampling time step, input the current noisy image, the corresponding time step feature vector generated by sinusoidal position encoding, and the target conditional image into the denoising network of the diffusion downscaling model.
[0057] Step S230: Extract multi-scale spatiotemporal features, time step feature vectors, and preset condition constraints through a denoising network to predict the noise added to the prediction corresponding to the current sampling time step.
[0058] Step S240: Based on the predicted noise addition, the current noisy image, and the target conditional image, calculate the noisy image of the previous sampling time step of back diffusion.
[0059] Step S250: After completing the iteration of the target number of sampling time steps, a normalized high-resolution meteorological element field is obtained.
[0060] In the above implementation, the DDIM accelerated sampler refers to DenoisingDiffusion Implicit Models, which is an improved diffusion model sampling algorithm that can significantly reduce the number of sampling steps from 1000 steps during training to 50-100 steps while maintaining the generation quality, thus significantly improving the inference speed.
[0061] Sine position coding is a method that converts discrete time steps into continuous feature vectors. It encodes signals of different frequencies using sine and cosine functions, enabling the model to perceive the current denoising stage.
[0062] The denoising network represents the core component of the diffusion model. This invention uses the U-Net network with the Temresnet architecture to predict the noise added to the current noisy image.
[0063] In the above implementation, the condition-guided backdiffusion sampling process is the core step in generating a high-resolution meteorological field. First, the backdiffusion sampling process is initialized to generate a current noisy image that follows a standard Gaussian distribution. For example, the current noisy image can be a tensor with the same size as the target high-resolution image, whose elements follow a standard normal distribution.
[0064] This scheme then configures the target number of sampling time steps for the DDIM accelerated sampler. For example, it sets the total number of sampling steps for the DDIM sampler, typically 50-100 steps. A sampling time step sequence is generated, gradually decreasing from the maximum time step T to 0. The number of sampling steps can be adjusted according to the requirements for generation quality and speed; more steps result in higher generation quality but slower speed. In this application, it can be set to any value between 50-100 steps, achieving a balance between quality and speed.
[0065] Based on the above configuration, this scheme inputs the current noisy image, the time-step feature vector, and the target conditional image into the denoising network at the current sampling time step. Specifically, this scheme performs sinusoidal position encoding on the current time step to generate a time-step feature vector, and then inputs the current noisy image, the time-step feature vector, and the target conditional image into the Temresnet denoising network. The sinusoidal position encoding formula can be any existing sinusoidal position encoding formula; it is sufficient to inject the obtained time-step feature vector into each residual block using additive modulation after passing it through a fully connected layer.
[0066] Building upon the above, this scheme extracts multi-scale spatiotemporal features, time-step feature vectors, and preset conditional constraints through a denoising network to predict the noise added at the current sampling time step. Specifically, the denoising network extracts multi-scale features through its encoder, which are then integrated by a bottleneck layer and gradually restored by the decoder to finally output the predicted noise added. During upsampling, the decoder can fuse features from corresponding layers of the encoder via skip connections, thereby simultaneously capturing both the large-scale background and small-scale details of the meteorological field and accurately predicting the noise added at the current step.
[0067] Based on the predicted noise addition obtained above, this scheme calculates the noisy image of the previous sampling time step in the backdiffusion process, according to the predicted noise addition, the current noisy image, and the target condition image. Specifically, this scheme can calculate the noisy image of the previous sampling time step according to the DDIM update formula, which is: ; in, This is the noisy image from the previous sampling time step. The current noisy image; t is the current sampling time step; C is the target conditional image; Add noise to the prediction; , These are the cumulative noise scheduling parameters; The standard deviation of the sampling noise. It is random Gaussian noise.
[0068] By continuously iterating in reverse through the above process, a normalized high-resolution meteorological element field is obtained after completing the iteration of the target number of sampling time steps.
[0069] In the above implementation, this solution uses the DDIM accelerated sampler to skip some unnecessary sampling steps through an implicit probabilistic model, significantly improving inference speed and meeting near real-time operational requirements. Simultaneously, by introducing time-step encoding and conditional guidance, the model can generate features at different scales in different denoising stages, ultimately producing a high-resolution meteorological field with clear spatial structure and rich detail.
[0070] In an optional implementation of this embodiment, the training process of the diffusion downscaling model designed in this scheme is as follows: Figure 3 As shown, this can be achieved in the following ways, including: Step S300: Obtain the target training dataset.
[0071] Step S310: Perform the first stage of pre-training on the constructed pre-trained model based on the Temresnet architecture according to the target training dataset to obtain the pre-trained model.
[0072] Step S320: Perform a second-stage noise addition and removal training on the pre-trained model to obtain a diffusion downscaling model.
[0073] In the above implementation, the target training dataset consists of multiple sets of spatiotemporally aligned sample pairs. Each sample pair includes a low-resolution meteorological element field sample, a corresponding high-resolution meteorological element field sample, and a high-resolution terrain data sample.
[0074] As one possible implementation, this scheme can collect multiple sets of data pairs. Each set of data pairs includes a low-resolution meteorological element field output by the WACCM model, a corresponding high-resolution ERA5 meteorological element field for the spatiotemporal range, and high-resolution topographic data of the target area. After preprocessing, spatiotemporally aligned sample pairs are constructed. The ERA5 high-resolution meteorological element field represents the fifth-generation global atmospheric reanalysis dataset released by the European Centre for Medium-Range Weather Forecasts (ECMWF), which has high spatiotemporal resolution and accuracy. This application uses it as the high-resolution ground truth for model training.
[0075] It should be noted that each sample pair corresponds to low-resolution meteorological field, high-resolution meteorological field, and topographic data of the same time and region.
[0076] As a specific implementation method, after obtaining multiple sets of data pairs, this scheme can perform outlier removal and normalization on the ERA5 high-resolution meteorological element field in each data pair to obtain normalized ERA5 high-resolution meteorological element field samples for the corresponding spatiotemporal range. Then, bilinear interpolation is used to resample the initial low-resolution meteorological element field in each data pair to the high-resolution target grid to generate the initial interpolated low-resolution field for each data pair. Based on the mean and standard deviation of the corresponding variables of all samples, the initial interpolated low-resolution field and the initial high-resolution terrain data of each data pair are standardized to obtain normalized and resampled low-resolution meteorological element field samples and normalized high-resolution terrain data of the target area, thereby obtaining the target training dataset, which may include a training set, a validation set, and a test set.
[0077] In constructing the training dataset, this scheme can employ a sliding window technique to generate more training samples from long-term meteorological data, increasing the quantity and diversity of the training data. Furthermore, it can integrate multi-source observation data, such as ground meteorological station observation data and satellite remote sensing data, to further improve the quality and representativeness of the training data.
[0078] This scheme uses the target training dataset obtained in the above manner to train the pre-trained model based on the Temresnet architecture in two stages. The first stage is deterministic training, which enables the model to directly learn the deterministic mapping from low-resolution fields and terrain data to high-resolution fields, providing good parameter initialization for the diffusion model. The second stage is noise addition and removal training, which enables the model to learn the residuals and noise in the data distribution, thereby completing the training of the diffusion downscaling model.
[0079] Furthermore, this approach can introduce physical consistency constraints during model training by adding soft physics constraints to the loss function. For example, for temperature and wind fields, a thermo-wind equilibrium residual term can be added to penalize situations where the generated results deviate significantly from the thermo-wind relationship in the vertical direction, guiding the model to generate fields that better conform to atmospheric dynamics. Additionally, data augmentation techniques, such as random flipping, rotation, and pruning, can be employed to increase the diversity of training data and improve the model's generalization ability.
[0080] The above-described implementation scheme adopts a two-stage training strategy. The first stage of deterministic pre-training provides good parameter initialization for the diffusion model, enabling the second stage of fine-tuning to converge quickly and significantly reducing the total training time. At the same time, the first stage of deterministic pre-training ensures the overall accuracy of the generated results, while the second stage of diffusion model fine-tuning enhances the detail richness and statistical rationality of the generated results. The combination of the two can generate high-quality, high-resolution meteorological fields.
[0081] In an optional implementation of this embodiment, as one possible approach, for the first stage of pre-training described above, such as... Figure 4 As shown, this solution can be implemented in the following ways, including: Step S400: Extract a batch of sample pairs from the training set, and perform preprocessing on the low-resolution meteorological field samples and high-resolution topographic data samples in the sample pairs to generate the first target conditional image samples.
[0082] Step S410: Input the first target conditional image sample into the pre-trained Temresnet network.
[0083] Step S420: Perform layer-by-layer feature extraction and spatial resolution compression on the first target conditional image sample through the encoder of the Temresnet network to obtain a deep coding feature map.
[0084] Step S430: The decoder of the Temresnet network performs upsampling reconstruction layer by layer in the order from deep to shallow, and fuses the shallow feature maps of the corresponding level encoder until the target grid size is restored to obtain the predicted high-resolution meteorological element field.
[0085] Step S440: Input the predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample into the preset combined loss function, and calculate the loss value between the prediction result and the true label.
[0086] Step S450: Determine whether the loss value has converged or whether the number of model iterations has reached the target number of the first stage. If yes, proceed to step S460; otherwise, proceed to step S470.
[0087] Step S460: Save the model weights from the first stage of pre-training to obtain the pre-trained model.
[0088] Step S470: Update the model parameters by performing backpropagation using the gradient descent algorithm based on the loss value, and then proceed to step S400.
[0089] In the above implementation, this scheme first randomly selects a batch of sample pairs from the training set. Each sample pair includes a low-resolution meteorological field, a high-resolution meteorological field, and terrain data. Based on the low-resolution meteorological field and terrain data in the sample pair, a first target conditional image sample is generated by stitching together.
[0090] This scheme inputs the first target conditional sample obtained by splicing into a pre-trained Temresnet network. The Temresnet network is a U-net network structure with the time step input module removed. It includes an encoder, a bottleneck layer and a decoder. The encoder is composed of multiple residual blocks and downsampling modules cascaded together. The decoder is composed of multiple upsampling modules and residual blocks cascaded together. Each residual block contains a two-dimensional convolutional layer, a group normalization layer and a Mish activation function. The pre-trained Temresnet network introduces a sinusoidal positional encoding time step encoding injection mechanism.
[0091] In the Temresnet network, the network begins forward propagation. The encoder of the Temresnet network performs layer-by-layer feature extraction and spatial resolution compression on the first target conditional image sample to obtain a deep encoded feature map. Then, the decoder of the Temresnet network performs upsampling reconstruction layer by layer from deep to shallow and fuses the shallow feature map of the corresponding level encoder to gradually restore the spatial resolution until it is restored to the high-resolution target grid size, thus obtaining the predicted high-resolution meteorological element field.
[0092] Based on the high-resolution meteorological element field obtained above, this scheme inputs the predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample into a preset combined loss function to calculate the loss value between the prediction result and the true label. If it is determined that the loss value has not converged and the number of iterations has not reached the target number of the first stage, the gradient descent algorithm is used to perform backpropagation to update the model parameters according to the loss value, and the process of re-executing the above training process is repeated by extracting a batch of sample pairs from the training set.
[0093] If the loss value is determined to converge or the number of iterations reaches the target number of the first stage, the model weights of the first stage pre-trained model are saved to obtain the pre-trained model.
[0094] The above-described implementation scheme of the Temresnet network employs an encoder-decoder structure and skip connections. The encoder extracts features at different scales, and the decoder fuses deep and shallow features to recover detailed information. This simultaneously captures both large-scale background information and small-scale details of the meteorological field, improving the model's feature extraction capability. Furthermore, the use of residual blocks, group normalization, and the Mish activation function effectively alleviates the vanishing gradient problem, improves the stability of the training process, and enables the network to be trained to greater depths.
[0095] In an optional implementation of this embodiment, as a specific implementation method, the combined loss function designed in this scheme can be as follows: ; in, For mean square error loss, It is a structural similarity index used to preserve texture structure. The loss is calculated based on the image gradient magnitude, used to enhance the sharp edges of the field distribution. It is 1.0. It is 0.2. It is 0.05.
[0096] Among the above parameters Mean squared error loss represents the mean squared error between the predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample. It is the most commonly used loss function in regression tasks and can measure the overall bias. The structural similarity index represents the similarity between the predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample, calculated based on three aspects: brightness, contrast, and structure of the image. It can better measure the structural similarity and visual quality of the image. Image gradient magnitude loss represents the difference between the gradient magnitude of the calculated predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample, which can enhance the edge sharpness and detail information of the image.
[0097] The weight coefficients of the combined loss function designed in this scheme can be adjusted according to different meteorological elements and application requirements. For example, for meteorological elements with obvious spatial structure, such as precipitation, the weights of the structural similarity index loss and gradient loss can be appropriately increased; for meteorological elements with relatively gentle changes, such as temperature, the weight of the mean squared error loss can be appropriately increased. In addition, the weight coefficients of the loss function can be dynamically adjusted based on the validation results during training to obtain the best training effect.
[0098] The implementation scheme described above employs a combined loss function for the first stage of pre-training, comprehensively considering three aspects: overall bias, structural similarity, and edge sharpness. Mean squared error loss ensures the overall accuracy of the prediction results, structural similarity exponential loss preserves the image's texture and visual quality, and gradient loss enhances the image's edge sharpness and detail. By adjusting the weight coefficients of different loss functions, the performance of each aspect is balanced, enabling the model to generate a high-resolution weather field that possesses both high overall accuracy and rich detail information with good visual quality.
[0099] In an optional implementation of this embodiment, for the second stage of training described above, such as Figure 5 As shown, this solution can be implemented in the following ways, including: Step S500: Load the model weights of the pre-trained model as initial parameters and configure the diffusion process parameters.
[0100] Step S510: Extract a batch of target sample pairs from the training set, and generate a second target conditional image sample based on the low-resolution meteorological element field sample and the high-resolution terrain data sample in the target sample pair.
[0101] Step S520: Perform a forward noise addition process on the ERA5 high-resolution meteorological element field samples in the target sample pair to obtain a noisy image.
[0102] Step S530: Input the noisy image, the corresponding time step encoding, and the second target conditional image sample into the Temresnet network to obtain the noise value predicted by the network.
[0103] Step S540: Input the predicted noise value and the real noise added during the forward process into the preset noise loss function, and calculate the total loss value.
[0104] Step S550: Determine whether the total loss value has converged or whether the number of model iterations has reached the target number of the second stage. If yes, proceed to step S560; otherwise, proceed to step S570.
[0105] Step S560: Save the model weights after the second stage of fine-tuning to obtain the diffusion downscaling model.
[0106] Step S570: Update the model parameters by performing backpropagation using the gradient descent algorithm based on the total loss value, and return to step S510.
[0107] In the above implementation, this scheme first loads the weights of the pre-trained Temresnet model from the first stage; adds a time-step input module, modifies the network to a diffusion denoising network, configures the total diffusion steps T=1000, uses cosine scheduling for noise scheduling, and sets the residual mixing coefficient... The residuals decrease linearly from 1.0 to 0.01. Here, residual mixing represents the ratio of the residuals between the ERA5 high-resolution meteorological element field samples and the low-resolution meteorological element field samples during the forward noise addition process. By mixing residuals into the noise, the generation process is guided by residual mixing, allowing the model to focus more on learning the missing details in the low-resolution field.
[0108] Based on the above, this scheme extracts a batch of target sample pairs from the training set, and generates second target conditional image samples based on the low-resolution meteorological element field samples and high-resolution terrain data samples in the target sample pairs. The generation method is the same as the first-stage pre-training method, and will not be repeated here.
[0109] This scheme performs a forward noise addition process on the ERA5 high-resolution meteorological element field samples in the target sample pair to obtain a noisy image. Specifically, this scheme can randomly select a sampling time step t, and add noise to the ERA5 high-resolution meteorological element field samples according to the forward noise addition formula to obtain a noisy image. The added noise follows a standard normal distribution.
[0110] Based on the above, this scheme inputs the noisy image, the corresponding time-step encoding, and the second target conditional image sample into the Temresnet network to obtain the noise value predicted by the network. Specifically, this scheme first performs sinusoidal position encoding on time step t to generate a time-step feature vector. The time-step encoding is injected into each residual block in an additive modulation manner, enabling the network to perceive the current denoising stage. The noisy image, the time-step feature vector, and the second target conditional image sample are then input into the Temresnet network, and the Temresnet network outputs the predicted noise.
[0111] Then, this scheme inputs the predicted noise value and the actual noise added during the forward process into a preset noise loss function to calculate the total loss value. Specifically, this scheme can calculate the total loss value using the following noise loss function: ; in, Gaussian noise added to the forward process, For the predicted noise value, This is a high-resolution meteorological field sample from ERA5, where t is the time step for random sampling. Image samples for the second target condition For mathematical expectation, This represents the square of the L2 norm, i.e., the mean square error.
[0112] Based on the total loss calculated in the above manner, this scheme determines whether the total loss value has converged or whether the number of model iterations has reached the target number of the second stage. If it is determined that the total loss has converged or the number of model iterations has reached the target number of the second stage, the final diffusion downscaling model weights are saved to obtain the diffusion downscaling model.
[0113] If the total loss has not converged and the number of model iterations has not reached the target number of the second stage, then the gradient descent algorithm is used to perform backpropagation to update the model parameters based on the total loss value, and the process returns to step S510 to reselect sample pairs and repeat the training process of the second stage.
[0114] In the above-described implementation scheme, the second-stage noise addition and removal training enables the model to learn the high-frequency detailed features of the data, effectively recovering the small-scale meteorological information that was smoothed away by low resolution. Simultaneously, the improved forward noise addition process, which introduces residual mixing coefficients, better guides the generation process, improving the stability and consistency of the generated results.
[0115] Additionally, it's worth noting that this scheme can introduce a physical constraint loss term during the second-stage training process, adding it with a small weight to the total loss function. For example, for the temperature field, a constraint term based on the thermodynamic equation can be added to penalize drastic local changes in the temperature field; for the wind field, a mass conservation constraint term can be added to guide the model to generate a field that better conforms to atmospheric physics. Furthermore, a multi-scale training strategy can be employed to train at different spatial resolutions, improving the model's adaptability to features at different scales.
[0116] The present application scheme is further illustrated below with reference to specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0117] Example 1: Spatial downscaling of the WACCM2 meter temperature field in the first target region.
[0118] This embodiment demonstrates the entire process of downscaling the 1° resolution daily average surface (2 meters) temperature field output by the WACCM model for the first target area in January 2023 to 0.25° resolution.
[0119] Example 1: Data Preparation and Preprocessing Low-resolution source data: Historical simulation output of the WACCM6 model released by the National Center for Atmospheric Research (NCAR), extracting the 1°×1° gridded 2-meter temperature field at 00:00 (UTC) daily within the first target region for a total of 13 years from January 1, 2010 to December 31, 2022.
[0120] High-resolution target data: The ERA5 reanalysis dataset from the European Centre for Medium-Range Weather Forecasts (ECMWF) was used to obtain a daily average 2-meter temperature field with a resolution of 0.25°×0.25° within the same spatiotemporal range.
[0121] Auxiliary terrain data: 0.25° resolution digital elevation model (DEM) data of the first target area provided by the SRTM (Space Shuttle Radar Topography Mission) database.
[0122] Using bilinear interpolation, the 1° data from WACCM are uniformly interpolated onto the 0.25° grid of ERA5 to generate an interpolated low-resolution field.
[0123] For ERA5 data, extreme outlier grid points that exceed the mean ± 3 standard deviations from January 2010 to 2022 are removed.
[0124] The data from 2010 to 2021 were used as the training set, the data from 2022 as the validation set, and the data from January 2023 as the independent test set.
[0125] Regional variable normalization was used to calculate the mean and standard deviation of the temperature fields of WACCM (after ILR) and ERA5 on the training set, and Z-score standardization was performed on all input and output data.
[0126] Example 2: Model Building and Training The Temresnet architecture is adopted, with the encoder and decoder each containing 4 downsampling / upsampling stages. The number of residual blocks in each stage is [2,2,2,2], the number of basic channels is 64, and the activation function used is Mish.
[0127] The total number of diffusion steps T = 1000, and cosine noise scheduling is used. β_t increases linearly from 0.0001 to 0.02, and the residual mixing coefficient... It decreases linearly from 1.0 to 0.01.
[0128] Phase 1: Deterministic Pre-training Loss function: ; Training parameters: Batch size is 32, optimizer is AdamW (learning rate is 3e). -4 The weight decays to 1e -4 The training cycle is 150, and cosine learning rate scheduling is used.
[0129] Load the U-Net weights trained in the first stage.
[0130] Loss function: ; in, This is a thermal wind equilibrium constraint term.
[0131] Training parameters: batch size is 32, optimizer is AdamW (learning rate is 1e). -4 The training cycle is 50.
[0132] Load the WACCM 1° temperature field and 0.25° topographic data from January 1, 2023, and normalize them using the mean and standard deviation of the training set.
[0133] The WACCM field is interpolated to a 0.25° grid to obtain a low-resolution meteorological element field with difference, which is then stitched together with the normalized topographic data in the channel dimension to form a target condition image.
[0134] Load the trained Temresnet model, use the DDIM accelerated sampler, set the sampling step number to 100, and start iterating from standard Gaussian noise x_T to gradually denoise and generate a normalized high-resolution temperature field.
[0135] The generated normalized high-resolution temperature field is denormalized to restore it to Kelvin (K) units and saved as a NetCDF file.
[0136] Figure 6 A schematic structural block diagram of a spatial downscaling device for WACCM model products based on a diffusion model is presented in this application. It should be understood that this device is applied to the computing device described above, and this device is used in conjunction with... Figures 1 to 5 The method embodiments executed in the above text correspond to the steps involved in the aforementioned method. The specific functions of the device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software functional module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware. Specifically, the device includes: an acquisition module 600, a stitching module 610, a diffusion downscaling module 620, and an inverse normalization processing module 630. The acquisition module 600 is used to acquire the target low-resolution meteorological element field and the target high-resolution topographic data of the corresponding area. The target low-resolution meteorological element is obtained by normalizing and resampling the initial low-resolution meteorological element field output by the WACCM model. The stitching module 610 is used to stitch the target low-resolution meteorological element field and the target high-resolution topographic data to generate a target conditional image. The diffusion downscaling module 620 is used to input the target conditional image into a pre-trained diffusion downscaling model and perform a condition-guided reverse diffusion sampling process through the diffusion downscaling model to generate a normalized high-resolution meteorological element field. The inverse normalization processing module 630 is used to perform inverse normalization processing on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0137] The spatial downscaling device for WACCM model products based on the diffusion model provided in this solution first acquires preprocessed low-resolution meteorological element fields and corresponding high-resolution topographic data, and then stitches them together to form a conditional image, providing the model with necessary meteorological background information and topographic constraints. The conditional image is then input into a pre-trained diffusion downscaling model. Guided by the conditional image, the model gradually removes initial noise through a back-diffusion sampling process to generate a high-resolution meteorological element field. Finally, the generated normalized high-resolution field is denormalized to restore its physical units and dimensions, yielding the final target high-resolution meteorological element field. Thus, this method, based on diffusion model technology in generative artificial intelligence, achieves spatial downscaling by explicitly modeling the complex nonlinear mapping relationship and probability distribution from low-resolution to high-resolution meteorological fields. Because it uses a deep learning model for end-to-end inference, there is no need to solve complex atmospheric dynamic equations, significantly reducing computational complexity and saving computational resources. Furthermore, topography is an important lower boundary forcing factor affecting the distribution of regional meteorological elements. By introducing high-resolution topographic data as a conditional constraint, the local modulation effect of topography on meteorological elements can be accurately reflected, resulting in a more consistent generation of atmospheric physical laws and improving the accuracy of generating the target high-resolution meteorological field.
[0138] According to some embodiments of this application, such as Figure 7 As shown, this application provides an electronic device 7, including: a processor 701 and a memory 702. The processor 701 and the memory 702 are interconnected and communicate with each other through a communication bus 703 and / or other forms of connection mechanism (not shown). The memory 702 stores a computer program executable by the processor 701. When the computing device is running, the processor 701 executes the computer program to perform any optional implementation method, such as steps S100 to S130: acquiring a target low-resolution meteorological element field and target high-resolution terrain data of the area corresponding to the target low-resolution meteorological element field; stitching the target low-resolution meteorological element field and the target high-resolution terrain data to generate a target conditional image; inputting the target conditional image into a pre-trained diffusion downscaling model, performing a condition-guided backdiffusion sampling process through the diffusion downscaling model to generate a normalized high-resolution meteorological element field; and performing denormalization processing on the normalized high-resolution meteorological element field to obtain the target high-resolution meteorological element field.
[0139] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the method in any of the aforementioned optional implementations.
[0140] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0141] This application provides a computer program product that, when run on a computer, causes the computer to perform a method in any of the optional implementations.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A spatial downscaling method for WACCM pattern products based on a diffusion model, characterized in that, The method includes: Acquire the target low-resolution meteorological element field and the target high-resolution terrain data of the area corresponding to the target low-resolution meteorological element field, wherein the target low-resolution meteorological field elements are obtained by normalizing the initial low-resolution meteorological element field output by the WACCM model and resampling the data. The target low-resolution meteorological element field and the target high-resolution terrain data are stitched together to generate a target condition image; The target conditional image is input into the pre-trained diffusion downscaling model, and the diffusion downscaling model performs a condition-guided reverse diffusion sampling process to generate a normalized high-resolution meteorological element field. The normalized high-resolution meteorological element field is denormalized to obtain the target high-resolution meteorological element field.
2. The method according to claim 1, characterized in that, Before acquiring the target low-resolution meteorological element field and the high-resolution topographic data of the area corresponding to the target low-resolution meteorological element, the method further includes: Obtain the initial low-resolution meteorological element field output by the WACCM model, wherein the initial low-resolution meteorological element field includes multiple meteorological variables; The initial low-resolution meteorological element field is resampled to a high-resolution target grid using bilinear interpolation to generate an initial interpolated low-resolution field; Acquire terrain data with the same resolution as the initial interpolated low-resolution field to obtain initial high-resolution terrain data; Based on the mean and standard deviation of the initial low-resolution meteorological element field in the spatiotemporal region, the initial interpolated low-resolution field and the initial high-resolution terrain data are normalized to obtain the target low-resolution meteorological element field and the target high-resolution terrain data.
3. The method according to claim 1, characterized in that, The process of performing condition-guided back-diffusion sampling through the diffusion downscaling model to generate a normalized high-resolution meteorological element field includes: Initialize the backdiffusion sampling process to generate the current noisy image of the initial input; Get the target number of sampling time steps configured in the DDIM accelerated sampler; At the current sampling time step, the current noisy image, the corresponding time step feature vector generated by sinusoidal position encoding, and the target conditional image are input into the denoising network of the diffusion downscaling model; The denoising network extracts multi-scale spatiotemporal features, time step feature vectors, and preset conditional constraints to predict the noise added to the current sampling time step. Based on the predicted noise addition, the current noisy image, and the target conditional image, calculate the noisy image of the previous sampling time step of back diffusion; After completing the iteration of the target number of sampling time steps, the normalized high-resolution meteorological element field is obtained.
4. The method according to claim 1, characterized in that, The training process of the diffusion downscaling model includes: Obtain the target training dataset, wherein the target training dataset includes multiple sets of spatiotemporally aligned sample pairs, each set of sample pairs including low-resolution meteorological element field samples after normalization and data resampling, ERA5 high-resolution meteorological element field samples of the corresponding spatiotemporal range after normalization, and high-resolution terrain data of the target area after normalization. The pre-trained model based on the Temresnet architecture is pre-trained in the first stage according to the target training dataset to obtain the pre-trained model. The pre-trained model is then subjected to a second stage of noise addition and removal training to obtain the diffusion downscaling model.
5. The method according to claim 4, characterized in that, The first-stage pre-training of the constructed pre-trained model based on the Temresnet architecture using the target training dataset to obtain the pre-trained model includes: A batch of sample pairs is extracted from the target training dataset, and preprocessing is performed on the low-resolution meteorological element field samples and high-resolution terrain data samples in the sample pairs to generate the first target conditional image samples. The first target conditional image sample is input into a pre-trained Temresnet network, wherein the pre-trained Temresnet network is a U-net network structure with the time step input module removed, which includes an encoder, a bottleneck layer and a decoder. The encoder is composed of multiple residual blocks and downsampling modules cascaded together, and the decoder is composed of multiple upsampling modules and residual blocks cascaded together. Each residual block contains a two-dimensional convolutional layer, a group normalization layer and a Mish activation function. The pre-trained Temresnet network introduces a sinusoidal positional encoding time step encoding injection mechanism. The encoder of the Temresnet network performs layer-by-layer feature extraction and spatial resolution compression on the first target conditional image sample to obtain a deep coded feature map; The decoder of the Temresnet network performs upsampling reconstruction layer by layer from deep to shallow, and fuses it with the shallow feature map of the corresponding level encoder until it is restored to the high-resolution target grid size, thereby obtaining the predicted high-resolution meteorological element field. The predicted high-resolution meteorological element field and the corresponding ERA5 high-resolution meteorological element field sample are input into a preset combined loss function to calculate the loss value between the prediction result and the true label. Determine whether the loss value has converged or whether the number of model iterations has reached the target number of the first stage; If it is determined that the loss value has not converged and the number of iterations has not reached the target number of the first stage, then the model parameters are updated by performing backpropagation using the gradient descent algorithm based on the loss value, and the process returns to the step of extracting a batch of sample pairs from the training set. If the loss value is determined to converge or the number of iterations reaches the target number of the first stage, the model weights of the first stage pre-training are saved to obtain the pre-trained model.
6. The method according to claim 5, characterized in that, The preset combined loss function is: ; in, For mean square error loss, It is a structural similarity index used to preserve texture structure. The loss is calculated based on the image gradient magnitude, used to enhance the sharp edges of the field distribution. It is 1.
0. It is 0.
2. It is 0.
05.
7. The method according to claim 5, characterized in that, The second stage of noise addition and removal training on the pre-trained model to obtain the diffusion downscaling model includes: Load the model weights of the pre-trained model as initial parameters and configure the diffusion process parameters, wherein the diffusion process includes the total number of diffusion steps and the residual mixing coefficient; A batch of target sample pairs is extracted from the target training dataset, and a second target conditional image sample is generated based on the low-resolution meteorological element field sample and the high-resolution terrain data sample in the target sample pair. A forward noise-adding process is performed on the ERA5 high-resolution meteorological element field samples in the target sample pair to obtain a noisy image; The noisy image, the corresponding time step encoding, and the second target conditional image sample are input into the Temresnet network to obtain the noise value predicted by the network. The predicted noise value and the actual noise added during the forward process are input into a preset noise loss function to calculate the total loss value; Determine whether the total loss value has converged or whether the number of model iterations has reached the target number for the second stage; If it is determined that the total loss value has not converged and the number of iterations has not reached the target number of the second stage, then the model parameters are updated by backpropagation using the gradient descent algorithm based on the total loss value, and the process returns to the step of extracting a batch of target sample pairs from the training set and generating a second target conditional image sample based on the low-resolution meteorological element field sample and high-resolution terrain data sample in the target sample pair. If the total loss value is determined to converge or the number of iterations reaches the target number of the second stage, the model weights after the second stage fine-tuning are saved to obtain the diffusion downscaling model.
8. The method according to claim 4, characterized in that, The acquisition of the target training dataset includes: Acquire multiple sets of data pairs. Each set of data pairs includes a low-resolution meteorological field output by the WACCM model, a high-resolution meteorological field of the corresponding spatiotemporal range in ERA5, and high-resolution terrain data of the target area. Outlier removal and normalization were performed on the ERA5 high-resolution meteorological element field in each data pair to obtain the normalized ERA5 high-resolution meteorological element field sample for the corresponding spatiotemporal range. Bilinear interpolation is used to resample the initial low-resolution meteorological element field in each data pair to a high-resolution target grid, generating the initial interpolated low-resolution field for each data pair; Based on the mean and standard deviation of the corresponding variables of all samples, the initial interpolated low-resolution field and initial high-resolution terrain data of each data pair are standardized to obtain the normalized and resampled low-resolution meteorological element field samples and the normalized high-resolution terrain data of the target area, thereby obtaining the target training dataset.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.
