GEddySoft_main
GEddySoft: A Python Package for Eddy Covariance Processing
This module contains the main processing function for the GEddySoft eddy covariance software package. It handles the complete workflow of processing raw high-frequency data from sonic anemometers and trace gas analyzers (e.g., PTR-TOF-MS) to calculate fluxes and quality control metrics.
Key Features
Flexible input handling for sonic and trace gas data
Comprehensive quality control including:
Spike detection (Vickers & Mahrt 1997)
Stationarity tests (Foken & Wichura 1996)
Integral turbulence characteristics (Thomas & Foken 2002)
Instrument diagnostics
Advanced processing options:
Multiple coordinate rotation methods
Time lag optimization
Spectral corrections
Flux uncertainty estimation
Parallel processing support for large datasets
HDF5-based data storage with rich metadata
License
GEddySoft is available under the terms of the MIT License.
Functions
Process eddy covariance data for a single day (when used in multithread mode) or for the time period given in the ini file. |
- GEddySoft_main.GEddySoft_main(str_day, ini, log_filename)[source]
Process eddy covariance data for a single day (when used in multithread mode) or for the time period given in the ini file.
This function handles the complete processing chain for eddy covariance data, from raw high-frequency measurements to quality-controlled fluxes. It supports both single-threaded and parallel processing modes.
- Parameters:
str_day (
str
) – Date string in format ‘YYYYMMDD’ for the day to process. Use ‘no_multithread’ for single-threaded mode.ini (
dict
) –Configuration dictionary containing all processing parameters:
files: Input/output paths and file patterns
param: Processing parameters (QC thresholds, methods, etc.)
run_param: Runtime parameters
sonic: Sonic anemometer configuration
irga: Gas analyzer configuration
log_filename (
str
) – Path to the log file where processing messages will be written
- Returns:
unique_days – List of successfully processed days
- Return type:
Notes
The processing workflow includes:
Data loading and synchronization
Sonic anemometer data
Trace gas measurements
Auxiliary meteorological data
Quality control
Spike detection and removal
Diagnostic value checking
Missing data handling
Coordinate rotations
Double rotation or
Planar fit method
Time lag optimization
Covariance maximization
RH-dependent correction
Flux calculations
Detrending options
Webb-Pearman-Leuning terms
Quality assessment
Stationarity tests
Integral turbulence characteristics
Spectral analysis
Uncertainty estimation
Random error (Finkelstein & Sims)
Detection limits
The function creates two types of output files:
Results file (HDF5)
Fluxes and means
Quality flags
Processing parameters
Covariance file (HDF5, optional)
Raw covariance functions
Time lag information
Examples
>>> # Process a single day >>> ini = read_main_inputs('config.txt') >>> log_file = 'processing.log' >>> processed = GEddySoft_main('20240101', ini, log_file)