The high frequency response correction of eddy covariance ﬂuxes. Part 2: the empirical approach and its interdependence with the time-lag estimation

. The eddy covariance (EC) technique has emerged as the prevailing method to observe ecosystem - atmosphere exchange of gases, heat and momentum. EC measurements require rigorous data processing to derive the ﬂuxes that can be used to analyse exchange processes at the ecosystem - atmosphere interface. Here we show that two common post-processing steps (time-lag estimation via cross-covariance maximisation, and correction for limited frequency response of the EC measurement system) are interrelated and this should be accounted for when processing EC gas ﬂux data. These ﬁndings are applicable 5 to EC systems employing closed- or enclosed-path gas analysers which can be approximated to be linear ﬁrst-order sensors. These EC measurement systems act as a low-pass ﬁlters on the time-series of the scalar χ (e.g. CO 2 , H 2 O) and this induces a time-lag ( t lpf ) between vertical wind speed ( w ) and scalar χ time series which is additional to the travel time of the gas signal in the sampling line (tube, ﬁlters). Time-lag estimation via cross-covariance maximisation inadvertently accounts also for t lpf and hence overestimates the travel time in the sampling line. This results in a phase shift between the time-series of w and χ , 10 which distorts the measured cospectra between w and χ and hence has an effect on the correction for dampening of EC ﬂux signal at high frequencies. This distortion can be described with a transfer function related to the phase shift ( H p ) which is typically neglected when processing EC ﬂux data. Based on analyses using EC data from two contrasting measurement sites, we show that the low-pass ﬁltering induced time-lag increases approximately linearly with the time constant of the low-pass ﬁlter, and hence the importance of H p in describing the high frequency ﬂux loss increases as well. Incomplete description of 15 these processes in EC data processing algorithms results in ﬂux biases of up to 10%, with the largest biases observed for short towers due to prevalence of small scale turbulence. Based on these ﬁndings, it is suggested that spectral correction methods implemented in EC data processing algorithms are revised to account for the inﬂuence of low-pass ﬁltering induced time-lag. these results indicate that, for a given site, t lpf can be approximated to be constant at a speciﬁc

