PNNL-TES / dwp_peyton

Peyton's Picarro data from DWP
0 stars 2 forks source link

dwp_peyton

R code for @apeyton_smith above/below wetting experiment. This pipeline starts with reading CO2/CH4 data as downloaded from the Picarro analyzer, processes it, computes mass-normalized fluxes and cumulative respired C, does some QC, and generates figures and statistics.

This code makes heavy use of the dplyr package. All scripts write log files that include dates, package and R version numbers, diagnostics, etc. They are designed to be run in numerical order.

What these scripts do

0-functions.R

Loads required libraries and provides support functions for all the other scripts, including

1-data.R

Reads all raw Picarro data from a specified directory, concatenates it all together, and writes the resulting data frame to a rawdata.csv.gz file.

2-summarize.R

This is the heart of the pipeline. It performs the following major steps:

3-fluxes.R

This script computes actual carbon fluxes by gas.

4-plots.R

This script makes a variety of plots: QC plots, histograms of the computed fluxes, flux comparisons broken down by various factors. It also prints a naive statistical summary, fitting a linear model using WETTING, STRUCTURE, etc.