clean_results.clean_results

clean_results.clean_results(results)[source]

Clean eddy covariance results by removing entries with invalid sonic data.

This function removes data entries where sonic anemometer measurements were invalid or missing (indicated by NaN values in wind speed). The removal is synchronized across all variables to maintain data consistency.

Parameters:

results (dict) –

GEddySoft results dictionary containing: - time : list

Timestamps for each measurement period

  • METdict

    Meteorological measurements including: - wsh : list

    Wind speed measurements (used to identify invalid periods)

    • qaqcdict

      Quality control flags

  • TRACERdict, optional

    Tracer gas measurements and associated QC

Returns:

Cleaned results dictionary with invalid entries removed

Return type:

dict

Notes

The cleaning process: 1. Identifies invalid periods using NaN values in wind speed 2. Removes corresponding entries from all variables 3. Preserves structure and metadata 4. Handles QC flags separately to maintain integrity

The function assumes that NaN values in wind speed (wsh) indicate periods where sonic data was invalid or missing, typically due to: - Incomplete data files - Instrument malfunctions - Communication errors