# Exploring Ecosystem Functioning in Spain with Gross and Net Primary Production Time Series
## 4 Methods
### Interannual Component from MRA-WT  
The MRA-WT allows for a fast implementation of the discrete wavelet transform by means of a decomposition of the TS into timescales based on powers of two, 2i (\(j=1\)  
\begin{table}
\begin{tabular}{c c c c c c} \hline
**Site** & **Vegetation Type** & **Latitude (°)** & **Longitude (°)** & **PRE (mm y–1)** & \(T\) (°C)** & \(h\) **(m)** \\ \hline A & SPV & 37.07 & \(-\)2.36 & 241 & 17.2 & 463 \\ B & GRA & 38.77 & \(-\)5.50 & 396 & 16.9 & 365 \\ C & SHR & 38.95 & \(-\)0.87 & 466 & 15.9 & 763 \\ D & CRO & 39.34 & \(-\)1.83 & 404 & 14.2 & 756 \\ E & ICRO & 41.71 & 0.90 & 450 & 14.0 & 224 \\ F & EBF & 36.40 & \(-\)5.54 & 841 & 17.9 & 278 \\ G & LDBF & 42.95 & \(-\)1.61 & 1419 & 12.8 & 619 \\ H & HDBF & 43.12 & \(-\)4.78 & 1150 & 11.4 & 1044 \\ I & LENF & 38.12 & \(-\)2.76 & 634 & 15.7 & 696 \\ J & HENF & 40.74 & \(-\)2.09 & 497 & 11.8 & 1099 \\ \hline \end{tabular}
\end{table}
Table 1: Vegetation type, main ecoclimatic features, and coordinates of the ten selected sites with their average annual precipitation (PRE), average annual \(T\), and elevation above sea level (\(h\)). SPV (sparse vegetation), GRA (grasslands), SHR (shrublands), CRO (rainfed croplands), ICRO (irrigated crops), EBF (evergreen broadleaved forest), LDBF (low-altitude deciduous broadleaved forest), HDBF (high-altitude deciduous broadleaved forest), LENF (low-altitude evergreen needle-leaved forest), and HENF (high-altitude evergreen needle-leaved forest).  
\(m\),..., \(m\)), where \(j\) refers to the different levels of decomposition and \(m\) to the highest level considered [47]. As a result of the MRA, the original signal can be reconstructed as  
\[g\left(t\right)=A_{m}\left(t\right)+\Sigma^{m}_{j}=1\ D_{j}\left(t\right) \tag{7}\]  
where \(A\) is the approximation component and \(D\) the detail component. The MRA can be understood as a sequence of the \(A\) component at the lowest level and complementary information given by the details \(D\) time series, which provide information of high-frequency contributions at each temporal resolution.  
The temporal resolution of each level depends on the center frequency of the selected wavelet and the temporal resolution of the TS. In our case, the Meyer wavelet (with central frequency \(v_{c}=0.67213\) Hz) is chosen due to its potential for vegetation dynamic analysis shown in previous studies [14; 48]. For example, in the case of daily temporal resolution (GPP, NPP, and \(T\) in the current study), the approximation component of each level accounts for all the vegetation variations at the following specific time resolutions: \(A_{1}\) (1.5 days), \(A_{2}\) (3 days), \(A_{3}\) (6 days), \(A_{4}\) (12 days), \(A_{5}\) (24 days), \(A_{6}\) (48 days), \(A_{7}\) (96 days), \(A_{8}\) (192 days), \(A_{9}\) (385 days). The detail components provide information about the portion of the signal that can be attributed to variations between the resolutions \([j-1,j]\). The sum of detail components \(D\) between different levels provides the variability (\(V\)) of the signal attributed to the temporal frequencies between these particular levels. Details of this methodology can be found in [14].  
The MRA-WT is applied until level nine for daily TS (GPP, NPP, and \(T\)) and until level four for monthly SPI series since it gives us the approximation component (\(A_{9}\) and \(A_{4}\), respectively) to study the interannual changes. Figure 2 shows an example of the MRA-WT decomposition applied to the GPP series for a deciduous broadleaved forest pixel. The top panel shows the original TS, whereas the center plot refers to the total variation removed from the interannual part corresponding to days between 6 and 385 days (\(V_{4-9}\)). The plot on the bottom shows the interannual (\(A_{9}\)) component of the original TS.