Background error covariance matrix generation method and device, terminal and storage medium

By generating feature length scale fields through deep learning, the problem of high computational complexity in the traditional B matrix generation process is solved, and efficient and accurate background error covariance matrix generation is achieved, which improves the accuracy and stability of numerical weather forecasting.

CN122310475BActive Publication Date: 2026-08-04TIANJIN RES INST FOR WATER TRANSPORT ENG M O T +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN RES INST FOR WATER TRANSPORT ENG M O T
Filing Date
2026-06-01
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional B-matrix generation is computationally complex and time-consuming, failing to meet the timeliness and stability requirements of high-resolution numerical weather forecasting.

Method used

Deep learning is used to generate feature length scale fields. By constructing a convolutional neural network model, the regression coefficients and correlation scales of control variables are calculated, and balance, horizontal and vertical correlation operators are constructed to generate the background error covariance matrix.

Benefits of technology

It significantly reduces computational complexity, improves computational efficiency, outputs physically reasonable and spatially continuous results, reduces storage and resource consumption, and improves the accuracy of initial fields and forecast quality of numerical weather prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122310475B_ABST
    Figure CN122310475B_ABST
Patent Text Reader

Abstract

The application provides a background error covariance matrix generation method and device, a terminal and a storage medium, and relates to the technical field of numerical weather prediction. The method comprises the following steps: constructing a short-term prediction sample set of a target numerical weather prediction, and extracting a control variable of each background error sample in the short-term prediction sample set; calculating a regression coefficient of each control variable to construct a balance operator; inputting the short-term prediction sample set into a constructed characteristic length scale field generation model, outputting a characteristic length scale field of each background error sample, and constructing a horizontal correlation operator; calculating a vertical correlation scale of each control variable at each horizontal position to construct a vertical correlation operator; calculating a background error standard deviation of each control variable at each grid point to construct a standard deviation operator; and obtaining the background error covariance matrix by using the balance operator, the horizontal correlation operator, the vertical correlation operator and the standard deviation operator. The application can reduce the calculation complexity of the horizontal correlation operator and improve the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of numerical weather prediction technology, and in particular to a method, apparatus, terminal and storage medium for generating a background error covariance matrix. Background Technology

[0002] In modern variational data assimilation systems, the background error covariance matrix (B matrix) is a core component connecting observational information with the background field of numerical models. It is used to quantify the statistical correlation between different variables and locations in the background field. Its generation accuracy and computational efficiency directly determine the quality of the assimilation results and are crucial for improving the accuracy of the initial field and the final forecasting techniques in numerical weather prediction.

[0003] Currently, most major numerical weather prediction centers both domestically and internationally employ a statistical workflow based on the NMC (NCEP Method for Covariance estimation) to construct the B-matrix. The complete workflow includes five key stages: statistical equilibrium relationship construction, horizontal correlation structure extraction, vertical correlation structure extraction, standard deviation field calculation, and B-matrix operator output. Among these, horizontal correlation structure extraction requires calculating the distance-perturbation product at each grid point, binning averaging, and fitting with a Gaussian function using nonlinear least squares to obtain the horizontal feature length scale; this is the core step in constructing the horizontal correlation operator.

[0004] However, as the horizontal resolution of numerical weather prediction models increases from 30-50 kilometers to 1 kilometer and below, the number of grid points grows exponentially, exposing serious flaws in the traditional horizontal correlation structure extraction process: the computational complexity is... At high resolutions, computation time is unacceptable; processing a single vertical layer can take several hours, and generating a complete B matrix requires several days. The storage requirements for samples and intermediate results reach TB levels, exceeding the capacity of conventional computing resources. Gaussian fitting at small-scale grids is sensitive to noise and easily produces non-physical results. Independent calculation by dimensional bands leads to spatial discontinuities and jumps in the length scale of horizontal features. It cannot meet the timeliness and stability requirements of high-resolution operational forecasts, severely restricting the operational use of high-resolution numerical weather prediction systems. Summary of the Invention

[0005] This application provides a method, apparatus, terminal, and storage medium for generating a background error covariance matrix, in order to solve the problems of high computational complexity and excessive time consumption in the extraction of horizontal correlation structure in the traditional B matrix generation process.

[0006] In a first aspect, this application provides a method for generating a background error covariance matrix, including: Construct a short-term forecast sample set for the target numerical weather prediction, and extract the control variables for each background error sample in the short-term forecast sample set. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of the numerical forecast field for each control variable at different forecast lead times. Calculate the regression coefficient for each control variable and construct a balance operator based on all regression coefficients; The short-term forecast sample set is input into the constructed feature length scale field generation model, which outputs the feature length scale field of each background error sample in the short-term forecast sample set, and constructs a horizontal correlation operator based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network. Calculate the vertical correlation scale for each control variable at each horizontal position, and construct a vertical correlation operator based on all vertical correlation scales; Calculate the background error standard deviation for each control variable at each grid point, and construct a standard deviation operator based on all background error standard deviations; Using the balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator, the background error covariance matrix corresponding to the target numerical weather forecast is obtained.

