# Modeling Hourly Soil Temperature Using Deep BiLSTM Neural Network
## 2 Data  
The measured ST were obtained from the National Water and Climate Center of the US Department of Agriculture ([[https://www.wcc.nrcs.usda.gov/scan/](https://www.wcc.nrcs.usda.gov/scan/)]([https://www.wcc.nrcs.usda.gov/scan/](https://www.wcc.nrcs.usda.gov/scan/))). The agency has installed more than 200 sites throughout the country to collect data on meteorology, soil, and solar radiation. We selected the hourly data for 30 measurement sites, which are located in five common climate zones. Figure 1 shows the identification numbers and geographic locations of the 30 measurement sites used in the study. The data-collection times and elevations of these stations are given in Table 1, and are classified based on the Koppen climate classification method. This method involves a representation based on three letters indicating the climatic conditions. The first letter indicates the major climate type, which is one of the following: (A) equatorial, (B) arid, (C) warm temperature, (D) snowfall, and (E) polar climates. The second and third letters indicate the precipitation conditions and temperature, respectively. For example, BSk indicates that the region is located in an arid, cold temperature with a stepped climate. For a detailed description of the climate classification, please refer to [35]. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Climate Type** & **Site id** & **Elevation (m)** & **Period** & **Site id** & **Elevation (m)** & **Period** \\ \hline \multirow{6}{*}{BSk} & 2107 & 1221 & 2011–2019 & 2152 & 1322 & 2010–2019 \\  & 2131 & 1251 & 2011–2019 & 2160 & 1779 & 2010–2019 \\  & 2132 & 1718 & 2011–2019 & 2169 & 1477 & 2009–2019 \\  & 2133 & 1558 & 2013–2019 & 2171 & 1595 & 2010–2019 \\  & 2139 & 2131 & 2011–2019 & 2183 & 169 & 2012–2019 \\  & 2129 & 1526 & 2010–2019 & 2185 & 806 & 2012–2019 \\  & 2158 & 1628 & 2010–2019 & 2186 & 1110 & 2012–2019 \\  & 2013 & 235 & 2013–2019 & 2083 & 71 & 2011–2019 \\  & 2037 & 37 & 2011–2019 & 2174 & 49 & 2010–2018 \\  & 2070 & 50 & 2011–2017 & 2177 & 82 & 2015–2017 \\  & 2076 & 215 & 2011–2019 & & & \\ \multirow{2}{*}{Csa} & 2189 & 822 & 2012–2019 & 2218 & 1129 & 2015–2019 \\  & 2215 & 2385 & 2015–2019 & 2167 & 336 & 2010–2015 \\  & 2014 & 332 & 2010–2019 & 2196 & 328 & 2013–2019 \\ \multirow{2}{*}{Dfa} & 2031 & 327 & 2010–2019 & 2196 & 328 & 2013–2019 \\  & 2042 & 742 & 2010–2014 & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Measurement stations used in the study. Figure 1: Location and climate types of 30 measurement stations used in the present study. There will be missing values in the data set, which are caused by sensor failure, memory damage, and other reasons. In order to avoid destroying the continuity of the time series data, we use MissForest algorithm [36] to interpolate missing values. This method is a nonparametric interpolation method based on random forest, which is suitable for both discrete variables and continuous variables, and can be well applied to nonlinear data. After processing missing values, the valid data of 30 stations totaled 1,577,714 groups, including the hourly weather conditions such as the temperature, dew point, relative humidity, wind speed, solar radiation, and soil temperature at 5, 10, 20, 50, and 100 cm, respectively. Based on the existing data, we further calculated the month, day of the month, hour of the day, and ST amplitude as supplementary data. The ST amplitude is a parameter defined in this paper, which is used to describe the fluctuation of hourly ST relative to the average ST of the day, it is obtained by subtracting daily average ST from each hourly ST.  
We first determined the inputs of the model with a Pearson correlation coefficient [16], which can reflect the degree of correlation between the two variables \(x\) and \(y\), based on Equation (1).