The frequency response correction is usually performed based on a priori knowledge of the system transfer function and the unattenuated cospectrum: (1) Here CF is the estimated spectral correction factor, Co w,χ the normalised unattenuated cospectrum between scalar (χ) and vertical wind speed (w), f the frequency, H lpf the total transfer function describing the low-pass filtering, and f 1 and f 2 are the 15 integration limits that are determined by the length of the averaging period and Nyquist frequency, respectively. The correction, performed by multiplying the measured covariance by the factor CF, always increases the absolute flux magnitude. Note that the low-frequency transfer function (Rannik and Vesala, 1999) is not included in Eq. (1), as here we focus only on the low-pass filtering effect of the EC system. The high-frequency transfer function H lpf can be derived either theoretically or empirically (Foken et al., 2012a). The correction is in general different for momentum flux, sensible and latent heat fluxes and the various 20 gas fluxes, and is specific to each EC system. In the theoretical approach, the atmospheric surface layer co-spectral models (Moncrieff et al., 1997) are used, and H lpf is calculated as a convolution of specific transfer functions representing different causes of flux loss, the equations for which can be found in Moncrieff et al. (1997) and Moore (1986). This approach works well for correcting the fluxes of momentum and sensible heat, as well as gas fluxes measured by open-path systems. Further, Horst (1997) and Massman (2000) have proposed alternative theoretical approaches, providing an analytical estimation of 25 correction factors.
Alternatively, the empirical approach can be used, where the model cospectra and H lpf are estimated using in situ measurements. This is the preferable approach for closed-path systems, where additional effects related to the inlet dust filters and rain caps (Aubinet et al., 2016;Metzger et al., 2016), potential variations in the sampling line flow rate, and absortion/desorption processes inside the sampling tube (Ibrom et al., 2007a;Nordbo et al., 2014;Runkle et al., 2012) may contributed to the EC 30 system cut-off frequency, introducing transfer functions which are difficult to estimate a priori.
For this approach, different methods have been proposed for retrieving H lpf from the measured power spectra or cospectra of the sonic temperature T and the target gas dry mole fraction (Fratini et al., 2012;Ibrom et al., 2007a;Mammarella et al., https://doi.org/10.5194/amt-2020-479 Preprint. Discussion started: 11 January 2021 c Author(s) 2021. CC BY 4.0 License. 2009;Nordbo et al., 2014). While the use of power spectra is the method recommended by the ICOS methodology Nemitz et al., 2018) and is implemented in the EddyPro software package, other studies and software packages (EddyUH) have supported the use of measured cospectra (Aubinet et al., 2000;Mammarella et al., 2009Mammarella et al., , 2016 for the empirical retrieval of H lpf . The companion paper (Aslan et al., 2020) has investigated methodological issues and flux uncertainty related to these two methods under different attenuation conditions and signal-to-noise ratio scenarios.

5
In EC systems, particularly those using closed-path gas analysers, the measurements of vertical wind velocity and gas concentration are not co-located, and a time delay between the two signals exists (Aubinet et al., 2012). The standard procedure is to determine this time delay for each averaging period (typically 30 minutes) by maximising the related cross-covariance function (in absolute terms), and taking the corresponding lag as the true signal delay. However, this time shift between the two signals depends not only on the system setup (e.g. air sample travel time from the inlet to the IRGA sampling cell, separation distance between the inlet and the centre of the sonic anemometer path), but it can additionally reflect the low-pass filtering of the measured signal (Massman, 2000;Ibrom et al., 2007b, a).
In this study, we investigate how the low-pass filtering induced phase shift affects the estimation of the high frequency flux loss, and we show the implications that occur when H lpf time constants are empirically derived from measured power spectra or cospectra, and related CFs values are applied to covariances estimated from the cross-covariance maximum. Finally, we 15 present a method to take the phase shift effect into account when processing EC data. Towards these aims, we use EC data collected above a forest canopy (Hyytiälä) and a wetland (Siikaneva) in Finland covering a large range of attenuation conditions and integral turbulent time scale characteristics.
2 Theory 2.1 Transfer functions 20 The measured cross-spectrum (Cr m ) between the fluctuations of vertical wind speed (w ) and the attenuated and lagged scalar (χ ; in this paper attenuated variables are denoted withˆ) can be described by (e.g. Massman (2000)): where Z w and Z χ are Fourier transforms of the time series of w and χ which are perfectly in phase and not attenuated, h χ is the Fourier transform of the filter function that describes the response of the instrument measuring the scalar time series, j = √ −1 25 and φ phys = ωt phys , where t phys is a constant time shift (s) between w and χ and ω = 2πf is the angular frequency, with f representing the frequency (Hz). The superscript * denotes complex conjugation. Equation (2) describes the cross-spectra measured with a typical EC system employing closed-path gas analyser where the scalar fluctuations are attenuated (h χ ), and delayed in time (t phys ) with respect to w due to the gas sampling system (tubes, filters) and horizontal sensor separation.
The signal travel time in the gas sampling line (t phys ) could be approximated from the volume of the sampling line and flow 30 rate. Note that we assume that the sensor measuring w is perfect without any distortions in the measured w time series. This assumption does not limit the generality of the findings below. We also neglect any influence of sensor separation (Horst and Lenschow, 2009) or high-pass filtering on flux attenuation.
Following, e.g., Horst (1997) and Massman (2000), the scalar sensor is approximated to be a linear first-order sensor for which h χ can be written as where τ is the time constant (s) of the filter, also called response time. Note that Z w Z * χ is the true cross-spectrum (Cr) between unattenuated w and χ time series which are in phase and it has a real (cospectrum Co) and an imaginary (quadrature spectrum Recall also that the integral of Co equals the unattenuated covariance w χ , i.e. the vertical turbulent flux of scalar χ. Following previous studies (Horst, 1997;Massman, 2000), the quadrature spectrum (Q) can be assumed to be zero for stationary turbulent flow and hence Cr=Z w Z * χ ≈ Co. Now, using Euler's formula and some derivation 10 (see Appendix A), we find where the first term on the right equals the measured cospectrum (Co m ) and the second term the measured quadrature spectrum (Q m ). Note that whilst Q was assumed to be negligible, Q m is in fact not equivalent to zero even when φ phys = 0, i.e. when the travel time of scalar χ signal in the sampling system is zero. This means that w and the attenuatedχ (ˆdenotes attenuation 15 throughout the text), depending on frequency, can be out of phase due to low-pass filtering of Z χ with h χ . This has already previously been noted (e.g. Massman, 2000;Massman and Lee, 2002;Wintjen et al., 2020). Now, simply based on the real part of Cr m , we can define a transfer function for the first-order system (H) as and a transfer function (H p ) for a generic phase shift φ as (Massman, 2000): These two transfer functions together describe how the measured cospectrum (Co m ) deviates from the cospectrum calculated from ideal measurements free from any attenuation and time shifts (Co).
Similarly, forming the cross-spectrum of the attenuated scalar with itself yields: where Z χ Z * χ is the unattenuated power spectrum. From this it follows that the same transfer function (i.e. H) applies to both power spectrum and cospectrum in the case that there is no phase shift between w and χ (i.e. H p equals 1) and the quadrature spectrum Q is zero.

Time lag determination via cross-covariance maximisation
The widely used method to estimate the time lag between w andχ via cross-covariance maximisation can be considered to be equivalent to finding a time shift t (and hence φ = ωt) that maximises the integral of Co m above (i.e. maximises the covariance between w andχ ): The original aim of this cross-covariance maximisation is to account for the time lag between the time series w andχ that is induced by sampling lines (air filters, tubing) and horizontal sensor separation, in other words to find such time lag that removes the e −jφ phys term in Eq.
(2). After such successfully accounting for the travel time (t phys ), the attenuation of the measured cospectrum Co m (and hence flux) would be described only by H, instead of H and H p (see Eq. (4)), since the time lag estimation sets H p = 1. However, the filter described by Eq. 3 results in a phase shift and hence produces an additional 10 time lag between w andχ , i.e. t lpf . This can be seen from Eq. (4): Q m differs from zero when φ = 0 (see also Massman (2000); Massman and Lee (2002); Wintjen et al. (2020)). Cross-covariance maximisation inadvertently derives the sum of t phys and t lpf , which implies that the time lag determined by cross-covariance maximisation is not the desired transport time lag. Using the sum of t phys and t lpf instead of t phys induces a non-negligible negative φ in Eq. (4). Hence when shifting the time series according to the cross-covariance maximisation, the transfer function related to the phase shift (H p ) can no 15 longer be neglected and should be calculated using φ = −ωt lpf , where t lpf is the bias in the time lag when estimated via cross-covariance maximisation, in other words the low-pass filtering induced time lag (note the minus-sign, since H p accounts for the overestimated time lag).
As the maximal possible cospectral energy content per unit frequency can be described with the amplitude spectrum (A m = Co 2 m + Q 2 m ), it can be assumed that after the cross-covariance maximisation (time series shifted by t phys + t lpf ), Co m can 20 be approximated by A m . It is straightforward to derive A m from Eq. (4): Hence A m is attenuated with √ H instead of H which describes the attenuation of Co m in the case that there is no phase shift between w andχ as shown above. This suggests that after cross-covariance maximisation √ H approximates HH p and the correct transfer function for cospectrum calculated after cross-covariance maximisation. Note that Eq. (10) applies universally, 25 independent of φ.
The dependence between low-pass filtering induced time lag (t lpf ) and filter response time (τ ) was estimated using the approximation HH p ≈ √ H or H p ≈ 1 √ H . For this analysis the phase transfer function H p was approximated by using the series expansion of the terms in H p (Eq. 6). This approximation resulted in H p ≈ 1 − 1 2 (ωt lpf ) 2 + ωτ (ωt lpf ). Similarly, 1 √ H can be approximated by 1 + 1 2 (ωτ ) 2 . Equating these two approximations up to the second order yields a quadratic equation 30 where the frequency dependence cancels out: t 2 lpf −2τ t lpf +τ 2 = 0. The solution of this simple equation gives t lpf = τ . Thus, up to the second order approximation, which holds roughly up to the frequency value ω = 1, the low pass filtering induced time lag equals the time constant of the filter. Note, however, that at this frequency range (ω between 0 and 1) the filtering effect is very weak.

Measurement sites
Measurements from the Siikaneva fen and the Hyytiälä forest site (SMEAR II) were used. Both stations are part of Integrated vapor mixing ratios were measured by an infrared gas analyzer (LI-7200, LI-COR Biosciences, USA). The centre of the sonic anemometer was displaced 20 cm horizontally and 1 cm vertically from the intake of the gas analyzer. The measurement setup was designed to closely follow the ICOS EC measurement protocols (Franz et al., 2018;Rebmann et al., 2018). The measurements were conducted between May and August 2019. 15 The Siikaneva fen site is located in Southern Finland (61 o 49.9610 N, 24 o 11.5670 E; 160 m a.s.l), consisting mainly of sedges (Eriophorum vaginatum, Carex rostrata, C. limosa) and Sphagnum-species, namely S. balticum, S. majus and S. papillosum with the height of ca. 10-30 cm. Further details about the site can be found in Riutta et al. (2007), Peltola et al. (2013) and Rinne et al. (2018). The EC measurements were conducted between May and August 2013. The data used in this study were measured with 10 Hz sampling frequency using a 3-D sonic anemometer (Metek USA-1, GmbH, Elmshorn, 20 Germany) and a closed-path analyzer (LI-7000, LI-COR Biosciences, USA). The sonic anemometer and the gas inlet were situated at 2.75 m above the peat surface, and the air was drawn to the analyzer through a 16.8 m long heated inlet sampling line. The center of the sonic anemometer was displaced 25 cm vertically above the intake of gas analyzer.
A short dataset (hereafter D S1 ) measured between 9:30 and 11:30 on 16-Jun 2013 at the Siikaneva site was used in the method validation (see Sect. 4.2), whilst long-term datasets from both Siikaneva (hereafter D S2 ) and Hyytiälä (hereafter D H ) 25 were used to evaluate the accuracy of different spectral correction methods and their effect on CO 2 and H 2 O fluxes (see Sect.

Data processing
High frequency EC data from the two sites were processed in order to evaluate 1) the accuracy of different spectral correction methods and 2) their effect on gas (CO 2 and H 2 O) flux estimates at these sites. The processing steps followed commonly 30 accepted routines: 1) data were despiked using a method based on the running median filter (Brock, 1986;Starkenburg et al., 6 https://doi.org/10.5194/amt-2020-479 Preprint. Discussion started: 11 January 2021 c Author(s) 2021. CC BY 4.0 License. 2016), 2) coordinates were rotated using double-rotation which aligned one of the horizontal wind components with the mean wind setting the mean vertical and cross wind components to zero, 3) gas (CO 2 and H 2 O) mole fractions were converted point-by-point to be relative to dry air, if not already done internally by the gas analyser (LI-7200), 4) turbulent fluctuations were extracted from the measurements using block-averaging and 5) time lags between gas or filtered T (see Sect. 3.2.2) and vertical wind time series were accounted for using cross-covariance maximisation. Power spectra and cospectra were 5 calculated after these processing steps. Spectral corrections and the related correction factors (CF ) were calculated using four methods described below, see Sect. 3.2.1. After processing, the flux time series were quality filtered by removing periods with unrealistic sensible heat fluxes or friction velocities and highly non-stationary fluxes (Foken and Wichura, 1996). Site specific friction velocity thresholds (0.17 and 0.3 m/s for Siikaneva and Hyytiälä, respectively) were used to discard gas flux data during low turbulence periods. Furthermore, at Hyytiälä wind directions between 150 • and 230 • were discarded since here the mast 10 construction disturbed the air flow. At Siikaneva an omnidirectional sonic anemometer was used mounted to the top of a mast and hence clearly disturbed wind directions were not identified. After quality filtering 4210 and 4722 30-min periods were available for analysis from Hyytiälä and Siikaneva, respectively.
Atmospheric stability was evaluated using the Obukhov length (L): 15 where u * is the friction velocity, v k = 0.4 the von Karman constant, g the acceleration due to gravity and θ v is virtual potential temperature. Overline denotes temporal averaging and primes deviations from the mean. From the Obukhov length, the stability parameter was calculated as ζ = z−d L , where z is the measurement height and d is the zero plane displacement height.

Empirical estimation of the high-frequency attenuation
The total transfer function of an EC setup can be estimated empirically from measured w-χ and w-T cospectra: or, alternatively, from the power spectra of the measured scalar and T : where Co w,χ denotes the cospectral density between w andχ, and w χ represents the covariance between w andχ. Sχ ,χ and σ 2 χ denote the power spectral density and variance ofχ, respectively, and the corresponding terms are defined for T . When

25
estimating H e,cs and H e,ps , the covariances and variances were calculated from unattenuated frequencies (between 5×10 −3 Hz and 5×10 −2 Hz) (Foken et al., 2012a;Sabbatini et al., 2018). An additional normalisation factor (F n ) was also incorporated in order to take into account the fact that the variances and covariances in Eqs. (12) and (13) may be subject to various high frequency losses (Ibrom et al., 2007a). Here, w and T were approximated to be free from any low-pass filtering effects and thus Co w,T and S T,T could be used as a reference. H e,cs and H e,ps were calculated from ensemble-averaged spectra Table 1. Methods used in this study to estimate flux losses and related correction factors (CF ) due to low-pass filtering of the scalar signal.
See the definitions for H and Hp in Eqs. (5) and (6), respectively. Values for τ (and t lpf in method 4)) were estimated with non-linear least squares fit to He,ps or He,cs where Fn and τ (and t lpf in method 4)) were used as fitting parameters. The additional normalisation factor Fn took into account any inaccuracies in estimation of variances and covariances in calculation of He,ps or He,cs (Eqs. (13) and (12)), respectively. The fits were weighted with temperature cospectra, in order to give more weight to frequencies where the scalar fluxes were high.
Estimation of τ Fitting parameters H lpf used in the estimation of CF , Eq. (1)  from measurement periods that fulfilled the following criteria: flux stationarity (Foken and Wichura, 1996) was below 0.3, For CO 2 it was also required that its turbulent flux was below -0.05 µmol mol −1 m s −1 and for H 2 O it was required that the flux was directed upwards. For H 2 O the transfer functions were determined in relative humidity (RH) bins and the τ and t lpf values used in calculating CF were estimated from exponential fits made to the values obtained in the RH bins (similarly as for τ in Mammarella et al. (2009)). In the case of CO 2 and H 2 O fluxes, the power 5 spectra were subjected to noise removal prior utilising them in Eq. (13) by assuming that the signal was contaminated by white noise and that at the highest frequencies the power spectra contained only noise. See the influence of different noise removal techniques on the estimation of high frequency attenuation in our companion paper (Aslan et al., 2020).
Often both H e,cs and H e,ps are approximated by H with a value for τ that describes the high-frequency attenuation of the EC setup according to Eq. (5). Then the measured flux is corrected for high-frequency attenuation by multiplying it with CF 10 (see Eq. (1)). There are different ways to estimate Co w,χ for Eq. (1). Here we limited the analysis only to periods when the absolute sensible heat fluxes were higher than 15 W m −2 and estimated Co w,χ in Eq. (1) with the measured Co w,T following Fratini et al. (2012).
We used four methods to estimate EC system response times (and additionally t lpf in Method 4) and then to calculate CF (see Table 1). Method 1 follows the ICOS EC data processing protocol  and is implemented e.g. 15 in EddyPro after Hunt et al. (2016) (see also https://www.licor.com/env/support/EddyPro/topics/whats-new.html). Method 2 follows Aubinet et al. (2000) and is implemented in EddyUH . Method 3 follows Fratini et al. (2012), and Method 4 is the only one that explicitly accounts for the temporal lag caused by the high-frequency filtering action of the system and is introduced in this study. Throughout the study, cross-covariance maximisation was used to account for the lag between scalar and vertical wind speed as typically done in the global flux measurement network.

Low-pass filtering of temperature data
In order to evaluate the performance of the different spectral correction methods presented in Sect. 3.2.1, high frequency T time series were attenuated with different values of τ in order to mimic attenuated scalar time series. Similar to the procedure used by Aslan et al. (2020), T time series were converted to frequency domain via a Fourier transform, multiplied by Eq. (3) and converted back to time domain with the inverse Fourier transform. Three different values for τ were used: 0.1 s, 0.3 s and 5 0.7 s. The correct value for CF was obtained from the ratio between w T and w T , whereT was the time series attenuated with the methodology described above. Note that here w T was calculated using cross-covariance maximisation in order to mimic regular EC gas flux processing, meaning that the lag caused by low-pass filtering was taken into account. This correct value for CF was then compared against CF estimated with the four methods described in Sect. 3.2.1 in order to evaluate the accuracy of the methods. π τ (the relationship holds well up to such frequency for any τ ). In accordance with the approximations with the Taylor expansion (Sect. 2.2), at low frequencies the constant C equals one. The lower plot of Fig. 1 presents the left and right side terms of the approximate equality using the constant coefficient C = 0.63. In spite of the large variation of the exact coefficient with frequency, the selected constant value produces very good correspondence for the whole frequency range. 20 A value of C = 0.63 was obtained by estimating the average time lag in a least square sense over equally spaced frequencies in logarithmic scale over the interval from τ = 0.01 π τ to 2 3 π τ for a range of time constants from 0.05 to 1 s. We observed that the optimum coefficient was independent of τ and equal to 0.63 (with 2-digit accuracy). Note that these analyses were independent of the actual turbulent signal as they were obtained using the transfer functions only (H and H p ).
In addition to the analysis above, the integral in Sect. 2.2, i.e. Eq. (9) term: However, this numerical experiment was repeated also for very high attenuation levels and the found dependence above failed to fully recover t lpf values at high attenuation and this bias increased with τ and inverse of turbulence time scale (i.e. U/(z − d)).
For example at τ = 2 s and (z − d)/U = 1 s the equation above gave t lpf = 1.2 s, whereas based on the numerical integration 5 value 1.0 s was obtained, meaning that the dependence above was not able to accurately describe the low-pass induced time lag at these high attenuation levels. This is likely due to the fact that also the shape of the cospectrum Co in Eq. (9) has an effect on t lpf dependence on τ . At very high attenuation levels also the peak of the cospectrum is attenuated and this results in a different t lpf dependence on τ than the equation above which describes the dependence when attenuation takes place at high frequencies (i.e. inertial subrange).

10
The discrepancy between the two dependencies between t lpf and τ obtained above was likely due to the fact that the latter took into account also the variability of the turbulent flux with frequency, whereas the former was based purely on transfer functions. Nevertheless, these results indicate that, for a given site, t lpf can be approximated to be constant at a specific

Assessment of the flux loss correction methods using an attenuated T time series
The four methods to estimate the CF (Table 1) were evaluated using an artificially attenuated turbulent T time series comparing different values for τ . Figure 3 shows example cross-covariance functions from the Siikaneva site with three different values 5 of τ applied to the same 2-hour time series. The peak of the w-T cross-covariance shifted to longer positive times (i.e.T lags w) and the cross-covariance maximum decreased as τ increased. This is related to the phase shift and flux attenuation caused by the low-pass filter, respectively. The low-pass filtering was also evident in the corresponding power spectra and cospectra.
The resulting empirical transfer functions in Fig. 4 show that power spectra were more attenuated than the cospectra, when cospectra were calculated from data where the time lag derived from cross-covariance maximisation was used to shift the time 10 series (as is typically done when processing EC data). Moreover, the shape of the empirical transfer function derived from the cospectra differed from Eq. (5). This difference in shape was related to H p and the phase shift caused by the low-pass filter. Note that the phase shift resulted in negative values for HH p and H e,cs at high frequencies, meaning that the related  (2000)). If Q m could be nullified, then Co m = A m (see Eq. (10)) and the attenuation of cospectra could be described accurately with √ H.

