## 2 Materials and Methods
### Model  
#### 2.3.1 Deep Learning Model  
In this study, we constructed our model based on the GeoMAN algorithm developed by [PERSON] et al. in 2018, which was originally applied to predict air quality [21]. The GeoMAN algorithm can extract the spatial correlation of input variables and consider the influence of neighboring sites on the target site's GPP, which can help estimate the GPP of grasslands more accurately. The GeoMAN algorithm consists of an encoder and a decoder. The encoder contains a mechanism to consider the features within a site, a mechanism to consider the spatial features between sites, and an LSTM model to extract the local features of the site to be predicted and the spatial features of relevant surrounding sites. The decoder includes a temporal attention mechanism and an LSTM model, which decode the feature vector output by the encoder to predict grassland GPP. There are complex correlations between environmental variables and GPP at each flux site. The inter-site feature attention mechanism of the GeoMAN algorithm dynamically captures the association between environmental variables and GPP within the site targeted for prediction. The inter-site feature attention mechanism for the target flux site is estimated as follows:  
\[e_{k,t}=\mathbf{v}_{0}^{T}\text{tan h}\ (\mathbf{W}_{0}\left[\mathbf{h}_{t-1};\mathbf{s}_{t-1} \right]+\mathbf{U}_{0}[\mathbf{f}_{k}^{0}]+\mathbf{b}_{0} \tag{1}\]  
In Equation (1), \([\mathbf{h}_{t-1};\mathbf{s}_{t-1}]\) denotes the concatenation operation in Tensorflow between \(\mathbf{h}_{t-1}\) and \(\mathbf{s}_{t-1}\), as they are the hidden state and the cell state of the LSTM network at time \(t-1\), respectively, which contain the information of the previous \(t-1\) time steps, thereby forming the long-term and short-term memory of the LSTM network. \(\mathbf{I}_{k}^{0}\) means the \(k\)-th time series at the flux site to be predicted. \(\mathbf{v}_{0}\), \(\mathbf{W}_{0}\), \(\mathbf{U}_{0}\), and \(\mathbf{b}_{0}\) are the learnable parameters: during the learning and training process of the model, they are continuously updated according to the loss function via backpropagation. The environmental factors selected for predicting GPP in this study include temperature (Ta), photosynthetically active radiation (PAR), enhanced vegetation index (EVI), normalized difference vegetation index (NDVI), and land surface water index (LSWI). The formula for calculating the weighting values of each factor based on the Geoman model's inter-site feature attention mechanism is as follows:  
\[\mathbf{\alpha}_{k,t}=\frac{\exp(e_{k,t})}{\sum_{j=1}^{T}\exp(e_{j,t})} \tag{2}\]  
In Equation (2), \(\mathbf{\alpha}_{k,t}\) is the weighting value of the \(k\)-th feature (one each for Ta, PAR, EVI, NDVI, and LSWI) at time \(t\). The sum of the weighting values of all features is 1. The calculated weighting values are multiplied by the corresponding feature values to distinguish the importance of different features according to the GeoMAN model. As shown in Figure 2, the LSTM unit is an important computational unit in the GeoMAN model. Figure 3 shows the schematic diagram of the LSTM unit. The input at time \(t\) is \(x_{t}\), and \(c_{t-1}\) and \(h_{t-1}\) are the cell state and the hidden state at time \(t-1\), respectively. They go through three main stages inside the LSTM unit: first, the forgetting stage, which selectively forgets the input from the previous time step; second, the selective memory stage, which selectively remembers the input from the current time step, emphasizingimportant parts while remembering less important parts; and third, the output stage, which outputs the new hidden state \(h_{t}\) and the cell state \(c_{t}\) and inputs them to the next time step. Figure 3: The structure of LSTM. Figure 2: The structure of GeoMAN adapted from [PERSON] et al. [21]. After the input data are assigned different weights by the inter-station feature attention mechanism and updated by the LSTM unit, it is essential to select pertinent time periods for GPP forecasting.