Study on the Application of LSTM in Meteorological Element Prediction based on Computer Software

The 21st century is the era of big data. With the rapid development of computer technology, we can store more meteorological data, which increases the meteorological data. As people put forward higher requirements for meteorological information, we need to collect and forecast abundant meteorological laws. With the rapid development of computer technology, deep learning has opened a new era of artificial intelligence. Deep learning technology has brought opportunities to the development of meteorological forecasting technology, which has played an important role in basic weather forecast, economic activities and disaster prevention in China. First of all, this paper analyzes the important role of meteorological elements prediction. Then, this paper analyzes the deep learning LSTM algorithm. Finally, this paper makes an empirical analysis.


Introduction
With the advent of the era of meteorological big data, we need to make full use of meteorological data and excavate the value of meteorological data. Meteorological change is very unstable, which is easily affected by various factors [1] . In addition, each weather interacts with each other, which makes the change of weather phenomenon a very complex process involving many uncontrollable factors. Therefore, the traditional forecasting models contain various basic assumptions. Only if all the basic assumptions are satisfied, the accuracy of weather forecast will meet the expectation. Therefore, there is a big error between the real value and the predicted value of meteorological elements, which has a great error for our weather forecast [2] .
With the advent of the era of big data, deep learning has also ushered in vigorous development. Deep learning is not a simple linear fitting, but a kind of nonlinear fitting, which makes deep learning used in many fields. With the continuous introduction of new structures, deep learning has been used to solve various problems. In meteorological forecasting, researchers have put forward a variety of methods, such as time series analysis, Markov chain prediction, genetic algorithm based method and deep learning method [3] . As a part of weather forecast, the temperature forecast has attracted the attention of many scholars. They hope to take the temperature as the breakthrough point to explore the weather forecast. Because of the randomness of temperature itself and the nonlinear relationship with other factors, the linear prediction method is not very effective. The deep learning method can fit the nonlinear relationship, and has strong generalization ability and fault tolerance ability. When the deep learning method is used to predict the temperature, the effect is relatively good [4] .
Meteorological forecast is based on the principle of atmospheric science, using modern climate dynamics, statistics and other methods to predict the trend of climate change in monthly, seasonal and annual time scales. Weather forecast is mostly based on time series to forecast the next time period data. Meteorological forecast can be divided into three types: short-term, medium and long-term. Short term weather forecast refers to the weather forecast with day, month and season as time series, which can scientifically guide the production of agriculture, forestry and animal husbandry. Medium and long-term forecast is a meteorological forecast with 1-3 years as time series. Long term forecast is based on 3-5 years or even longer weather forecast. With the continuous development of science and technology, the social demand for meteorological prediction is increasing, which requires us to accurately forecast meteorological data [5] .

Provide basic weather forecast
The forecast of meteorological elements is a kind of observation on the air temperature, moderation, precipitation, cloud and cloud and visibility of air. Through the establishment of weather change model, we can infer and evolve the model through the computing power of computer, which will eventually form the weather forecast. With the gradual popularization of air transport, people are more and more inclined to choose air transport, which has a very high demand for meteorology. Therefore, we need more accurate weather forecast. With the application of meteorological instruments, people's information collection and prediction of meteorological changes become more and more accurate. The weather forecast service comes from the data measured by meteorological observation. Through the meteorological data model, we can get the basic weather forecast information [6] .

Guide economic activities
In addition to the application of meteorological element forecast to daily people's travel and life work, it also plays an important role in economic life. China is a big agricultural country with a long history. Flood or drought will cause great damage. By predicting the change of weather in advance, we can guide farmers to make corresponding measures. Through the special meteorological element forecast station, farmers can quickly know the weather changes, which can make timely response measures to flood or waterlogging. Therefore, meteorological observation can guide economic activities.

Natural disaster reduction
The forecast of meteorological elements can predict the weather of the ocean, which will guide fishermen's going out to sea in the next few days. By predicting natural disasters such as ocean storms in advance, we can know the normal travel of fishermen, which will better avoid the safety of human life and property brought by natural disasters.

Unit structure of LSTM
LSTM is a variant of the recurrent neural network. In the process of LSTM data processing, the data flow and related processing institutions have formed a repeated chain structure, which is similar to the general data link of factory pipeline. The unit structure of the LSTM core is shown in Figure 1.
Among them, the arrow shows the direction of data flow in the cell structure, the rectangle represents the processing layer using some activation function, and the circular node is a kind of data processing in the cell structure.

Forward calculation of LSTM
In the forward calculation of LSTM, the input of sequence data can be mapped to specific output. The weight matrix and bias term of forgetting gate, input gate, output gate, new information generation are defined as , , , , , , , [ ] The input gate and the generated new information are output at time t as shown in formula 2.
Through the above preparatory work, LSTM identifies the parts of long-term memory that need to be forgotten and the parts that need to be updated. New information input into long-term memory has also been generated. At this point, the input gate can update C, as shown in Formula 3.
The output of the output gate at time t is shown in formula 4.
[ ] The output gate will output information after processing, as shown in formula 5.
= tanh( ) LSTM needs back propagation to train neural network model. Back propagation is that the error between the output value and the actual value generated by the model without training propagates layer by layer along the opposite direction of forward calculation. According to the error value, each layer corrects its own parameters according to certain rules. If the error term of time t is defined, it is shown in formula 6.

Back propagation of LSTM
We can get the error term at time T-1, as shown in formula 7.
Through the full derivative formula, we can get the error term back propagation to time t, as shown in formula 8. 1 , , , , If the error term of layer 1-1 to layer 1 is defined as in formula 9.
We can get the gradient of the four functions, as shown in formula 12.

Experimental data
The weather daily values of the experimental data set for 34 years from January 1, 1980 to January 1, 2014, including 24 hours of observations every day, including temperature, air pressure, humidity, horizontal visibility, precipitation, wind speed, weather phenomenon code, dew point and time attributes. In the model training, this experiment uses the random input of different training set data series groups, after several epoch iterations, this paper carries out model training on all training sets.

Result analysis
Through experiments, we tested the trained models for 24 hours. In this paper, 200 time points are randomly selected to visually display the effect and difference, and the comparison chart of 12:00 and 24:00 sampling and real value is generated, as shown in Figure 2.  Meteorological observation is closely related to people's life and work, which can provide more scientific and accurate weather forecast for people. Meteorological observation can guide people's life and work, which is an important research value in meteorological research. With the progress of science and technology, the efficiency and accuracy of meteorological forecast and observation work have been improved.