5
When the correction factor was calculated with Method 4, which takes into account the low-pass filtering induced phase shift, the attenuation factors (1/CF ) agree with the normalised cross-covariance maxima (see Fig. 3). This indicates that the attenuation of cross-covariance maxima was accurately estimated with this method. However, when H p was neglected and the attenuation factors were calculated with H only, then they agreed with cross-covariance values at zero lag as per predicted by theory (Sect. 2). Note that the time lag discussed here only represents the low-pass filter effect, not other effects that also 10 alter the time lag. This is only possible because we work with degraded temperature time series, where phase shifts through low-pass filtering are the only cause for time delays.
The value for τ used in attenuating the T time series was further varied between 0.05 s and 1 s and used for the same 2-hour time series. The bias in CF calculated with Method 1 increased with τ (Fig. 5a). The other methods did not produce  In order to evaluate the four methods to estimate CF further, turbulent T data were low-pass filtered with three values of τ (0.1 s, 0.3 s and 0.7 s) over several summer months (May-August) at two contrasting EC sites, Hyytiälä and Siikaneva. Then the related flux attenuation was corrected with the four methods and the results were compared against a reference flux calculated from unattenuated T data. Table 2 summarises the relative differences between the four correction methods and the reference. 15 The performance of all four methods decreases with increasing τ at both sites, and Method 1 showed the worst performance, which is in line with the example shown in Fig. 5 and follows the predictions from theory (Sect. 2). Of the analysed cases, the biggest bias (+8.6 %) was found when applying Method 1 at Siikaneva with τ = 0.7 s. In general, the performance of the methods was worse at Siikaneva than at Hyytiälä. This was likely related to the lower measurement height at Siikaneva (z − d=2.7 m) than at Hyytiälä (z − d=13 m) and thus the comparably larger contribution of high frequencies to the covariance. 20 At Siikaneva, smaller eddies dominated the turbulent transport and hence the effect of inaccuracies in describing the high frequency attenuation of the signal was amplified compared with Hyytiälä.  The importance of turbulence scale on the performance of the four methods was evaluated by stratifying the data according to stability and plotting them against τ /ITS (Fig. 6) where ITS is the integral time scale of w T , calculated from the autocovariance of w T time series by integrating the normalised autocovariance function until its first zero crossing (e.g. Kaimal and Finnigan, 1994). This ratio describes the ratio of attenuation and turbulent transport scales. It is also worth noting that this ratio can alternatively be approximated by the ratio of the cut-off frequency (f co = 1/(2πτ )) to the cospectral peak frequency where n m is the normalised cospectral peak frequency) . High values for τ /ITS describe periods when the attenuation time scale is large relative to the time scale of turbulent scalar transport, whereas low values correspond to cases when the attenuation time scale is small relative to this turbulence scale. When CF was estimated with Methods 2 or 3, the relative bias in CF was typically within ±3 % and increased linearly with τ /ITS at Siikaneva. For Method 4 the bias was within ±2 % at both sites and independent of the τ /ITS ratio. The remaining small bias obtained with Method 4 can be speculated to be related to the quadrature spectra, which was assumed to be zero, albeit strictly speaking it is not (Aslan et al., 2020). For Method 1 the relative bias in CF scaled with τ /ITS and after normalisation with ITS the data from both field sites collapsed into one common relationship (Fig. 6a). Horst (1997) derived a simple formula to estimate CF for different situations as a function of (τ /ITS) α , where α = 7/8 in neutral and unstable cases and α = 1 in stable cases. Similar 5 dependencies could be derived for the bias in CF derived with Method 1.
Since the relative bias in CF when estimated with Method 1 scales with τ /ITS, this dependence can be used to assess how much scalar fluxes are biased with different EC setups when the Method 1 is utilised in the EC data processing. For the following example calculations we approximate a linear dependence between ITS and (z−d)/U and used the fit to estimate ITS for different z − d and U combinations. For a short tower (z − d=1.5 m) with moderate wind speed (U = 2 m/s) and attenuation 10 (τ = 0.2 s), fluxes are biased by 4% based on the dependency shown in Fig. 6a. For the same tower, higher attenuation (τ = 0.8 s) results in larger bias (9 %) if the Method 1 is utilised. For a tall tower the biases are not as significant since larger eddies dominate the transport and hence τ /ITS is smaller for a given τ than in case of a shorter tower. For a tall tower (z − d=20 m), with moderate wind speed (U = 3 m/s) and attenuation (τ = 0.2 s) the bias is 1-2% and with higher attenuation (τ = 0.8 s) the bias is 3-4%. These example calculations demonstrate the magnitude of the flux bias resulting from biased spectral corrections 15 at contrasting EC sites.