[0007] Secondly, this application provides a background error covariance matrix generation apparatus, comprising: The variable determination module is used to construct a short-term forecast sample set for the target numerical weather prediction and extract the control variables for each background error sample in the short-term forecast sample set. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of each control variable in the numerical forecast field at different forecast lead times. The balance operator determination module is used to calculate the regression coefficient of each control variable and construct the balance operator based on all regression coefficients; The horizontal correlation operator determination module is used to input the short-term forecast sample set into the constructed feature length scale field generation model, output the feature length scale field of each background error sample in the short-term forecast sample set, and construct a horizontal correlation operator based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network. The vertical correlation operator determination module is used to calculate the vertical correlation scale of each control variable at each horizontal position and construct the vertical correlation operator based on all vertical correlation scales. The standard deviation operator determination module is used to calculate the background error standard deviation of each control variable at each grid point and construct the standard deviation operator based on all background error standard deviations; The matrix fitting module is used to obtain the background error covariance matrix corresponding to the target numerical weather forecast by utilizing the balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator.

[0008] Thirdly, this application provides a terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect or any possible implementation of the first aspect above.

[0009] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect or any possible implementation of the first aspect.

[0010] This application provides a method, apparatus, terminal, and storage medium for generating a background error covariance matrix. By generating a characteristic length-scale field through deep learning, this application significantly reduces computational complexity and improves computational efficiency, outputting physically reasonable and spatially continuous results, reducing storage and resource consumption. It is seamlessly compatible with existing data assimilation systems, exhibits strong operational stability, and can significantly support high-resolution numerical weather prediction applications. Simultaneously, by utilizing balance operators, horizontal correlation operators, vertical correlation operators, and standard deviation operators, the background error covariance matrix corresponding to the target numerical weather prediction is obtained. This integrates information from different aspects, comprehensively and accurately describing the statistical characteristics and physical relationships of the background error. This high-quality background error covariance matrix can provide better basic data for key technologies such as variational assimilation in numerical weather prediction, thereby improving the assimilation effect, further improving the accuracy of the initial field in numerical weather prediction, and ultimately enhancing the performance and forecast quality of the entire numerical weather prediction system. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the implementation of the background error covariance matrix generation method provided in this application embodiment; Figure 2This is a schematic diagram of the structure of the feature length scale field generation model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the background error covariance matrix generation device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the terminal provided in the embodiments of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0015] Figure 1 The implementation flowchart of the background error covariance matrix generation method provided in the embodiments of this application is described in detail below: In step 101, a short-term forecast sample set for the target numerical weather prediction is constructed, and the control variables of each background error sample in the short-term forecast sample set are extracted. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of the numerical forecast field for each control variable at different forecast lead times.

[0016] In this embodiment, the NMC method is used to generate background error samples. The target numerical weather prediction is run, and pairwise calculations are performed on deterministic forecast fields with the same initial time but different forecast lead times. The difference between the 24-hour and 12-hour forecast fields is calculated to obtain a single background error disturbance sample. By continuously collecting forecast differences across multiple time periods and weather patterns, a short-term forecast sample set with a sufficient sample size is formed to comprehensively cover the statistical characteristics of background errors under different seasons, circulation patterns, and underlying surface conditions.

[0017] For example, a background error sample is:

[0018] in, For background error samples, For 24-hour forecasting, For 12-hour forecasts, This is the sample number of the background error. , This represents the total number of background error samples.

[0019] After obtaining the short-term forecast sample set, the original meteorological field variables in the sample set are obtained. ,in, Latitude wind, Radial wind, For temperature, For humidity, For surface air pressure, control variable transformation is performed on the original meteorological variables. Strongly correlated original variables such as wind field, temperature field, humidity field, and surface air pressure field are decoupled and transformed into a set of approximately statistically independent control variables. ,in, Let be the stream function, derived from the wind field. Using the Poisson equation The solution is obtained. Relative vorticity; The velocity potential is used to characterize the convergence and divergence features of the wind field; The unbalanced temperature is obtained by removing the components of static equilibrium and geostrophic constraint. Specific humidity is used to characterize the amount of water vapor in the atmosphere; The unbalanced surface air pressure is obtained by removing the balance constraints.

[0020] Most of the temperature fields It can be derived from the stream function This is derived from static equilibrium relationships; this part is called the "equilibrium temperature". The actual temperature used for assimilation is the non-equilibrium temperature. : .

[0021] The short-term forecast sample set consists of multiple independent background error samples. Each background error sample contains the mean-removed numerical forecast field perturbation values ​​of the five control variables mentioned above under different forecast lead times. These perturbation values ​​directly reflect the error distribution of the model's background field, providing unified and standardized input data for subsequent equilibrium relationship construction, correlation structure extraction, and standard deviation calculation.

