## 2 Materials and Methods
### EC Data Processing and Flux Partitioning to GPP  
Each EC system consists of a three-dimensional sonic anemometer (R3-50, Gill LTD, Lymington UK) and an infrared gas analyzer (LI-7200, Licor Bioscience, Lincoln, NE, USA) to measure mixing ratios of CO\({}_{2}\) and H\({}_{2}\)O. Additional vertical CO\({}_{2}\) and H\({}_{2}\)O concentration profiles were measured at seven levels between the surface and the measurement height in the EC tower (0.1, 0.5, 1.0, 2.0, 5.0, 9.0, and 15 m above ground with a LI840, Licor Bioscience, Lincoln, NE, USA). Meteorological variables such as air temperature (Ta), wind speed (WS), relative humidity (RH), incoming global radiation (Rg), photosynthetically active radiation (PAR), and precipitation (Prec) were also measured at each site.  
Figure 1: (**left panel**) Experimental setup at Majadas de Tiétar and La Albuera in Spain and (**right panel**) an example of regions of interest (ROIs) in each experimental site: Grass, Tree and Ecosystem ROIs, respectively. At each site, an eddy covariance (EC) system was installed at a height of 15 m to measure the fluxes of the whole ecosystem. A near-infrared-enabled camera was installed at 15 m beside the EC system to take pictures half-hourly between 10:00 and 14:30. Three EC towers are in the Majadas de Tiétar (FLUXNET IDs are ES-LM1, ES-LM2, and ES-LMa, respectively) and an EC tower is in the La Albuera (FLUX ID: ES-Abr), respectively (not shown). The map of Majadas de Tiétar was provided courtesy of the Spanish Program of Aerial Orthophotography. The design of the schematic plot of instruments in the experimental sites refers to [17] and the photo of the EC tower inside the graphic was taken by [PERSON].  
Raw EC data were collected at 20 Hz, and were then processed using EddyPro 6.2. The main processing procedures for CO\({}_{2}\) fluxes included (1) coordinate rotation using planar fit method [50]; (2) CO\({}_{2}\) time lag adjustments by covariance maximization in predefined windows; (3) spectral corrections performed for low and high pass-filtering effects according to [PERSON] et al. [51] and [PERSON] et al. [52]. The calculated flux for CO\({}_{2}\) was then quality checked [53; 54]. The net ecosystem exchange (NEE) flux was corrected by adding storage fluxes (integrated CO\({}_{2}\) fluxes using seven levels of CO\({}_{2}\) profiles when possible, otherwise using 1-point storage) to CO\({}_{2}\) flux.  
The u*-threshold, which was used as a criterion to discriminate low- and well-mixed eddies in the nighttime, was estimated for each year and tower individually (the median of u*-threshold ranges from 0.11 to 0.18 for ES-LM1, ES-LM2, and ES-LMa while 0.20-0.24 for ES-Abr) following [PERSON] et al. [55].  
The time series of NEE were gap filled using the marginal distribution sampling (MDS) method [56] which is based on lookup tables of temperature, global radiation, and water vapor pressure deficit (VPD) classes for short temporal windows i.e., 14 days. The gap-filled time series of NEE were then partitioned into GPP as described in [PERSON] et al. [56]. In brief, the nighttime flux (Rg < 10 W/m\({}^{2}\)) of NEE (i.e., only respiration) is extrapolated from nighttime to daytime through a temperature response function, which is based on short term temperature sensitivities (for details see [56]). The u*-threshold, gap-filling, and partitioning was performed with the R package REddyproc [57].