-
Notifications
You must be signed in to change notification settings - Fork 5
Using the examples
There are example files for 3 OzFlux/TERN Ecosystem Processes sites (Calperum, Cumberland Plain and Loxton). They are available from GitHub, see https://github.com/OzFlux/Examples.git. See the Downloading section later on this page for instructions on how to download the example files.
These files are intended to be used as examples for using PyFluxPro. Each ZIP file contains all of the files required to complete processing the site data from ingestion (L1) to partitioning (L6), including L1 data files (as Excel workbooks), control files for all levels of processing and alternate data (AWS, ACCESS and ERA5) for gap filing meteorological data at L4. Each site highlights the different ways that PyFluxPro works.
This site was an irrigated almond orchard in South Australia, not far from the town of Renmark. The data period is just less than 1 year but the data is of very high quality and this makes it an excellent example site. The site coordinates are -34.470328, 140.655384.
The eddy covariance system consisted of a CSAT3 sonic anemometer, an Li-7500 infra-red gas analyser (IRGA) and a CR3000 data logger. The turbulence data was processed using EddyPro to calculate the 30 minute fluxes. The EddyPro output and biomet data has been assembled into an Excel workbook, Loxton_L1.xls, in the Loxton/Data/Tower folder. The short period of the Loxton data means that it can be processed in a single block and does not need to be split into individual years.
This site is over a regenerating mallee ecosystem in South Australia near the town of Renmark. The site details can be seen at https://www.ozflux.org.au/monitoringsites/calperum/index.html. The site coordinates are -34.002060, 140.589120.
The files for this site offer 3 example processing paths:
- L1 to L3 processing of data for 2016 using the typical OzFlux data path (PFP calculates fluxes from covariances at L3), see the control files in PFP_examples/Calperum/controlfiles/OxFlux and the L1 workbook in PFP_examples/Calperum/Data/OzFlux/2016/.
- L1 to L3 processing of data for 2016 using the output from EddyPro (fluxes calculated by EddyPro and read in at L1), see the control files in PFP_examples/Calperum/controlfiles/EddyPro/ and the L1 workbook in PFP_examples/Calperum/Data/EddyPro/2016/.
- L4 to L6 processing of data for 2010 to 2020 using L3 data downloaded from the OzFlux Data Portal (https://data.ozflux.org.au/portal/pub/viewColDetails.jspx?collection.id=1882712&collection.owner.id=703&viewType=anonymous). See the control files in PFP_examples/Calperum/controlfiles/ and the L3 netCDF files in PFP_examples/Calperum/Data/Tower/.
This site is over a patch of remnant native vegetation in Western Sydney close to the Hawkesbury River. The site details can be seen at https://www.ozflux.org.au/monitoringsites/cumberlandplain/index.html. The site coordinates are -33.615280, 150.723610.
The files for this site offer an example of processing data originally from a Campbell system in 2014 with a change to a SmartFlux system in October 2018. Fluxes for the period 2014 to October 2018 were calculated by EddyPro and are read in at L1. This site also demonstrates the inclusion of a CO2 storage term calculated from measurements of the CO2 concentration at different heights within the canopy.
This is a complex site with several changes in data format over the years. It is intended to show the ability of PyFluxPro to handle this level of complexity. This includes using PyFluxPro to handle changes in statistics, for example the Campbell system outputs CO2 variance in mg^2/m^6 but the SmartFlux system use mmol^2/m^6. PyFluxPro is able to convert these units to produce a homogeneous time series despite the change in data collection system.
You can download the example files for a site by following these steps:
- Go to the Examples repository on GitHub, see https://github.com/OzFlux/Examples.git.
- Click on the ZIP file for a site. GitHub will open a page saying it "can't show files this big".
- Click on the Download button at the top right corner of the window displaying this message.
- The file will start downloading after a delay of several seconds.
The control files for each site in the examples assume a particular folder structure. You're welcome to use any folder structure that makes sense to you but if you stick with the one described below then you wont have to change anything in the example control files in order to run them.
The screenshot below shows the default folder structure used in the example files.
The main points are:
- The example files for each site are in separate folders under the PFP_examples folder.
- The PFP_examples and PyFluxPro folders are at the same level.
- Keep your own data and control files separate from both PFP_examples and PyFluxPro. In the example shown above, your sites go in the mySites folder which is also at the same level as the PyFluxPro folder.
If you use the folder structure described above then you can use the example control files with modification.
We will use the level 1 (L1) processing for Loxton as a basic demonstration for how to use the examples. A more detailed description of how to use the examples can be found in the PyFluxPro wiki.
Before you start, make sure:
- You have installed PyFluxPro and checked that it starts correctly.
- You have installed the example files for Loxton using the folder structure shown above.
To run the L1 processing for Loxton, follow these steps:
- Open a command window (Windows) or a terminal (macOS and Linux), use cd to navigate to your PyFluxPro folder and start PyFluxPro by typing:
- Windows;
- If you installed PyFluxPro from the single file installer, just type PyFluxPro at the command line.
- If you installed PyFluxPro by cloning from the GitHub repository, type "python PyFluxPro" at the command line or just "pfp".
- macOS;
- If you installed PyFluxPro by uncompressing the ZIP file, just type ./PyFluxPro at the command line.
- If you installed PyFluxPro by cloning from the GitHub repository, type "python3 PyFluxPro" at the command line or just "./pfp".
- Linux;
- You know what to do ...
- Windows;
- When the PyFluxPro GUI opens, use the File/Open menu option to open the Loxton L1 control file (L1.txt), see the screenshot below;
- Once the Loxton L1 control file has loaded in the GUI, take a few minutes to review its contents. The PyFluxPro wiki entry on L1 (see https://github.com/OzFlux/PyFluxPro/wiki/Level-1) has a description of the L1 control file contents. Below is a screenshot of the Loxton L1 control file loaded into the GUI.
- If you have followed the folder structure suggested above then this control file will run without changes. If you have used a different folder structure, you will need to change the file_path entry in the Files section so that is refers to the folder containing the Loxton L1 workbook. A right click on the file_path entry (in the Value column) will allow you to browse to the appropriate folder.
- To run the L1 processing for Loxton, use the Run/Current menu option, see below:
- If the Loxton L1 processing runs successfully, you should see the output below:
That's it, you're all done for Loxton L1. Now try the same process for Loxton L2 to L3. Then try Utilities/Climatology and Utilities/u threshold/CPD (McHugh)* to run the climatology (needed for L4) and the CPD u* threshold detection routine (needed for L5). Then run L4 to L6. Try the other example sites, they all do something different that displays the various features of PyFlyxPro.
The PyFluxPro Wiki, see https://github.com/OzFlux/PyFluxPro/wiki, has more information on the processing.