[0022] This application's embodiments construct a short-term forecast sample set of background errors for the target numerical weather prediction and extract information from various control variables, including stream function, velocity potential, unbalanced temperature, specific humidity, and unbalanced surface pressure. This allows for a comprehensive and detailed capture of the background error characteristics of different physical quantities in numerical weather prediction. These control variables cover key elements of atmospheric motion and thermodynamic state, enabling the generated background error covariance matrix to more accurately reflect the interrelationships and error distribution among various physical processes in the actual atmosphere, thereby improving the accuracy of numerical weather prediction.

[0023] Furthermore, in this embodiment, each background error sample contains perturbation values ​​for numerical forecast fields with different forecast lead times. This means that the method considers the changes in background error over time. Perturbation information with different forecast lead times helps to better understand the evolution of background error, enabling the generated covariance matrix to adapt to forecast requirements at different time scales. This provides more suitable background error information for numerical weather forecasts with different forecast durations, enhancing the timeliness and reliability of forecasts.

[0024] In step 102, the regression coefficients for each control variable are calculated, and a balance operator is constructed based on all the regression coefficients.

[0025] In this embodiment, a benchmark variable (i.e., the master control variable) is selected from the control variables, the regression coefficients between the other control variables and the benchmark variable are calculated respectively, and all regression coefficients are stored in a specified format file to construct a balance operator, thereby realizing the balance transmission and constraint of multivariate signals.

[0026] In one possible implementation, calculating the regression coefficient for each control variable and constructing a balance operator based on all regression coefficients can include: Using the stream function as the main control variable, for each vertical layer of each background error sample in the short-term forecast sample set, the least squares method is used to calculate the regression coefficients between the main control variable and other variables in that vertical layer. The other variables are all control variables other than the stream function. Construct a balance operator from all regression coefficients in matrix form.

[0027] Optionally, using the stream function as the main control variable, all background error samples in the short-term forecast sample set are traversed. For each background error sample, multivariate linear regression analysis is performed using the least squares method in each vertical layer. The linear regression coefficients between the main control variable and the other control variables in each vertical layer are calculated point by point and layer by layer.

[0028] For example, with unbalanced temperature For example, the formula for calculating the regression coefficient is:

[0029] in, For the first The unequilibrium temperature of a background error sample This is the intercept term of the linear regression model. For regression coefficients, For the first The stream function of each background error sample. For the first The residual term of each background error sample.

[0030] Regression analysis is used to establish a linear relationship between non-equilibrium variables and the stream function of the master control variables, ensuring that the analysis increments satisfy basic atmospheric physical constraints such as geostrophic equilibrium and hydrostatic equilibrium. The regression coefficients for all vertical layers, all horizontal grid points, and all control variables are uniformly stored in the be.regress_* file. These coefficients are then combined in the file to construct an equilibrium operator for multivariate equilibrium constraint propagation in the form of a regression coefficient matrix, enabling rapid mapping of equilibrium signals and constraint application between control variables.

[0031] In step 103, the short-term forecast sample set is input into the constructed feature length scale field generation model, and the feature length scale field of each background error sample in the short-term forecast sample set is output. A horizontal correlation operator is constructed based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network.

[0032] In this embodiment, the preprocessed and standardized short-term forecast sample set is divided vertically and then input into a feature length scale field generation model that has been trained offline and built based on a convolutional neural network. This model directly outputs a high-resolution, spatially continuous horizontal feature length scale field corresponding to each background error sample and each vertical layer in the short-term forecast sample set. The output feature length scale field is then stored in a be.lh_* file, and a horizontal correlation operator is constructed to characterize the horizontal correlation structure of the background error, providing core support for the decomposition and combination of the background error covariance matrix.

[0033] In one possible implementation, the short-term forecast sample set includes two-dimensional perturbation field samples and physical feature fields; the construction process of the feature length scale field generation model can be as follows: Obtain the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set, and construct the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set as a training dataset; A feature length scale field generation model is constructed using a convolutional neural network; A feature length scale field generation model is trained using the training dataset.

[0034] Among them, the two-dimensional perturbation sample is a slice of the horizontal perturbation field of each control variable on different vertical layers, and the physical feature field may include terrain height, surface type, latitude and seasonal indicators obtained from external data sources.

[0035] Optionally, a historical short-term forecast sample set is obtained, and the historical true feature length scale field (i.e., historical feature length scale field) corresponding to each background error sample, each vertical layer, and each horizontal grid point (i.e., grid point) in the historical short-term forecast sample set is calculated using traditional local autocorrelation estimation, nonlinear least squares fitting, and Gaussian function fitting methods. The historical short-term forecast sample set and the corresponding historical true feature length scale field are then used to construct a training dataset.

[0036] For example, for each background error sample Each vertical layer Each horizontal grid point : Local autocorrelation estimation is used at each horizontal grid point. The local autocorrelation is calculated within the neighborhood of , i.e.:

