read_GHG.read_GHG

read_GHG.read_GHG(raw_file, raw_format='ghg', unzip_path=None)[source]

Read and extract high-frequency data from LI-COR SMARTFLUX GHG files.

This function handles the reading of high-frequency eddy covariance data from LI-COR SMARTFLUX GHG files. It extracts both data and metadata from zipped GHG files and returns them as pandas DataFrames.

Parameters:
  • raw_file (str) – Path to the GHG file to process

  • raw_format (str, optional) – Format of the raw data file, currently only ‘ghg’ is supported

  • unzip_path (str, optional) – Directory where the GHG file should be temporarily extracted. If None, uses the same directory as the GHG file

Returns:

A list containing:

  • file_header : pandas.DataFrame Header information from the data file (first 6 lines)

  • file_data : pandas.DataFrame High frequency data with variable names as columns

  • data_name : str Path to the extracted data file

  • metadata_name : str Path to the extracted metadata file

Return type:

list

Notes

The function automatically cleans up extracted files after reading them.