ERA5 rainfall forecasting method
By introducing ST-LSTM units, attention mechanism and Huber loss function in the precipitation forecast model, the problem of low precipitation forecast accuracy in the prior art is solved, and higher spatial and temporal prediction accuracy and noise suppression effect are achieved.
Patent Information
- Application Number
- CN202510158787.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing precipitation forecasting methods are difficult to accurately capture the spatiotemporal characteristics of precipitation data, resulting in low prediction accuracy, especially when processing long-time series and high-noise data.
The ERA5 precipitation forecast model was constructed using space-time length and short-term memory (ST-LSTM) unit and attention mechanism, combined with the Huber loss function. The ST-LSTM unit ensures that the space-time features are transmitted to each other in the time domain and the spatial domain, the attention mechanism automatically recognizes important features, and the Huber loss function suppresses the influence of noise.
The spatial and temporal prediction accuracy of precipitation data is improved, the fitting ability to long-term dependencies and nonlinear relationships is enhanced, the influence of noise is suppressed, and the accuracy of prediction results is improved.
Smart Images

Figure CN119622279A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of precipitation forecasting, and in particular to an ERA5 precipitation forecasting method. Background Art
[0002] Water is an indispensable part of human life, and precipitation is the main driving force of the water cycle of the earth's biosphere and an important source of water. With the continuous deterioration of the global ecological environment and the increasingly serious greenhouse effect, in recent years, sudden rainstorms, catastrophic floods, super typhoons and other extreme weather events have occurred frequently, simultaneously and repeatedly in local areas around the world, posing a huge threat to people's lives and property. Because precipitation is caused by multiple factors such as geographical location, climate, thermal and flow fields, the complex meteorological characteristics make precipitation one of the most difficult weather elements to predict, and the uncertainty of precipitation forecasting is one of the direct causes of the current rainstorm and flood disasters. Accurate precipitation prediction can not only effectively prevent natural disasters such as floods, droughts, and typhoons, but also help the government to manage water resources and plan economics. With the development of remote sensing technology and computer technology, the technology of using satellites to observe precipitation is becoming more and more advanced. Satellite reanalysis data uses physical laws to combine model data with observation data from all over the world into a complete global data set. These data with high temporal and spatial resolution can effectively make up for the lack of direct ground observation precipitation data. The ERA5 data, the latest reanalysis product released by the European Centre for Medium-Range Weather Forecast (ECMWF), provides hourly estimates of relevant meteorological parameters such as atmospheric, land and sea conditions on a 0.25°×0.25° longitude and latitude grid, and provides real-time precipitation observation data, providing a data basis for accurate precipitation forecasts.
[0003] With the advent of the big data era and the emergence of high-performance GPUs, artificial intelligence technology has developed rapidly. Deep learning can not only mine effective information from data, automatically capture linear and nonlinear features hidden in data, but also efficiently process large-scale spatiotemporal series data. Therefore, many scholars use recurrent neural network (RNN) or long short-term memory (LSTM) models to fit the temporal correlation in precipitation time series data and model and predict precipitation forecasts. However, the amount of precipitation is highly dependent on time, longitude and latitude, season and other factors. There is a mutual dependence between the time dimension and the space dimension. It is a long spatiotemporal series data with spatiotemporal variation characteristics and high autocorrelation. Traditional RNN models and LSTM models are difficult to learn the spatial characteristics of precipitation data, lack the fitting of the spatial dimension of precipitation data, ignore its spatiotemporal correlation, and affect the prediction accuracy of precipitation data. In addition, some scholars have modeled precipitation data as two-dimensional images and fitted the spatial features therein. The convolutional long short-term memory (convLSTM) model combines the RNN's ability to extract temporal features with the convolutional neural network (CNN)'s ability to extract spatial features, further improving the ability to extract the spatiotemporal variation characteristics of precipitation data. Therefore, some scholars have applied this algorithm to the prediction research of precipitation forecast models. However, in the process of extracting spatiotemporal information by the convLSTM unit, the temporal variation characteristics of precipitation data can only be transmitted horizontally in the time domain, and the spatial features can only be transmitted vertically in the space domain. The spatiotemporal features cannot be transmitted to each other in the time domain and the space domain at the same time. The historical spatiotemporal information applied at the current moment is incomplete, which restricts the prediction accuracy of precipitation values.
[0004] Precipitation is a long process, and early precipitation information has an important impact on the prediction results. Traditional RNN, LSTM, and convLSTM models are difficult to effectively capture this long-distance dependency, which affects the accuracy of precipitation forecasts. At the same time, when the deep learning model inputs long-term precipitation series data, the above models often find it difficult to distinguish which information is more important to the prediction results, resulting in the model being unable to effectively focus on the key parts, thereby losing important features and patterns, thereby reducing the accuracy of the prediction. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides an ERA5 precipitation forecasting method to solve the problem of low prediction accuracy of the prior art methods.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: an ERA5 precipitation forecasting method, comprising: S1, obtain precipitation characteristics of ERA5 precipitation series, perform data preprocessing, and create weighted input series; S2, inputting the weighted input sequence into the precipitation forecast model for training to obtain a trained model; S3. Preprocess the ERA5 precipitation sequence to be predicted and input it into the trained model to complete the precipitation forecast.
[0007] Further: S1 includes: S11. Obtain precipitation characteristic sequence of ERA5 precipitation sequence ; S12. Obtaining the attention weight sequence of precipitation features through the attention mechanism ; S13, multiplying the precipitation feature in the precipitation feature sequence by the corresponding attention weight in the attention weight sequence to obtain a weighted input sequence .
[0008] Further: In S2, the precipitation forecast model includes an encoder, a context matcher, a decoder and an output convolutional layer connected in sequence.
[0009] Further: S2 includes: S21, weighted input sequence Input the encoder, extract the spatiotemporal features through the ST-LSTM unit in the encoder, and obtain the hidden state sequence ; S22. Reverse the hidden state sequence through the context matcher The layer order of , get the reverse sequence ; S23, reverse the sequence Input decoder, get prediction output Y t ; S24, reverse the sequence and the predicted output Y t Input and output convolutional layers to obtain precipitation forecasts and complete training.
[0010] Further: In S21, the specific expression of the ST-LSTM unit is:
[0011] in, They represent the forget gate, input gate, and input modulation gate of the original convLSTM part in the ST-LSTM unit, respectively. They represent the forget gate, input gate, and input modulation gate of the newly added spatiotemporal memory module in the ST-LSTM unit, respectively. represents the output gate, is the number of stacked layers of ST-LSTM units, t Indicates the current moment, different subscripts W and b They correspond to the convolution kernel and bias in each convolution operation respectively. X Represents input data, (.) and tanh(.) are different activation functions. represents the Hadamard product operation, represents the convolution operation, and are two memory storage units of the ST-LSTM unit, Represents the hidden state of the ST-LSTM unit.
[0012] Furthermore: the precipitation forecast model adopts the huber loss function , whose expression is:
[0013] in, is a hyperparameter, y represents the true value, Represents the predicted value.
[0014] The beneficial effects of the present invention are: 1. Using the spatiotemporal long short-term memory (ST-LSTM) unit to learn the spatiotemporal characteristics of ERA5 precipitation data can ensure that the spatiotemporal characteristics of precipitation data are transmitted to each other in the time domain and the space domain at the same time, and act together on the prediction results, thereby improving the prediction accuracy; 2. In order to better capture the long-term dependency of ERA5 precipitation data, the present invention introduces an attention mechanism into the precipitation forecast model and merges it into the ERA5 precipitation forecast spatiotemporal network, so that the model can automatically identify and emphasize those features that have a greater impact on the prediction results, and improve the model's fitting performance for nonlinear relationships such as spatiotemporal correlation of ERA5 precipitation data; 3. Aiming at the nonlinear, non-stationary and high-noise characteristics of ERA5 precipitation data, the present invention uses the Huber loss function to constrain the model training process, suppresses the gross errors and noise in the ERA5 precipitation data, and further improves the prediction accuracy of the ERA5 precipitation data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is the flow chart of the ERA5 precipitation forecast method.
[0016] Figure 2 This is the structure diagram of the rainfall forecast model.
[0017] Figure 3 This is the structure diagram of the ST-LSTM unit.
[0018] Figure 4 An expanded view of the encoder and decoder structures. DETAILED DESCRIPTION
[0019] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0020] like Figure 1 As shown, in one embodiment of the present invention, an ERA5 precipitation forecasting method includes: S1, obtain precipitation characteristics of ERA5 precipitation series, perform data preprocessing, and create weighted input series; S2, inputting the weighted input sequence into the precipitation forecast model for training to obtain a trained model; S3. Preprocess the ERA5 precipitation sequence to be predicted and input it into the trained model to complete the precipitation forecast.
[0021] S1 includes: S11. Obtain precipitation characteristic sequence of ERA5 precipitation sequence ; S12. Obtaining the attention weight sequence of precipitation features through the attention mechanism ; Here, the weights are based on the first layer of the encoder, The previous hidden state of S13, multiplying the precipitation feature in the precipitation feature sequence by the corresponding attention weight in the attention weight sequence to obtain a weighted input sequence .
[0022] like Figure 2 As shown, in S2, the precipitation forecast model includes an encoder, a context matcher, a decoder and an output convolutional layer connected in sequence.
[0023] The S2 includes: S21, weighted input sequence Input the encoder, extract the spatiotemporal features through the ST-LSTM unit in the encoder, and obtain the hidden state sequence ; S22. Reverse the hidden state sequence through the context matcher The layer order of , get the reverse sequence ; S23, reverse the sequence Input decoder, get prediction output Y t ; S24, reverse the sequence and the predicted output Y t Input and output convolutional layers to obtain precipitation forecasts and complete training.
[0024] like Figure 3 As shown, it is a ST-LSTM unit structure diagram. In order to overcome the defects of the convLSTM model, some scholars have added a spatiotemporal memory module to the convLSTM unit to construct a spatiotemporal long short-term memory unit (Spatiotemporal LongShort-Term Memory, ST-LSTM), and stacked ST-LSTM units to build a predictive recurrent neural network (PredRNN), ensuring that spatiotemporal features are transmitted to each other in the time domain and the space domain at the same time, acting together on the prediction results to improve the prediction accuracy. Therefore, the present invention uses ST-LSTM to learn the temporal variation characteristics and spatial characteristics of ERA5 precipitation data, so as to fit the nonlinear relationships such as the spatiotemporal autocorrelation of ERA5 precipitation data.
[0025] In S21, the specific expression of the ST-LSTM unit is:
[0026] in, They represent the forget gate, input gate, and input modulation gate of the original convLSTM part in the ST-LSTM unit. The forget gate is used to determine the impact of the previous spatiotemporal characteristics on the current epoch and decide whether the previous spatiotemporal characteristics should be retained and input into the current moment. The input modulation gate is used to assist the input gate in determining the extent to which the spatiotemporal characteristics can be stored in the current unit state, that is, to determine the weights of each spatiotemporal characteristic. They represent the forget gate, input gate, and input modulation gate of the newly added spatiotemporal memory module in the ST-LSTM unit, respectively. Represents the output gate, which determines how many hidden states can be output at the current moment. Based on the current hidden state, the prediction result can be calculated. is the number of stacked layers of ST-LSTM units,t Indicates the current moment, different subscripts W and b They correspond to the convolution kernel and bias in each convolution operation respectively. X Represents input data, (.) and tanh(.) are different activation functions. represents the Hadamard product operation, represents the convolution operation, and The two memory storage units of the ST-LSTM unit are structures for storing the spatiotemporal characteristics of the mined ERA5 data. represents the hidden state of the ST-LSTM unit, Same as the unit state in the original model, it is mainly responsible for the horizontal transmission of time memory between the previous and next moments, that is, to ensure that the time-varying characteristics of ERA5 data are horizontally transmitted in the time domain. It is the newly added spatiotemporal memory unit state in ST-LSTM, which is mainly responsible for the transmission of spatiotemporal memory. It vertically transmits the spatiotemporal memory to the ST-LSTM units of different layers at the same moment and the bottom ST-LSTM units at the next moment, that is, to ensure that the spatiotemporal characteristics of ERA5 data are transmitted simultaneously in the time domain and the space domain.
[0027] when hour, .
[0028] The precipitation forecast model adopts the huber loss function , whose expression is:
[0029] in, is a hyperparameter, The size of determines the emphasis of the Huber loss function on the L1 loss function and the L2 loss function. y represents the true value, Represents the predicted value.
[0030] The Huber loss function is essentially an L1 loss function, but when the error is less than the threshold, it becomes an L2 loss function. The Huber loss function has the advantages of both the L1 loss function and the L2 loss function, reducing the sensitivity to outliers and achieving the function of being directional everywhere. Therefore, this method uses the Huber loss function as the loss function for training the precipitation forecast model of ERA5 data, constrains the learning process of the spatiotemporal information of the precipitation data of ERA5 data, and suppresses the influence of gross errors and noise in the precipitation data of ERA5 data on the prediction results, while accelerating the convergence of the network.
[0031] like Figure 4 As shown, in this application, the encoder-decoder structure is also based on the attention mechanism, which is evolved from simulating the attention of human vision. It can find the information that needs attention in the network and weight it according to the importance of the information. The attention mechanism is widely used in natural language processing, speech recognition, and image recognition. For long-term series prediction, the Attention mechanism can effectively identify and emphasize those features that have a greater impact on the prediction results, and allocate limited resources to input information that has a greater weight on the prediction results.
[0032] Therefore, in order to better capture the long-distance dependencies between precipitation data and solve the problem of long-term rainfall sequence information loss in the prediction process of previous deep learning models, this method adds the attention mechanism to the ERA5 precipitation forecast deep learning model. The encoder part of the model processes each element in the sequence to ensure that each element can capture the relevant information in the sequence. The calculation formula is:
[0033] in, Q is the target sequence vector, K is a key vector sequence, V is the sequence of values corresponding to the key vector, Q , K , V After the sequence is linearly transformed, it is input into the scaled dot-product attention (SDA) for vector dot product multiplication. is a scaling factor that makes the gradient more stable during training.
[0034] When the decoder generates the output at each time step, it calculates an attention score , which represents the relevance of each part of the input sequence to the current decoder state, and is calculated as:
[0035] in, is the current decoder state, The encoder is i The output state of the step, and the function It can be dot product, additive or multiplicative, and then these scores are normalized by the softmax function to get the weight of each encoder state , and its calculation formula is:
[0036] Weight Indicates that in the decoded t When the encoder outputs the i The importance of each state. Based on the calculated attention weights, the context vector of the current decoding step can be calculated c t , which is the weighted sum of the encoder output states, is calculated as follows:
[0037] To prevent performance loss given long length inputs, we also incorporate a context matching mechanism that aggregates the hidden states of the encoder layer, given by Give, combine Figure 2 , we use symmetry in our architecture and set the number of layers in the encoder and decoder to be the same. The hidden state dimension of the encoder decreases with the number of layers, while the hidden state dimension of the decoder increases with the number of layers; thus, the context matcher mechanism can be described as:
[0038] in, is the decoder hidden state, is the total number of layers, T in The context matcher sums the hidden states for the input sequence length and reverses the order of the states. Here, we reverse the matching of the hidden states of the encoder layer to improve the performance of the mechanism. Next, the generated state Passed to the corresponding layer of the decoder, the input Y t Pass through the first layer of the decoder. The first layer produces the next hidden state , and passes it to the next layer. The final layer of the decoder produces the input to the output convolution ,like Figure 2 As shown, the output convolution produces a pair of time steps t +1 prediction .
[0039] By using the above approach, we can exploit higher dimensionality in the initial layers of the encoder, thus achieving predictions of any desired dimensionality.
[0040] exist Figure 4 In , the input sequence is first passed to the encoder, which encodes the input sequence into hidden states. Then, for the first prediction, the decoder takes Y t and D t To predict . The decoder then uses this prediction and the previous state D t+1 To predict the next output This recursive process continues until , T out is the output sequence length.
[0041] To verify the performance of our model on the ERA5 precipitation data, we selected the convLSTM+attention model and compared its performance with our model.
[0042] The dataset is ERA5 hourly data of pressure level, where the temporal resolution of the data is 3 hours, the spatial resolution is 30 km, the grid size of the data is 61×121, and the spatial range is 30◦-45◦ in latitude and 20◦-50◦ in longitude, covering the Mediterranean and Black Sea coasts of Turkey. Our data records dates between 2015 and 2016. In Table 1, we illustrate the weather features used in the dataset. Among these features, we select total precipitation as our target prediction sequence and the remaining features as our exogenous sequences. We divide the dataset into training, validation and test sets with split ratios of 0.8, 0.1 and 0.1 respectively. The feature descriptions and corresponding units in the ERA5 dataset are shown in Table 1: Table 1 Description of features and corresponding units in the ERA5 dataset
[0043] The performance of our model on high-resolution datasets is evaluated by comparing it with the ConvLSTM-Attention model. The comparison of evaluation indicators is shown in Table 2.
[0044] Table 2 Comparison of prediction model evaluation indicators
[0045] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An ERA5 precipitation forecasting method, characterized in that: include: S1, obtain precipitation characteristics of ERA5 precipitation series, perform data preprocessing, and create weighted input series; S2, inputting the weighted input sequence into the precipitation forecast model for training to obtain a trained model; S3. Preprocess the ERA5 precipitation sequence to be predicted and input it into the trained model to complete the precipitation forecast.
2. The ERA5 precipitation forecasting method according to claim 1, characterized in that: The S1 includes: S11. Obtain precipitation characteristic sequence of ERA5 precipitation sequence ; S12. Obtaining the attention weight sequence of precipitation features through the attention mechanism ; S13, multiplying the precipitation feature in the precipitation feature sequence by the corresponding attention weight in the attention weight sequence to obtain a weighted input sequence .
3. The ERA5 precipitation forecasting method according to claim 1, characterized in that: In S2, the precipitation forecast model includes an encoder, a context matcher, a decoder and an output convolutional layer connected in sequence.
4. The ERA5 precipitation forecasting method according to claim 3, characterized in that: The S2 includes: S21, weighted input sequence Input the encoder, extract the spatiotemporal features through the ST-LSTM unit in the encoder, and obtain the hidden state sequence ; S22. Reverse the hidden state sequence through the context matcher The layer order of , get the reverse sequence ; S23, reverse the sequence Input decoder, get prediction output Y t ; S24, reverse the sequence and the predicted output Y t Input and output convolutional layers to obtain precipitation forecasts and complete training.
5. The ERA5 precipitation forecasting method according to claim 4, characterized in that: In S21, the specific expression of the ST-LSTM unit is: in, They represent the forget gate, input gate, and input modulation gate of the original convLSTM part in the ST-LSTM unit, respectively. They represent the forget gate, input gate, and input modulation gate of the newly added spatiotemporal memory module in the ST-LSTM unit, respectively. represents the output gate, is the number of stacked layers of ST-LSTM units, t Indicates the current moment, different subscripts W and b They correspond to the convolution kernel and bias in each convolution operation respectively. X Represents input data, (.) and tanh(.) are different activation functions. represents the Hadamard product operation, represents the convolution operation, and are two memory storage units of the ST-LSTM unit, Represents the hidden state of the ST-LSTM unit.
6. The ERA5 precipitation forecasting method according to claim 1, characterized in that: The precipitation forecast model adopts the huber loss function , whose expression is: in, is a hyperparameter, y represents the true value, Represents the predicted value.
Citation Information
Patent Citations
Convolutional long short-term memory network space-time sequence prediction method improved by utilizing attention mechanism
CN112418409A
Typhoon cloud picture prediction method and system and storage medium
CN117634930A
Effective wave height space-time prediction method and system of coding and decoding-interpreter framework
CN118070668A
Deep learning-based short-time quantitative rainfall numerical prediction correction method
CN118153628A