Python wrapper for EddyPro to calculate eddy covariance (EC) ecosystem fluxes from raw data files.
fluxrun can be executed using the GUI or directly from the command line interface.
fluxrun was created as a wrapper around EddyPro. This means that the flux calculations are done by EddyPro, but
fluxrun adds some functionality, e.g.:
fluxrunautomatically creates an output folder structure, including run ID.- The log output from EddyPro (together with other output from
fluxrun) is stored to a log file. - There is an additional log file storing warnings and errors.
fluxruncan be executed in parallel, e.g. when calculating fluxes for multiple yearsfluxrunmakes it a bit easier to run them all at once. Parallelization is not included by default (at the moment), but using the command-line interface multiple instances offluxruncan be started quickly. Each started instance gets its own output folder and folder structure, including a unique run ID.- Input files are validated to make sure columns contain numeric data only. Non-numeric data are converted to
-9999. fluxruncan create several plots during processing: raw data availability, raw data aggregates and summary plots of all variables in EddyPro's_full_output_file.- In case compressed files are used (
.gz), the files are automatically uncompressed (text format) before processing. After processing,in case the uncompressed files are no longer needed, they can be automatically deleted. If the files have the file extension.gz, they are uncompressed before further processing.
Select raw data source folder (ASCII): Select source folder with eddy covariance (EC) raw data filesFile name ID: Define file name ID. The file name needs to contain datetime info, it needs info about the year, month, day, hours and minutes. Time info refers to the starting time of the file. Files are handled differently depending on the file extension. Files with the ending.gzwill be umcompressed before processing. Files need to be text-based, e.g. CSV files, but they can be compressed as.gz. Example: SITE_yyyymmddHHMM.csv.gzHeader format: Numer of header rows in the raw data files.Start: Define start date for processing, files before this date will be ignored.End: Define end date for processing, files after this date will be ignored.Plots:Availability (raw data): Plot data availablility based on the datetime info in the filenames.Aggregates (raw data): Plot aggregates (means) of the raw data.
Run flux calculation using EddyPro: Select for flux calculations.Select EddyPro processing file (*.eddypro): Select.eddyprosettings file that contains the flux processing settings for EddyPro.fluxrunwill search for a.metadatafile of the same name in the same folder as the.eddyprofile. For example, if the settings file is namedmy_settings.eddypro, thenfluxrunneeds a metadata file with the namemy_settings.metadatain the same folder.
Select output folder: Select where to store the results.fluxrunautomatically creates an output folder structure, including run ID for the main folder.Output folder name prefix: Prefix for the output folder, will be combined with the automatically generated run ID.Plots:Summary (flux processing): Simple overview plots generated for each variables in the_full_output_file from the EddyPro output.
Delete uncompressed raw data ASCII after processing: After processing,fluxruncan delete the uncompressed ASCII files. The uncompressed files are needed for flux calculations, but unless there is a desire to store the uncompressed files they are no longer needed. Only recommended if the input files were compressed (.gz).
Installation is currently far from perfect, but here we go:
Using miniconda:
- Create conda environment with required Python version:
conda create -n fluxrun-env python=3.11 - Activate the created environment:
conda activate fluxrun-env - Now check the fluxrun releases here and decide which version to use
- Spot the
.tar.gzfile of the desired fluxrun version and use it to directly install from the GitHub repo via pip:pip install https://github.com/holukas/fluxrun/archive/refs/tags/v2.1.0.tar.gz - Now all required dependencies are installed in the environment
fluxrun-env - With the
fluxrun-envactivated, to start the GUI (graphical user interface):python -m fluxrun.main -g - With the
fluxrun-envactivated, to start processing with CLI (command-line interface):python -m fluxrun.main -f C:\my_project -d 10. When using the CLI, you basically pointfluxrunto a folder and everything it needs to run it searches in that folder. Therefore, the folderC:\my_projectneeds to contain the.eddyproand.metadatafiles used by EddyPro, and in addition the filefluxrunsettings.yaml. The parameter-d 10means that only fluxes for the last 10 days are calculted. This parameter is useful when runningfluxrunon an automatic schedule. - Note: the
-mparameter means that the script is executed as a module, i.e., thefluxrunversion installed in the conda environment is called.