[0037] in, For the first The background error sample, the first Vertical layers, at horizontal grid points Location, distance The local autocorrelation function value on, For the first The background error sample, the first Vertical layers, central grid points The perturbation field value, For the first The background error sample, the first Vertical layers, neighborhood grid points The perturbation field value, For only the distance falls within arrive The average of grid points within the interval is calculated. This is the ratio of the distance step size to the width of the bin. It is a very small constant to prevent the denominator from being zero and to ensure the stability of numerical calculations; To calculate the average over the distance interval.

[0038] By using nonlinear least squares Fitting to a Gaussian model, i.e.:

[0039] in, For the first One background error sample, at the horizontal grid point At this point, the true horizontal feature length-scale field obtained by fitting using traditional methods; It is a minimum value function. It is a natural exponential function. The length scale is for horizontal features.

[0040] The historical feature length-scale field obtained by fitting is combined with the historical short-term forecast sample set to construct a training dataset.

[0041] Then, a feature length scale field generation model is constructed using a convolutional neural network. Specifically, the convolutional neural network used in this embodiment is an improved U-Net architecture, referencing... Figure 2 As shown, it includes an encoder, a bottleneck layer, a decoder, a physical constraint fusion layer, and an output layer.

[0042] The encoder contains four downsampling blocks, each consisting of two convolutional layers. (kernel, filled with the same) and a max pooling layer ( The feature map is composed of a kernel. Each time it passes through a downsampling block, the resolution of the feature map is halved and the number of channels is doubled, gradually extracting multi-level features from local details to large-scale structures.

[0043] The bottleneck layer, located between the encoder and decoder, processes the lowest-resolution but most abstract features. It consists of two convolutional layers and does not perform downsampling.

[0044] The decoder contains four upsampling blocks, each consisting of an upsampling layer. It consists of a kernel and two convolutional layers. By using skip connections, the feature map of the encoder at the corresponding resolution is concatenated with the upsampled result to gradually restore spatial details and precise location information.

[0045] The physical feature field, namely terrain height, is input into the physical constraint fusion layer. Surface type (Ocean / Land / Ice Sheet Ratio), Latitude and seasonal indicators Physical features are encoded into a high-dimensional representation using a multilayer perceptron and fused with features extracted by a convolutional neural network to ensure that the prediction results conform to atmospheric physical laws. For example, the model automatically learns that the length scale on land is generally smaller than that on oceans, and that the length scale in high-latitude regions is smaller than that in mid-latitude regions.

[0046] Output layer through Convolutional layers map feature channels to single-channel outputs, utilizing the Softplus activation function ( Ensure output The output is a high-resolution feature length-scale field. It has the same spatial dimension as the input perturbation field.

[0047] This application employs an improved U-Net convolutional neural network incorporating physical constraints to construct a feature length-scale field generation model. This model includes an encoder, decoder, skip connections, a physical constraint fusion layer, and a Softplus activation function output layer. It can integrate prior physical knowledge such as terrain, surface, latitude, and season to achieve end-to-end mapping from a perturbation field to a high-resolution feature length-scale field. The feature length-scale field generation model is trained offline using a training dataset, and a composite loss function including mean squared error loss, spectral loss, smoothing loss, and physical constraint loss is used to optimize the model, resulting in a trained feature length-scale field generation model.

[0048] In this embodiment, a composite loss function is used to balance data fitting and physical constraints, namely:

[0049] in, For the total loss function, For mean square error loss, For spectral loss, To smooth out the loss, For physical constraint loss, , , , These are the weighting coefficients for each type of loss.

[0050] Among them, mean square error loss The mean square error between the predicted field and the true field calculated by traditional methods is measured to ensure that the model learns the statistical properties of traditional methods, i.e.:

[0051] in, The number of grid points in the latitudinal direction. This represents the number of grid points along the longitude direction.

[0052] Spectral loss By comparing the 2D Fourier spectra of the predicted field and the true field, spatial structure consistency is ensured, thereby ensuring that the model captures the correct spatial scale distribution, i.e.:

[0053] in, For the predicted horizontal characteristic length-scale field in wavenumber Fourier spectrum at the location, For the true horizontal characteristic length scale field in wavenumber The Fourier spectrum at point is the magnitude of the vector (i.e., the L2 norm). For wave number.

[0054] Smoothing loss Encouraging spatial smoothness and avoiding unphysical jumps is achieved by penalizing excessively large spatial gradients, ensuring a smooth spatial transition of the predicted field.

[0055] Physical constraint loss The forced length scale is consistent with known physical laws to ensure that the prediction results conform to the zonal variation of atmospheric circulation, that is:

[0056] in, For reference, the latitudinal variation rate is typically 0.2-0.3 for mid-latitudes; Latitude.

[0057] In addition, in this embodiment of the application, the default weighting coefficients for each loss are: , , , .

[0058] In one possible implementation, after inputting the short-term forecast sample set into the constructed feature length scale field generation model and outputting the feature length scale field of each background error sample in the short-term forecast sample set, the method may further include: For each characteristic length scale field, a quality control test is performed sequentially. The quality control test includes physical range test, smoothness test, and physical consistency test. If each feature length scale field satisfies the quality control test, then the step of constructing a horizontal correlation operator based on all feature length scale fields is executed; If a characteristic length scale field that does not meet the quality control test requirements exists, a backoff mechanism is triggered. The backoff mechanism uses autocorrelation estimation, nonlinear least squares method and Gaussian function to calculate the characteristic length scale field.

[0059] Optionally, multi-level quality control checks are performed sequentially on the characteristic length-scale field of each vertical layer and each horizontal grid point, as follows: (1) Physical range check: Validating the predicted feature length scale If the distance is within a physically reasonable range (e.g., 50-2000km), and exceeds a threshold percentage (e.g., 5% of grid points), a rollback mechanism will be triggered.

[0060] (2) Smoothness test: The spatial gradient is calculated to verify that there are no drastic jumps. The maximum gradient threshold is set to 100km / point. Local anomalies can be repaired by spatial filtering, while global anomalies trigger a rollback mechanism.

[0061] (3) Physical consistency check: Verify whether the correlation between the characteristic length-scale field and latitude conforms to typical atmospheric models. For example, the correlation should be greater in mid-latitude regions than in tropical and polar regions. A correlation coefficient threshold of 0.3 is set; a threshold below this triggers a fallback mechanism.

[0062] The rollback mechanism in this application embodiment is as follows: when any quality control inspection fails, it automatically switches to traditional horizontal correlation structure calculation, records the reason for failure for subsequent model improvement, and notifies operation / maintenance personnel to ensure business continuity.

[0063] The traditional horizontal correlation structure is calculated as follows: Calculate the horizontal autocorrelation function on each vertical layer and fit it to a Gaussian function to extract the feature length scale. The specific process is as follows: For each vertical layer Calculate all horizontal grid points in this vertical layer and Distance between And perturbation product , distance Binning is performed, and the product within each distance interval is averaged to obtain discrete autocorrelation estimates. By using nonlinear least squares fitting, Fit to Gaussian function In the process of solving for the optimal feature length scale .

[0064] In step 104, the vertical correlation scale of each control variable at each horizontal position is calculated, and a vertical correlation operator is constructed based on all vertical correlation scales.

[0065] In this embodiment of the application, for each control variable at each horizontal position, the vertical correlation scale between different layers in the vertical direction is calculated, and the vertical correlation scale of each horizontal position and each control variable is stored in the be.vb_* file. Based on all the vertical correlation scales, a vertical correlation operator is constructed to characterize the statistical correlation structure of the background error in the vertical direction.

[0066] In one possible implementation, the vertical correlation scale of each control variable at each horizontal position is calculated, and a vertical correlation operator is constructed based on all vertical correlation scales, which may include: For each control variable at each horizontal position, calculate the autocorrelation of the control variable between different layers in the vertical direction, and use a second-order autoregressive function to fit the autocorrelation of different layers to obtain the vertical correlation scale of the control variable. Construct a vertical correlation operator in matrix form for all vertical correlation scales.

[0067] Optionally, for each horizontal grid point on a two-dimensional horizontal grid At this point, traverse all vertical layer combinations and calculate the perturbation autocorrelation coefficient between any two different height layers in the vertical direction for the control variable, thus obtaining the autocorrelation distribution in the vertical direction.

[0068] For example, using stream functions For example, to calculate the autocorrelation between any two different layers in the vertical direction, that is:

[0069] in, Vertical layer With vertical layer The perturbation correlation coefficient between them characterizes the degree of linear correlation between background errors; For the first The background error sample, the first The perturbation value of the stream function of the vertical layer, For the first The background error sample, the first The perturbation value of the stream function of the vertical layer, For the first The average value of the vertical laminar flow function over all background error samples. For the first The average value of the vertical laminar flow function over all background error samples.

[0070] Then, a second-order autoregressive function is used to perform nonlinear fitting on the vertical autocorrelation distribution, and the vertical correlation scale that can characterize the correlation range of the background error in the vertical direction is obtained.

[0071] The formula for calculating the second-order autoregressive function is as follows:

[0072] in, The vertical correlation function represents the correlation coefficient as it varies with vertical distance. This represents the vertical distance between two vertical layers. represents the vertical correlation parameters to be fitted.

[0073] Finally, all horizontal positions, all control variables, and all vertical correlation scales corresponding to all vertical layers are uniformly organized. Using the vertical correlation scale as the core parameter, a vertical correlation operator is constructed in matrix form to describe the statistical correlation structure of the background error in the vertical direction, providing vertical constraint support for the decomposition and synthesis of the background error covariance matrix.

[0074] In step 105, the background error standard deviation of each control variable at each grid point is calculated, and a standard deviation operator is constructed based on all background error standard deviations.

[0075] In this embodiment, each control variable and each spatial grid point (i.e., horizontal latitude and longitude grid points and vertical layers) is traversed, and the standard deviation of the background error at that grid point is calculated based on the short-term forecast sample set, reflecting the magnitude of the background error at the corresponding location, i.e.: The standard deviation of the background error for each control variable at each grid point is calculated using the standard deviation calculation formula:

[0076] in, The standard deviation of the background error. For three-dimensional grid points, For grid longitude direction index, For grid latitude direction index, For grid vertical layer indexing, This represents the total number of background error samples. This is the sample number of the background error. For the first Three-dimensional grid points in a background error sample The disturbance value of the control variable at that location, For all background error samples in a 3D grid The sample mean at that location. The degree of freedom is the sample.

[0077] Then, the standard deviation of all grid points is stored in the be.sd_* file, and a diagonal standard deviation operator is constructed using the standard deviation as elements.

[0078] This application's embodiments calculate the background error standard deviation of each control variable at each grid point and construct a standard deviation operator, which can accurately quantify the background error amplitude at different locations and for different control variables. The background error standard deviation reflects the magnitude and dispersion of the background error. By constructing the standard deviation operator, this error amplitude information can be incorporated into the covariance matrix, enabling the generated matrix to more accurately describe the statistical characteristics of the background error. This provides a more reliable basis for error estimation and correction in numerical weather prediction, thereby improving the accuracy and stability of the forecast.

[0079] In step 106, the background error covariance matrix corresponding to the target numerical weather forecast is obtained by using the balance operator, horizontal correlation operator, vertical correlation operator and standard deviation operator.

[0080] In this embodiment, the balance operator, horizontal correlation operator, vertical correlation operator and standard deviation operator are combined and fitted according to the operator product form of the first formula to obtain the background error covariance matrix corresponding to the target numerical weather forecast. This matrix is ​​stored and retrieved in the form of implicit operators and can be directly applied to the variational data assimilation system to improve the initial field accuracy and forecast efficiency.

[0081] The first formula is:

[0082] in, The background error covariance matrix, For the balancing operator, For horizontal correlation operators, For vertical correlation operators, For the standard deviation operator, This is the transpose of the operator.

[0083] This application provides a method for generating a background error covariance matrix. By generating a feature length-scale field through deep learning, this method significantly reduces computational complexity and improves computational efficiency, outputting physically reasonable and spatially continuous results, reducing storage and resource consumption. It is seamlessly compatible with existing data assimilation systems, exhibits strong operational stability, and can significantly support high-resolution numerical weather prediction applications. Simultaneously, by utilizing balance operators, horizontal correlation operators, vertical correlation operators, and standard deviation operators, the background error covariance matrix corresponding to the target numerical weather prediction is obtained. This method integrates information from different aspects, comprehensively and accurately describing the statistical characteristics and physical relationships of the background error. This high-quality background error covariance matrix can provide better basic data for key technologies such as variational assimilation in numerical weather prediction, thereby improving the assimilation effect, further improving the accuracy of the initial field in numerical weather prediction, and ultimately enhancing the performance and forecast quality of the entire numerical weather prediction system.

[0084] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0085] The following are device embodiments of this application. For details not described in detail, please refer to the corresponding method embodiments described above.

[0086] Figure 3 A schematic diagram of the background error covariance matrix generation device provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiment of this application are shown, and are described in detail below: like Figure 3 As shown, the background error covariance matrix generation device 3 includes: The variable determination module 31 is used to construct a short-term forecast sample set for the target numerical weather prediction and extract the control variables for each background error sample in the short-term forecast sample set. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of the numerical forecast field for each control variable at different forecast lead times. The balance operator determination module 32 is used to calculate the regression coefficient of each control variable and construct the balance operator based on all regression coefficients; The horizontal correlation operator determination module 33 is used to input the short-term forecast sample set into the constructed feature length scale field generation model, output the feature length scale field of each background error sample in the short-term forecast sample set, and construct the horizontal correlation operator based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network. Vertical correlation operator determination module 34 is used to calculate the vertical correlation scale of each control variable at each horizontal position and construct the vertical correlation operator based on all vertical correlation scales; The standard deviation operator determination module 35 is used to calculate the background error standard deviation of each control variable at each grid point and construct the standard deviation operator based on all background error standard deviations; The matrix fitting module 36 is used to obtain the background error covariance matrix corresponding to the target numerical weather forecast by utilizing the balance operator, horizontal correlation operator, vertical correlation operator and standard deviation operator.

[0087] This application provides a background error covariance matrix generation device. This device generates a characteristic length-scale field through deep learning, significantly reducing computational complexity and improving computational efficiency. It outputs physically reasonable and spatially continuous results, reducing storage and resource consumption. It is seamlessly compatible with existing data assimilation systems, exhibits strong operational stability, and can significantly support high-resolution numerical weather prediction applications. Simultaneously, it utilizes balance operators, horizontal correlation operators, vertical correlation operators, and standard deviation operators to obtain the background error covariance matrix corresponding to the target numerical weather prediction. This integrates information from different aspects, comprehensively and accurately describing the statistical characteristics and physical relationships of the background error. This high-quality background error covariance matrix can provide better basic data for key technologies such as variational assimilation in numerical weather prediction, thereby improving the assimilation effect, further improving the accuracy of the initial field in numerical weather prediction, and ultimately enhancing the performance and forecast quality of the entire numerical weather prediction system.

[0088] In one possible implementation, the short-term forecast sample set includes two-dimensional perturbation field samples and physical feature fields; the construction process of the feature length scale field generation model is as follows: Obtain the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set, and construct the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set as a training dataset; A feature length scale field generation model is constructed using a convolutional neural network; A feature length scale field generation model is trained using the training dataset.

[0089] In one possible implementation, the device may further include an inspection module, which can be used to: For each characteristic length scale field, a quality control test is performed sequentially. The quality control test includes physical range test, smoothness test, and physical consistency test. If each feature length scale field satisfies the quality control test, then the step of constructing a horizontal correlation operator based on all feature length scale fields is executed; If a characteristic length scale field that does not meet the quality control test requirements exists, a backoff mechanism is triggered. The backoff mechanism uses autocorrelation estimation, nonlinear least squares method and Gaussian function to calculate the characteristic length scale field.

[0090] In one possible implementation, the balance operator determination module can be used to: Using the stream function as the main control variable, for each vertical layer of each background error sample in the short-term forecast sample set, the least squares method is used to calculate the regression coefficients between the main control variable and other variables in that vertical layer. The other variables are all control variables other than the stream function. Construct a balance operator from all regression coefficients in matrix form.

[0091] In one possible implementation, the vertical correlation operator determination module can specifically be used for: For each control variable at each horizontal position, calculate the autocorrelation of the control variable between different layers in the vertical direction, and use a second-order autoregressive function to fit the autocorrelation of different layers to obtain the vertical correlation scale of the control variable. Construct a vertical correlation operator in matrix form for all vertical correlation scales.

[0092] In one possible implementation, the standard deviation operator determination module can be used to: The standard deviation of the background error for each control variable at each grid point is calculated using the standard deviation calculation formula:

[0093] in, The standard deviation of the background error. For three-dimensional grid points, For grid longitude direction index, For grid latitude direction index, For grid vertical layer indexing, This represents the total number of background error samples. This is the sample number of the background error. For the first Three-dimensional grid points in a background error sample The disturbance value of the control variable at that location, For all background error samples in a 3D grid The sample mean at that location. The degree of freedom is the sample.

[0094] In one possible implementation, the matrix fitting module can specifically be used for: By inputting the balance operator, horizontal correlation operator, vertical correlation operator, and standard deviation operator into the first formula, the background error covariance matrix is ​​obtained. The first formula is:

[0095] in, The background error covariance matrix, For the balancing operator, For horizontal correlation operators, For vertical correlation operators, For the standard deviation operator, This is the transpose of the operator.

[0096] Figure 4 This is a schematic diagram of the terminal provided in an embodiment of this application. For example... Figure 4 As shown, the terminal 4 in this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, it implements the steps in the various background error covariance matrix generation method embodiments described above, for example... Figure 1 Steps 101 to 106 are shown. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of each module are shown.

[0097] For example, the computer program 42 can be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 42 in the terminal 4. For example, the computer program 42 can be divided into... Figure 3 The modules shown.

[0098] The terminal 4 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that... Figure 4 This is merely an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.

[0099] The processor 40 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0100] The memory 41 can be an internal storage unit of the terminal 4, such as a hard disk or memory of the terminal 4. The memory 41 can also be an external storage device of the terminal 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal 4. Furthermore, the memory 41 can include both internal storage units and external storage devices of the terminal 4. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 can also be used to temporarily store data that has been output or will be output.

