FREQCOR_LUT_cof
Look-up table construction for cut-off frequencies (cof).
Functions
Build the cut-off frequency (cof) look-up table. |
Exceptions
|
Exception raised for errors in FREQCOR_LUT_cof. |
- exception FREQCOR_LUT_cof.FREQCORLUTCofError(message)[source]
Exception raised for errors in FREQCOR_LUT_cof.
- FREQCOR_LUT_cof.FREQCOR_LUT_cof(sps, gss, classnum_first, classnum_ws, Icon_cof, Rcon_cof, WS, WD, Zeta, meteo_df, nfreq, jtmin_hz, jtmax_hz, varclim, freq, freqn, tfmin_hz, tfmax_hz, plot, outputpath, tf_peltola, run_tag)[source]
Build the cut-off frequency (cof) look-up table.
The routine groups (co)spectra by a first sorting variable (wind direction for CO2 or relative humidity for H2O) and then by wind speed classes. For each class it estimates transfer functions and derives cut-off frequencies stored in a LUT.
- Parameters:
sps (
int) – Approach selector (cospectral or spectral).gss (
int) – Gas species selector.classnum_first (
int) – Number of classes for the first sorting variable.classnum_ws (
int) – Number of wind speed classes.Icon_cof (
pandas.DataFrame) – Ideal content (cof) and real content (cof) (co)spectral data (either cospectra or spectra; depends on sps).Rcon_cof (
pandas.DataFrame) – Ideal content (cof) and real content (cof) (co)spectral data (either cospectra or spectra; depends on sps).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 (used for RH when gss == 2).nfreq (
int) – Number of frequency bins.jtmin_hz (
float) – Frequency range (Hz) used for transfer function normalization.jtmax_hz (
float) – Frequency range (Hz) used 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.tfmin_hz (
float) – Frequency range (Hz) used for transfer function fitting.tfmax_hz (
float) – Frequency range (Hz) used for transfer function fitting.plot (
list[int]) – Plotting options selector.outputpath (
str) – Output directory.tf_peltola (
int) – If 1, use the Peltola et al. (2021) fit form for the transfer function.run_tag (
str) – Run identifier used to generate output filenames.
- Returns:
- Raises:
ValueError – If run_tag is missing.
FREQCORLUTCofError – If there is not enough data to compute the transfer function for a class.