## 2 Materials and Methods
### Model and Method
#### 2.3.2 Analysis of Inter-Annual Trends  
After estimating the NEP of the Taihang Mountain area in each year, the inter-annual trend in NEP in the Taihang Mountain area from 2000 to 2022 was analysed by calculating the median in the long time series through Theil-Sen Median slope estimation and the Mann-Kendall test. Theil-Sen Median regression is a robust linear regression method used to minimise the effect of outliers on the fitting results. Theil-Sen Median regression uses a statistic called median slope for parameter estimation, which provides better resistance to outliers and improves the robustness of the regression model. The specific formula is as follows:  
\[Slope=median(\frac{NEP_{j}-NEP_{i}}{j-i}),2000<i<j<2022 \tag{3}\]  
where Slope represents the trend in inter-annual changes in NEP, and \(NEP_{i}\) and \(NEP_{j}\) are the NEP values for year i and year j, respectively. When Slope > 0, NEP has an upward trend and vice versa. While Mann-Kendall, as a non-parametric test of trends in time series, does not require the measurements to obey the normal distribution, subject to the influence of missing values and outliers, it is suitable for the trend significance test of long time series data, can effectively reduce the influence of nulls, and can be used for the significance test of the trend in the NEP within the study period.  
\[\mathrm{S}=\sum_{i=1}^{n-1}\sum_{i=i+1}^{n}\mathrm{sign}\big{(}NEP_{j}-NEP_{i }\big{)} \tag{4}\]  
\[\mathrm{sign}\big{(}\mathrm{NEP_{j}-NEP_{i}}\big{)}=\begin{cases}1&\big{(} \mathrm{NEP_{j}-NEP_{i}>0}\big{)}\\ 0&\big{(}\mathrm{NEP_{j}-NEP_{i}=0}\big{)}\\ -1&\big{(}\mathrm{NEP_{j}-NEP_{i}<0}\big{)}\end{cases} \tag{5}\]  
\[\mathrm{Var}(\mathrm{S})=\frac{\mathrm{n}(n-1)(2\mathrm{n}+5)}{18} \tag{6}\]  
\[\mathrm{Z_{s}}=\left\{\begin{array}{l}\frac{\mathrm{S}-1}{\sqrt{\mathrm{var }(\mathrm{S})}},S>0\\ 0,S=0\\ \frac{\mathrm{S}+1}{\sqrt{\mathrm{var}(\mathrm{S})}},S<0\end{array}\right. \tag{7}\]In the above equation, refer to the NEP values for each year from 2000 to 2022, respectively, as a function of the variance of the random variable. The Mann-Kendall method was used to test the significance of the NEP trend. If the standardised value Z is greater than 0, the series has an upward trend; if it is less than 0, the series has a downward trend. When the absolute value of Z is greater than or equal to 1.64, 1.96, and 2.58, it means that the time series passes the significance test at the confidence level of 90%, 95%, and 99%, respectively.  
The discrete coefficients can reflect the degree of dispersion of the observations more intuitively and eliminate the scale, which is convenient for objective comparison. The stability of vegetation carbon sinks in Taihang Mountains from 2000 to 2022 is shown by the discrete coefficient in terms of picture elements. The specific formula is as follows:  
\[C_{\text{p}}=\frac{\sqrt{\frac{1}{n}\frac{\sum\limits_{i=1}^{n}\left(NEP_{i}- \overline{NEP}\right)^{2}}}}{\overline{NEP}} \tag{8}\]  
where \(NEP_{i}\) denotes the vegetation carbon sink in year \(i\), and \(\overline{NEP}\) represents the average value of the vegetation carbon sink of each picture element. The smaller the value of the dispersion coefficient \(C_{\text{p}}\), the smaller the fluctuation of \(NEP\) over time, and the more stable the vegetation carbon sink is; on the contrary, the larger the fluctuation is, and the lower the stability is.