[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0102] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0103] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0104] In the embodiments provided in this application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0106] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0107] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various background error covariance matrix generation method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0108] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for generating a background error covariance matrix, characterized in that, include: Construct a short-term forecast sample set for the target numerical weather prediction, and extract the control variables for each background error sample in the short-term forecast sample set. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of the numerical forecast field for each control variable at different forecast lead times. Calculate the regression coefficient for each control variable and construct a balance operator based on all regression coefficients; The short-term forecast sample set is input into the constructed feature length scale field generation model, which outputs the feature length scale field of each background error sample in the short-term forecast sample set, and constructs a horizontal correlation operator based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network. Calculate the vertical correlation scale for each control variable at each horizontal position, and construct a vertical correlation operator based on all vertical correlation scales; Calculate the background error standard deviation for each control variable at each grid point, and construct a standard deviation operator based on all background error standard deviations; Using the balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator, the background error covariance matrix corresponding to the target numerical weather forecast is obtained.

2. The background error covariance matrix generation method according to claim 1, characterized in that, The short-term forecast sample set includes two-dimensional perturbation field samples and physical feature fields; the construction process of the feature length scale field generation model is as follows: Obtain the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set, and construct the historical short-term forecast sample set and the historical feature length scale field corresponding to each background error sample in the historical short-term forecast sample set as a training dataset; A feature length scale field generation model is constructed using a convolutional neural network; The feature length scale field generation model is trained using the training dataset.

