Tree Sap Flow Extractor

Performs data assimilation, processing and analyses on sap flow data obtained with the thermal dissipation method (TDM). The package includes functions for gap filling time-series data, detecting outliers, calculating data-processing uncertainties and generating uniform data output and visualisation. The package is designed to deal with large quantities of data and to apply commonly used data-processing methods. The functions have been validated on data collected from different tree species across the northern hemisphere (Peters et al. 2018 ).


TREXr

Travis build status

TREXr allows to assimilate, process and analyse sap flow data obtained with the thermal dissipation method (TDM). The package includes functions for gap filling time-series data, detecting outliers, calculating data-processing uncertainties and generating uniform data output and visualisation. The package is designed to deal with large quantities of data and apply commonly used data-processing methods. The functions have been validated on data collected from different tree species across the northern hemisphere (Peters et al. 2018 <doi: 10.1111/nph.15241>).


1. Installation

A development version of TREXr can be installed and used via

remotes::install_github("the-Hull/TREXr")

library(TREXr)

2. Basic use and workflow

Load data

# load raw data
raw   <- is.trex(example.data(type="doy"),
                 tz="GMT",
                 time.format="%H:%M",
                 solar.time=TRUE,
                 long.deg=7.7459,
                 ref.add=FALSE)
                 
# adjust time steps
input <- dt.steps(input=raw, 
                start="2013-05-01 00:00",
                end="2013-11-01 00:00",
                time.int=15,
                max.gap=60,
                decimals=10,
                df=FALSE)
                
# remove obvious outliers
input[which(input<0.2)]<- NA


Calculate maximum ΔT-Values

Three methods can be applied to calculate ΔT (or ΔV for voltage differences between TDM probes):

  • pd: pre-dawn
  • mw: moving-window
  • dr: double-regression
input <- tdm_dt.max(input,
                    methods = c("pd", "mw", "dr"),
                    det.pd = TRUE,
                    interpolate = FALSE,
                    max.days = 10,
                    df = FALSE)
                    
plot(input$input, ylab = expression(Delta*italic("V")))

lines(input$max.pd, col = "green")
lines(input$max.mw, col = "blue")
lines(input$max.dr, col = "orange")

Calculate Sap Flux Density


output.data<- tdm_cal.sfd(input,make.plot=TRUE,df=FALSE,wood="Coniferous")

plot(output.data$sfd.pd$sfd[1:1000, ], ylim=c(0,10))
# see estimated uncertainty
lines(output.data$sfd.pd$q025[1:1000, ], lty=1,col="grey")
lines(output.data$sfd.pd$q975[1:1000, ], lty=1,col="grey")
lines(output.data$sfd.pd$sfd[1:1000, ])

sfd_data <- output.data$sfd.dr$sfd


Generate Outputs

Here we generate outputs based on environmental filters and calculate crown conductance (Gc) values.

output<- out.data(input=sfd_data,
                  vpd.input=vpd, 
                  sr.input=sr,
                  prec.input=preci,
                  low.sr = 150,
                  peak.sr=300, 
                  vpd.cutoff= 0.5, 
                  prec.lim=1,
                  method="env.filt", 
                  max.quant=0.99, 
                  make.plot=TRUE)

3. More on TREXr

Workshops using TREXr

  • ESA 2020: TREXr was introduced and demonstrated in detail in a workshop during the Ecological Society of America's 2020 AGM. The workshop description can be found here, and all materials on the dedicated page.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("TREXr")

1.0.0 by Richard Peters, 6 years ago


https://the-hull.github.io/TREX/


Report a bug at https://github.com/the-Hull/TREX/issues


Browse source code at https://github.com/cran/TREXr


Authors: Richard Peters [cre, aut, cph] , Christoforos Pappas [aut, ctb] , Alexander Hurley [aut, cph] , Rafael Poyatos [ctb] , Victor Flo [ctb] , Roman Zweifel [ctb] , Willem Goossens [ctb] , Kathy Steppe [ths, etr, fnd]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports chron, zoo, solaR, stats, graphics, lubridate, utils, grDevices, lhs, doParallel, foreach, tibble, dplyr, sensitivity, randtoolbox, boot, doSNOW, msm, parallel, magrittr, tools

Suggests shiny, plotly


See at CRAN