# Comparison of Machine Learning Methods to Up-Scale Gross Primary Production
## Materials and Methods
### MODIS GPP Products
#### 2.2.3 Field Data  
Field carbon flux data used in this study were derived from the Multi-Scale Observation Experiment on Evapotranspiration over heterogeneous land surfaces in 2012 of the Heihe Watershed Allied Telemetry Experiment Research (HiWATER-MUSOEXE) [54; 55; 56]. Half-hourly carbon flux data from 2 eddy covariance systems in the upstream, 4 eddy covariance systems in the midstream and 3 eddy covariance systems in the downstream (Table 1) were collected. Time period of the flux data was from May to September in 2014. Land-cover types of the 9 eddy covariance systems included cropland (mainly maize), bare land, grass land, shrub land, wetland, and forest. Gaps in the observed datasets, which were caused by the system malfunction, wind and rain were firstly filled. Principles to control data quality and to exclude the outlier of the datasets were as follows: (1) excluding the observed data one hour before and after precipitation; (2) excluding the data that were outside the instruments' measurement range or outside the reasonable range of values; (3) excluding the negative value at night due to there being no assimilation of carbon dioxide in the photosynthesize at night; (4) excluding the datasets when friction velocities were lower than the threshold value [57; 58; 59] at night.  
At daytime, gaps in the flux data were filled by using a look-up table [58; 59], which was built on flux, air temperature and photosynthetically active radiation. At night, gaps in the flux data were filled based on the relationship between the ecosystem respiration and the air temperature or the soil temperature, which was described as [59] follows:  
\[R_{exo}=a*e^{bT} \tag{1}\]  
where \(R_{exo}\) is ecosystem respiration (mg\(\cdot\)m\({}^{-2}\cdot\)s\({}^{-1}\)), \(a\) and \(b\) are the coefficient, \(T\) is the air temperature or the soil temperature (\({}^{\circ}\)C) at night.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Name** & **Longitude (\({}^{\circ}\))** & **Latitude (\({}^{\circ}\))** & **Altitude (m)** &
\begin{tabular}{c} **Height of** \\ **Instruments (m)** \\ \end{tabular} & **Location** & **Land Cover** \\ \hline Arou & 100.46 & 38.05 & 3033 & 3.50 & Upstream & Grassland \\ Dashalong & 98.94 & 38.84 & 3739 & 4.50 & Upstream & Grassland \\ Bajitan & 100.30 & 38.92 & 1562 & 4.60 & Midstream & Bare land \\ Daman & 100.37 & 38.86 & 1556 & 4.50 & Midstream & Cropland \\ Huazhaizi & 100.32 & 38.77 & 1731 & 2.85 & Midstream & Bare land \\ Shidi & 100.45 & 38.98 & 1460 & 5.20 & Midstream & Wetland \\ Huyanglin & 101.12 & 41.99 & 876 & 22.00 & Downstream & DBF \\ Hunhelin & 101.13 & 41.99 & 874 & 22.00 & Downstream & MF \\ Didaoqiao & 101.14 & 42.00 & 873 & 8.00 & Downstream & Shrub land \\ \hline \hline \end{tabular}
\end{table}
Table 1: Information of the carbon flux observation stations. DBF (deciduous broadleaved forest), MF (mixed forest).  
Then daily carbon flux was obtained by summing the half-hourly carbon flux data. At last, daily GPP were obtained by partitioning the observed net flux into GPP and ecosystem respiration [59; 60; 61], the process could be described as [59; 60; 61] follows:  
\[\text{GPP}=R_{eco}-\text{NEE} \tag{2}\]  
where NEE is the net ecosystem carbon dioxide exchange. One advantage of using daily data instead of half-hourly intervals to derive daily GPP is to reduce errors on deriving NEE and GPP using temperature and radiation, because observed fluxes and meteorological conditions such as photosynthetic active radiation have significant variations from hour-to-hour [62; 63]. Studies indicated that using daily data could reduce the effect of the hour-to-hour variations when deriving NEE and GPP [62; 63].