3. The background error covariance matrix generation method according to claim 1, characterized in that, After inputting the short-term forecast sample set into the constructed feature length scale field generation model and outputting the feature length scale field of each background error sample in the short-term forecast sample set, the method further includes: For each characteristic length scale field, a quality control test is performed sequentially. The quality control test includes physical range test, smoothness test, and physical consistency test. If each feature length scale field satisfies the quality control test, then the step of constructing the horizontal correlation operator based on all feature length scale fields is executed; If there exists a characteristic length scale field that does not meet the quality control test, a backoff mechanism is triggered. The backoff mechanism is to calculate the characteristic length scale field using autocorrelation estimation, nonlinear least squares method and Gaussian function.

4. The background error covariance matrix generation method according to claim 1, characterized in that, The calculation of the regression coefficient for each control variable and the construction of a balance operator based on all regression coefficients include: Using the stream function as the main control variable, for each vertical layer of each background error sample in the short-term forecast sample set, the least squares method is used to calculate the regression coefficients between the main control variable and other variables in that vertical layer. The other variables are all control variables other than the stream function among the control variables. The equilibrium operator is constructed by arranging all regression coefficients in matrix form.

5. The method for generating the background error covariance matrix according to claim 1, characterized in that, The calculation of the vertical correlation scale for each control variable at each horizontal position, and the construction of a vertical correlation operator based on all vertical correlation scales, includes: For each control variable at each horizontal position, calculate the autocorrelation of the control variable between different layers in the vertical direction, and use a second-order autoregressive function to fit the autocorrelation of different layers to obtain the vertical correlation scale of the control variable. The vertical correlation operator is constructed by representing all vertical correlation scales in matrix form.

