FREQCOR_write_outputs

Output writer utilities for saving FREQCOR results to disk.

Functions

FREQCOR_write_outputs

Write FREQCOR outputs to disk.

FREQCOR_write_outputs.FREQCOR_write_outputs(gss, LUT_cof, LUTCF_u, LUTCF_s, outputpath, meteo_df, FccorL, FccorG, freqn, WS, WD, Zeta, sps, CF_L, CF_G, CFHL, config, run_tag=None)[source]

Write FREQCOR outputs to disk.

This function writes: - 6_flux_out__{run_tag}.csv - 4_LUT_cof__{run_tag}.csv - 5_LUT_CF__{run_tag}.csv - 0_run_input__{run_tag}.ini

Parameters:
  • gss (int) – Gas species selector (e.g., 1 for CO2, 2 for H2O).

  • LUT_cof (dict) – Cut-off frequency lookup tables (structure depends on gas species).

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

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

  • outputpath (str) – Output directory.

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

  • FccorL (pandas.Series) – Corrected flux (Lorentz model).

  • FccorG (pandas.Series) – Corrected flux (Gauss model).

  • freqn (pandas.DataFrame) – Frequency index or timestamps (used to create output index).

  • WS (pandas.Series) – Wind speed time series.

  • WD (pandas.Series) – Wind direction time series.

  • Zeta (pandas.Series) – Stability parameter time series.

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

  • CF_L (numpy.ndarray or pandas.Series) – Correction factor (Lorentz model).

  • CF_G (numpy.ndarray or pandas.Series) – Correction factor (Gauss model).

  • CFHL (numpy.ndarray or pandas.Series) – Correction factor for sensor separation according to Horst and Lenschow 2009.

  • config (configparser.ConfigParser) – Run configuration to write back to disk.

  • run_tag (str) – Run identifier used to generate output filenames.

Returns:

Outputs are written to disk.

Return type:

None

Raises:

ValueError – If run_tag is missing.