Editing control files - OzFlux/PyFluxPro GitHub Wiki
Editing PyFluxPro control files
Introduction
Flux towers come in all sorts of flavours. Some are simple installations of a sonic and an IRGA, some are complex with instrumentation at many levels. Most flux towers will change their configuration over time.
PyFluxPro handles site to site and year to year variability in flux tower configuration through control files. Control files allow the user to tailor the ingestion, quality control, processing and gap filling options to suit the configuration of their flux tower and their preferences for processing methods. They are used by PyFluxPro at all levels of processing and the PyFluxPro GUI is designed to make the task of editing these files as easy as possible.
But the user must be patient. Providing the flexibility to accommodate a wide range of flux tower configurations and processing options results in an unavoidable level of complexity and this can make the task of setting up the control files somewhat time consuming. However, once set up, control files can be quickly reused for other years and other sites with minor modifications.
To make the task of setting up the initial control files easier, PyFluxPro comes with templates for all levels that cover many of the most common flux tower data configurations (EddyPro, EasyFlux-DL, OzFlux). These provide a starting point when setting up control files and are available in the PyFluxPro/controlfiles/templates folder.
The following sections give general guidance on editing control files in the PyFluxPro GUI. Details on editing control files at a particular level are given in the relevant sections. The examples shown below are for the L3 control file from Loxton in the PFP_examples directory.
Opening and saving
Control files can be opened and saved using the options in the top section of the File menu, see the screenshot below.
The Files section
All control files have a Files section where the user can specify the path to the input and output files, the file names and the path for the plots files. Entries in the Value column can be edited in 2 ways.
Context menu
A right mouse click on any file-related entry in the Value column will display a Browse sub-menu.
Clicking on the Browse sub-menu will bring up a file open dialog window that allows the user to navigate to the required folder or file and select it.
Direct editing
Entries in the Value column can also be changed by double-clicking (left mouse button) on the entry and then editing the text in the usual manner.
The Options section
Many control files have an Options section where the user can specify processing options. The details of the options available are described in the relevant section for that level.
The options available for a given level can be displayed by right-clicking on the Options section heading in the Parameter column as shown below.
Selecting an Options entry from the context menu will add the option with a default value to the Options section.
Options that don't have fixed values can be changed by double-clicking on the entry in the Value column and editing the text as usual. Options with fixed values can be changed by right-clicking on the entry in the Value column and selecting the option wanted. The example below shows the options sub-menu for the CO2 flux (Fco2) units.
Entries in the Soil and Massman sections can be changed in the same way.
The Variables section
The Variables section, or its equivalent at L4 (Drivers) and L5 (Fluxes), contains a list of each variable being processed. Each variable has several options that can be added, removed or modified by the user via the GUI. The options for each variable are described in the relevant sections. This section describes the general methods available for adding variables to or removing variables from the Variables section.
A variable can be added to or removed from the Variables section using the context-sensitive menu displayed by right-clicking on a variable entry in the Parameter column, see below.
Selecting the New variable option from the sub-menu will add a new variable immediately above the selected variable. Selecting Remove variable will remove the selected variable from the Variables section. The other options available in the sub-menu can be added to the selected variable and are described in the Level 3 section.
The Plots section
The L2 and L3 control files have a Plots section that allows the user to specify which variables will be plotted when the processing at this level is complete.
Plots can be added to the Plots section by right-clicking on the Plots section heading in the Parameter column, see the screenshot below.
Plots can be removed from the Plots section by right-clicking on the plot entry in the Parameter column and selecting the Remove plot option in the sub-menu, see below.
The variables displayed in the time series plots can be changed by double-clicking on the entry in the Value column opposite the variables key word under the plot title in the Parameter column. Text in this entry can edited as usual, see below.