FREQCOR_Compute.FREQCOR_Compute

FREQCOR_Compute.FREQCOR_Compute(Icon_sel, Rcon_sel, Icosp_sel, nspec, nfreq, gss, sps, classnum_first, classnum, classnumCF_u, classnumCF_s, WS, WD, Zeta, meteo_df, Hlim, Fclim, LElim, Hlcfu, Hlcfs, Hlim_max, Fclim_max, LElim_max, Hlcf_abs_max, FlagVM_T, FlagVM_g, FlagVM_w, FlagF_H, FlagF_g, FVM, FF, jtmin_hz, jtmax_hz, varclim, freq, freqn, freqcount, tfmin_hz, tfmax_hz, plot, outputpath, massman_coef, tf_sonic, tf_peltola, cospec_abs_limit, run_tag=None)[source]

Compute cut-off frequency and correction factor lookup tables.

The routine orchestrates the full computation pipeline: - selection of very good (co)spectra for transfer function (TF) estimation, - computation of TF cut-off frequencies and their look-up table, - selection of fair quality (co)spectra for correction factor (CF) estimation, - computation of CF look-up tables for unstable and stable conditions.

Parameters:
  • Icon_sel (pandas.DataFrame) – Ideal content (sel) (co)spectral data (either cospectra or spectra; depends on sps).

  • Rcon_sel (pandas.DataFrame) – Real content (sel) (co)spectral data (either cospectra or spectra; depends on sps).

  • Icosp_sel (pandas.DataFrame) – Ideal cospectra for CF (sel).

  • nspec (int) – Number of total initial valid (co)spectra files.

  • nfreq (int) – Number of frequency bins.

  • gss (int) – Gas species selector.

  • sps (int) – Approach selector (cospectral or spectral).

  • classnum_first (int) – Number of classes for the first sorting variable (e.g., wind direction or relative humidity).

  • classnum (int) – Number of wind speed classes for cut-off frequency computation.

  • classnumCF_u (int) – Number of wind speed classes for correction factors (unstable conditions).

  • classnumCF_s (int) – Number of wind speed classes for correction factors (stable conditions).

  • WS (pandas.Series) – Wind speed, wind direction, and stability parameter time series.

  • WD (pandas.Series) – Wind speed, wind direction, and stability parameter time series.

  • Zeta (pandas.Series) – Wind speed, wind direction, and stability parameter time series.

  • meteo_df (pandas.DataFrame) – Half-hourly meteorological and flux data.

  • Hlim (float) – Flux thresholds used during (co)spectra selection for cut-off frequency computation.

  • Fclim (float) – Flux thresholds used during (co)spectra selection for cut-off frequency computation.

  • LElim (float) – Flux thresholds used during (co)spectra selection for cut-off frequency computation.

  • Hlcfu (float) – Sensible heat flux thresholds used during (co)spectra selection for CF computation (unstable and stable conditions).

  • Hlcfs (float) – Sensible heat flux thresholds used during (co)spectra selection for CF computation (unstable and stable conditions).

  • FlagVM_T (array-like) – Vickers & Mahrt (1997) flags for sonic temperature, gas concentration, and vertical wind speed.

  • FlagVM_g (array-like) – Vickers & Mahrt (1997) flags for sonic temperature, gas concentration, and vertical wind speed.

  • FlagVM_w (array-like) – Vickers & Mahrt (1997) flags for sonic temperature, gas concentration, and vertical wind speed.

  • FlagF_H (array-like) – Mauder & Foken (2004) quality flags for sensible heat flux and gas flux.

  • FlagF_g (array-like) – Mauder & Foken (2004) quality flags for sensible heat flux and gas flux.

  • FVM (int) – Threshold applied to Vickers & Mahrt (1997) flags.

  • FF (int) – Threshold applied to Mauder & Foken flags.

  • jtmin_hz (float) – Frequency range (Hz) for transfer function normalization.

  • jtmax_hz (float) – Frequency range (Hz) for transfer function normalization.

  • varclim (float) – Threshold for coefficient of variation of the normalization parameter.

  • freq (pandas.Series) – Natural frequencies (Hz).

  • freqn (pandas.DataFrame) – Normalized frequencies per time step.

  • freqcount (pandas.DataFrame) – Frequency-bin population counts per time step.

  • tfmin_hz (float) – Frequency range (Hz) for transfer function fitting.

  • tfmax_hz (float) – Frequency range (Hz) for transfer function fitting.

  • plot (list[int]) – Plotting options selector.

  • outputpath (str) – Output directory.

  • massman_coef (object) – Massman coefficients or configuration required by downstream routines.

  • tf_sonic (object) – Transfer function configuration for the sonic and Peltola response.

  • tf_peltola (object) – Transfer function configuration for the sonic and Peltola response.

  • run_tag (str, optional) – Run identifier propagated to writers/plots.

Returns:

  • LUT_cof (dict) – Cut-off frequency look-up table.

  • classize (int) – Number of (co)spectra used per class during cut-off frequency computation.

  • LUTCF_u (dict) – Correction factor look-up table (unstable conditions).

  • matsortCF_u (pandas.DataFrame) – Sorting matrix used to build the unstable CF look-up table.

  • classizeCF_u (int) – Number of cospectra used per class for the unstable CF look-up table.

  • LUTCF_s (dict) – Correction factor look-up table (stable conditions).

  • matsortCF_s (pandas.DataFrame) – Sorting matrix used to build the stable CF look-up table.

  • classizeCF_s (int) – Number of cospectra used per class for the stable CF look-up table.