correction_factor_lpf

Module for computing low-pass filtering correction factors in eddy covariance.

This module provides functions to calculate correction factors for high-frequency losses in eddy covariance measurements. It implements two methods:

  1. Theoretical approach using Massman (2004) cospectra and a transfer function based on a half-power cutoff frequency.

  2. Empirical approach using pre-calculated correction factors as a function of wind speed and atmospheric stability.

References

Author

B. Heinesch University of Liege, Gembloux Agro-Bio Tech

Created

2025-02-20

Functions

correction_factor_lpf

Calculate correction factors for high-frequency flux losses.

theor_cospectra_massman

Calculate reference cospectra using the Massman model.

correction_factor_lpf.theor_cospectra_massman(zoL, nf, kf, a0_st, kf0_st, mu_st, a0_un, kf0_un, mu_un)[source]

Calculate reference cospectra using the Massman model.

This function implements the Massman (2004) model for scalar flux cospectra. The model uses different parameters for stable and unstable conditions to account for the effects of atmospheric stability on turbulent transport.

Parameters:
  • zoL (float) – Stability parameter (z-d)/L, where z is measurement height, d is displacement height, and L is Obukhov length [-]

  • nf (ndarray) – Natural frequency array [Hz]

  • kf (ndarray) – Normalized frequency array, f*(z-d)/U, where U is wind speed [-]

  • a0_st (float) – Amplitude parameter for stable conditions [-]

  • kf0_st (float) – Peak frequency parameter for stable conditions [-]

  • mu_st (float) – Shape parameter for stable conditions [-]

  • a0_un (float) – Amplitude parameter for unstable conditions [-]

  • kf0_un (float) – Peak frequency parameter for unstable conditions [-]

  • mu_un (float) – Shape parameter for unstable conditions [-]

Returns:

Normalized cospectrum values for each input frequency

Return type:

ndarray

Notes

The model follows Eq. 4.2 from Massman (2004) with the form: Co(f) = a0 * (kf/kf0) / (1 + (kf/kf0)^(2μ))^(7/6μ) / f

Different parameters are used for stable (zoL > 0) and unstable (zoL ≤ 0) conditions to better match observed cospectra.

correction_factor_lpf.correction_factor_lpf(u, zoL, ini, df_lpfc=False, ctrplot=0)[source]

Calculate correction factors for high-frequency flux losses.

This function implements two methods to correct for high-frequency losses in eddy covariance measurements:

  1. Theoretical approach (ini[‘param’][‘LPFC’]=1): Uses Massman model cospectra and a transfer function based on half-power cutoff frequency.

  2. Empirical approach (ini[‘param’][‘LPFC’]=2): Uses pre-calculated correction factors based on wind speed and atmospheric stability class.

Parameters:
  • u (array_like) – Wind speed [m s⁻¹]

  • zoL (array_like) – Stability parameter (z-d)/L [-]

  • ini (dict) –

    Configuration dictionary containing: - param.LPFC : int

    Method selection (1 or 2)

    • param.SAMPLING_RATE_TRACERfloat

      Sampling frequency [Hz]

    • param.SENSOR_HEIGHTfloat

      Measurement height [m]

  • df_lpfc (pandas.DataFrame, optional) –

    Lookup table for correction factors containing columns: - stability_class : str

    ’stable’, ‘unstable’, or ‘all’

    • namestr

      Parameter name (‘cof’, ‘A0’, ‘kf0’, ‘mu’)

    • valuefloat

      Parameter value

    • ws_maxfloat

      Maximum wind speed for empirical method

    • CF_Lfloat

      Correction factor for empirical method

  • ctrplot (bool, optional) – If True, generate diagnostic plots for method 1

Returns:

Correction factor(s) for low-pass filtering losses

Return type:

float or array_like

Notes

For method 1, the correction factor is calculated as: CF = ∫(Co(f)df) / ∫(TF(f)·Co(f)df) where Co(f) is the Massman model cospectrum and TF(f) is a Lorentzian transfer function.

For method 2, the correction factor is interpolated from a lookup table based on wind speed and stability class.

See also

theor_cospectra_massman

Massman model implementation

Author, ------, Written, 20, 2025., University, Gembloux