6. The background error covariance matrix generation method according to claim 1, characterized in that, The calculation of the background error standard deviation of each control variable at each grid point, and the construction of a standard deviation operator based on all background error standard deviations, includes: The standard deviation of the background error of each control variable at each grid point is calculated using the standard deviation calculation formula, which is: in, The standard deviation of the background error is... For three-dimensional grid points, For grid longitude direction index, For grid latitude direction index, For grid vertical layer indexing, This represents the total number of background error samples. This is the sample number of the background error. For the first Three-dimensional grid points in a background error sample The disturbance value of the control variable at that location, For all background error samples in a 3D grid The sample mean at that location. The degree of freedom is the sample.

7. The method for generating the background error covariance matrix according to claim 1, characterized in that, The process of obtaining the background error covariance matrix corresponding to the target numerical weather forecast using the balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator includes: The balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator are input into the first formula to obtain the background error covariance matrix. The first formula is: in, The background error covariance matrix is... For the balance operator, For the horizontal correlation operator, For the vertical correlation operator, For the standard deviation operator, This is the transpose of the operator.

8. A background error covariance matrix generation device, characterized in that, include: The variable determination module is used to construct a short-term forecast sample set for the target numerical weather prediction and extract the control variables for each background error sample in the short-term forecast sample set. The control variables include stream function, velocity potential, unbalanced temperature, specific humidity and unbalanced surface pressure. The short-term forecast sample set includes multiple background error samples, and each background error sample includes the perturbation value of each control variable in the numerical forecast field at different forecast lead times. The balance operator determination module is used to calculate the regression coefficient of each control variable and construct the balance operator based on all regression coefficients; The horizontal correlation operator determination module is used to input the short-term forecast sample set into the constructed feature length scale field generation model, output the feature length scale field of each background error sample in the short-term forecast sample set, and construct a horizontal correlation operator based on all feature length scale fields. The feature length scale field generation model is constructed based on a convolutional neural network. The vertical correlation operator determination module is used to calculate the vertical correlation scale of each control variable at each horizontal position and construct the vertical correlation operator based on all vertical correlation scales. The standard deviation operator determination module is used to calculate the background error standard deviation of each control variable at each grid point and construct the standard deviation operator based on all background error standard deviations; The matrix fitting module is used to obtain the background error covariance matrix corresponding to the target numerical weather forecast by utilizing the balance operator, the horizontal correlation operator, the vertical correlation operator, and the standard deviation operator.

9. A terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the background error covariance matrix generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the background error covariance matrix generation method as described in any one of claims 1 to 7.