CO 2 and H 2 O fluxes corrected with the four methods
The applicability of the results acquired with attenuated T was analysed by processing CO 2 and H 2 O fluxes from summer months at the two sites (Sect. 3.1). The gas fluxes were corrected with the four spectral correction methods in order to assess the systematic biases stemming from biased spectral corrections. For CO 2 the fitting of H to H e,ps , of H to H e,cs and of https://doi.org/10.5194/amt-2020-479 Preprint. Discussion started: 11 January 2021 c Author(s) 2021. CC BY 4.0 License.
HH p to H e,cs estimated response times of 0.05 s, 0.10 s and 0.13 s at Hyytiälä and of 0.13 s, 0.12 s and 0.18 s at Siikaneva, respectively. The low-pass induced time lag (t lpf ) estimated as a fitting parameter when fitting HH p to H e,cs yielded close to 0.1 s at both sites for CO 2 . For reference, the lag times estimated via cross-covariance maximisation which are combinations of signal travel times in the sampling line (t phys ) and t lpf yielded on average 1.4 s and 0.2 s at Siikaneva and Hyytiälä, respectively.

5
Based on theoretical considerations (Sect. 2) and results obtained with attenuated T time series, H fit to H e,cs (Method 2) was projected to estimate smaller response time than the other two methods that were projected to agree (see e.g. Fig.   5b). Instead, here for CO 2 the HH p fit to H e,cs gave longer response times than the other two methods (Fig. 7). For signals with small attenuation both τ and t lpf are likely difficult to estimate accurately by fitting HH p to H e,cs . The low-pass filtering induced lag (t lpf ) can attain values only with the temporal resolution of the underlying data itself (here 0.1 s) and hence for time 10 series exhibiting small attenuation t lpf may well be zero. This would cause H e,ps and H e,cs to be similar and hence they would result in similar estimates for the response time, as observed here for CO 2 . This granular estimation of t lpf might explain why the response times for CO 2 did not follow the expectations. It should be also noted that the methods to estimate the response time have a limited accuracy of estimation stemming from the algorithms used in the estimation, instrument limitations and meteorological conditions under which the observations are made (Aslan et al., 2020). Furthermore, the empirical transfer 15 function derived from cospectra (H e,cs ) contains the attenuation related also to sensor separation (Horst and Lenschow, 2009), whereas the empirical transfer function estimated from power spectra (H e,ps ) is related only to gas analyser induced low-pass filtering.
For H 2 O, τ depends on RH (Mammarella et al., 2009;Ibrom et al., 2007a;Runkle et al., 2012) and hence the analysis was done in RH bins. Figure 8 shows an example of empirically derived transfer functions for H 2 O at Siikaneva in moderate 20 relative humidity conditions. H e,cs showed less high frequency attenuation than H e,ps due to cross-covariance maximisation as predicted by the theory (Sect. 2). HH p fit to H e,cs resulted in similar value for τ as the one obtained by fitting H to H e,ps . The other fitting parameter in HH p fit (t lpf ) was 0.14 s indicating the low-pass filtering of H 2 O time series caused an additional lag to the H 2 O time series. Note that H does not perfectly describe the shape of H e,ps . This is due to adsorption and desorption of H 2 O to sampling tube walls, a process which cannot be described accurately with Eq. (3) (Nordbo et al., 2013 Figure 7. Empirical transfer functions estimated for CO2 from ensemble averaged cospectra (He,cs, Eq. (12)) and power spectra (He,ps, Eq. (13)) and three fits to the empirical transfer functions. Data from Siikaneva were used.
mere travel times through the sampling lines (i.e. t phys ), which do not depend on the low-pass filtering effects, were the same for H 2 O and CO 2 . These results are in line with Sect. 4.1 where it was shown that the low-pass filtering induced time lag was primarily determined by a linear dependence on τ with a secondary dependence on turbulence time scale. However, the slopes obtained above were different from the ones derived in Sect. 4.1.
The CF values estimated with the four methods agreed at Hyytiälä for low RH periods, but they diverged at high RH periods.

5
For instance when RH>80 % the four methods gave on average 1.39, 1.29, 1.23 and 1.37 at the Hyytiälä site, respectively. These results are in line with the ones obtained with attenuated T time series (Sect. 4.2): when τ was large, method 1) overestimated and method 3) underestimated CF similarly as here for H 2 O at high RH (and hence large τ ). In contrast, for Siikaneva Method 1 gave systematically higher value for the correction factor regardless of RH, whereas the other three methods more similar CF RH dependency. This difference to Hyytiälä was likely due to lower τ values also at high RH (Fig. 9). Note also that the EC 10 measurement setup (measurement height, gas sampling system) was not identical at the two sites.
On average, the differences between the four different methods to calculate CF were small, typically within ±3% at both sites for both gases (CO 2 and H 2 O) ( Table 3). The biggest mean relative difference (4.1%) was found for H 2 O measurements at Siikaneva site for Method 1. This was likely due to the combination of low measurement height and high attenuation which resulted in biased CF values, in accordance with the findings obtained with the attenuated T time series (Fig. 6a). Interestingly, 15 for CO 2 the biggest difference at both sites was obtained with Method 3, yielding smaller fluxes than the reference (Method 4).
The difference was bigger than the one obtained with Method 1 which contradicts the findings presented above with attenuated   Relative humidity (%)

Correct form for cospectral transfer function
There has been a long-standing debate about what is the correct form for cospectral transfer function when the scalar measurements are done with first-order linear sensor and vertical wind speed is not attenuated. The seminal paper on EC frequencyresponse corrections by Moore (1986) described the flux attenuation related to the scalar sensor with √ H (see Eq. (5)), which was later deemed erroneous, e.g. by Eugster and Senn (1995); Horst (1997Horst ( , 2000 and others. Partly based on similar deriva-5 tions as shown here in Sect. 2, the correct form for the cospectral transfer function was argued by Horst (1997Horst ( , 2000 and Massman (2000) Fratini et al., 2012;Foken et al., 2012b;Mammarella et al., 2016;Hunt et al., 2016;Wintjen et al., 2020) without clear consensus on which one is correct. Part of this confusion is likely related to the fact that some of the past studies have been using incorrect terminology by using the term cospectral transfer function (Eq. (5)), even though they have derived/utilised transfer function 10 for the amplitude spectrum (Eq. (10)).
Briefly summarising the findings in this study, it was shown in Sect. 2 in accordance with e.g. Horst (2000) that in the case the travel time in the gas sampling system could be accurately estimated and accounted for, the attenuation of cospectrum (and hence flux) could be described with H. However, cross-covariance maximisation inadvertently accounts also for the scalar low-pass filtering related time shift (t lpf ) and consequently induces a phase shift between the lag corrected attenuated scalar 15 and vertical wind time series. Hence in the case that cross-covariance maximisation is used to align the two time series, the correct form for cospectral transfer function is HH p , where the part related to the phase shift (H p ) is calculated with t lpf . It was shown above that HH p can be approximated with √ H. Therefore the debate about which is the correct form for cospectral transfer function (H or √ H) relates to the low-pass filtering induced phase shift as discussed already by Eugster and Senn (1995) and Horst (2000), albeit with a different conclusion. 20

Summary and conclusions
The influence of low-pass filtering induced phase shift on estimation of high frequency response of an EC setup was analysed.
The analysis assumed that the EC setup consisted of a fast-response anemometer and a linear, first-order-response scalar sensor.
Spectral corrections aiming at correcting the EC fluxes for high frequency attenuation were estimated with four methods: three widely used methods and one newly proposed method which specifically accounts for the interaction between the low-pass 25 filtering induced phase shift and high frequency attenuation. Based on theoretical considerations and experimental results we come to the following conclusions: -Cross-covariance maximisation overestimates the signal travel time in the EC sampling line since it inadvertently accounts also for the lag caused by low-pass filtering of scalar time series caused by non-ideal measurement system. The bias in the estimated time lag depends linearly on low-pass filter response time (τ ) with a small additional dependence 30 on turbulence time scale.
case that the travel time of the scalar signal in the sampling line can be accurately estimated. However, if cross-covariance maximisation is used, then attenuation of cospectra follows HH p where H p accounts for the bias in the estimated travel time caused by cross-covariance maximisation and it was shown that HH p can be approximated with √ H. Both H and √ H have been previously used in the literature to describe the attenuation of cospectra (Moore, 1986;Eugster and Senn, 5 1995;Horst, 1997;Moncrieff et al., 1997;Horst, 2000;Massman, 2000;Massman and Lee, 2002;Ibrom et al., 2007a;Mammarella et al., 2009;Fratini et al., 2012;Wintjen et al., 2020), yet clear consensus on which one is the correct form has not been established. Here we show that √ H approximates the correct form (i.e. HH p ), whereas H is incorrect if cross-covariance maximisation is used.
-In order to estimate and correct for the flux attenuation correctly, it is vital to accurately describe the attenuation of the 10 cospectra in the correction procedure. Hence, while fitting H to cospectra (Method 2) biased the first-order response time due to the use of the incorrect cospectral transfer function, it resulted only in a small bias for the flux correction factor, since the method describes the attenuation of cospectra accurately once the cross-covariance maximisation has been applied. By contrast, fitting of H to power-spectra (Method 1) correctly estimates the response time, but it nevertheless yields biased flux corrections since it utilised a transfer function that is incorrect when estimating the flux using cross- 15 covariance maximisation. The bias in EC fluxes can be 10% or above if method 1) is used for short tower measurements with moderate attenuation.
-All flux calculation algorithms which rely on cross-covariance maximisation and at the same time use H to describe the attenuation of the cospectra can be projected to be biased in the same way as Method 1 used here if the response time (i.e. τ ) is accurately estimated (e.g. from power spectra). Hence, for instance the analytical formulas of Horst (1997) and 20 Massman (2000) will result in biased fluxes when an accurate estimate of scalar sensor response time is used in these algorithms.
-The theoretical framework proposed in this paper was able to describe the changes in H 2 O time lag as H 2 O response time increased with relative humidity. This suggests that the findings derived here with attenuated temperature time series are applicable also in real world situations for EC gas flux measurements. Similarly, Wintjen et al. (2020) showed that the 25 transfer function related to the phase shift (H p ) needed to be taken into account when processing reactive nitrogen fluxes.
However, results for CO 2 deviated from the expectations made based on the theory. This might be due to CO 2 response time being small and thus close to the data temporal resolution (0.1 s) which resulted in difficulties in observing the low-pass filtering induced time lag. Alternatively, low-pass filtering of inert gases (such as CO 2 ) in the gas sampling line may deviate from what was described here in such a way that the low-pass filter acting on CO 2 may not induce a phase 30 shift. This might be the case if the system's high frequency attenuation is dominated e.g. by volume averaging in the gas sampling cell (Massman, 2004). This should be investigated by using CO 2 flux data from an EC setup with pronounced attenuation of CO 2 fluctuations in the sampling line. Also, the recent laboratory studies on the subject (Metzger et al., in their analyses.
In summary, it is suggested that the spectral correction methods implemented in EC data processing software are revised so that the influence of low-pass filtering induced phase shift is recognised following the findings presented above.
Code and data availability. Data and matlab codes to reproduce Figures 3, 4 and 5 will be uploaded to open data repository Zenodo upon 5 acceptance of this manuscript along with flux time series processed with the four methods (Table 1) at the two sites.