baseliner: an open-source, interactive tool for processing ...baseliner: an open-source, interactive...

5
Available online at www.sciencedirect.com ScienceDirect SoftwareX 5 (2016) 139–143 www.elsevier.com/locate/softx Baseliner: An open-source, interactive tool for processing sap flux data from thermal dissipation probes A. Christopher Oishi a,, David A. Hawthorne a , Ram Oren b a USDA Forest Service, Southern Research Station, Coweeta Hydrologic Laboratory, Otto, NC, USA b Duke University, Nicholas School of the Environment, Durham, NC, USA Received 5 July 2016; accepted 25 July 2016 Abstract Estimating transpiration from woody plants using thermal dissipation sap flux sensors requires careful data processing. Currently, researchers accomplish this using spreadsheets, or by personally writing scripts for statistical software programs (e.g., R, SAS). We developed the Baseliner software to help establish a standardized protocol for processing sap flux data. Baseliner enables users to QA/QC data and process data using a combination of automated steps, visualization, and manual editing. Data processing requires establishing a zero-flow reference value, or “baseline”, which varies among sensors and with time. Since no set of algorithms currently exists to reliably QA/QC and estimate the zero- flow baseline, Baseliner provides a graphical user interface to allow visual inspection and manipulation of data. Data are first automatically processed using a set of user defined parameters. The user can then view the data for additional, manual QA/QC and baseline identification using mouse and keyboard commands. The open-source software allows for user customization of data processing algorithms as improved methods are developed. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). Keywords: Sap flux; Thermal dissipation probe; Granier probe; Data processing Code metadata Current Code version 4.0 Permanent link to code/repository used of this code version https://github.com/ElsevierSoftwareX/SOFTX-D-16-00055 Legal Code License GNU General Public License v3.0 Code Versioning system used git Software Code Language used MATLAB Compilation requirements, Operating environments & dependencies If available Link to developer documentation/manual https://github.com/ElsevierSoftwareX/SOFTX-D-16-00055/blob/master/README.md Support email for questions [email protected] Software metadata Current software version 4.0 Permanent link to executables of this version https://github.com/ElsevierSoftwareX/SOFTX-D-16-00055 Legal Software License GNU General Public License v3.0 Computing platform/Operating System Microsoft Windows, MATLAB Installation requirements & dependencies If available Link to user manual — if formally published include a reference to the publication in the reference list https://github.com/ElsevierSoftwareX/SOFTX-D-16-00055/blob/master/README.md Support email for questions [email protected] Corresponding author. E-mail address: [email protected] (A.C. Oishi). http://dx.doi.org/10.1016/j.softx.2016.07.003 2352-7110/Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

Upload: others

Post on 16-Mar-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Baseliner: An open-source, interactive tool for processing ...Baseliner: An open-source, interactive tool for processing sap flux data from ... often highly dependent on the atmospheric

Available online at www.sciencedirect.com

ScienceDirect

SoftwareX 5 (2016) 139–143www.elsevier.com/locate/softx

Baseliner: An open-source, interactive tool for processing sap flux data fromthermal dissipation probes

A. Christopher Oishia,∗, David A. Hawthornea, Ram Orenb

a USDA Forest Service, Southern Research Station, Coweeta Hydrologic Laboratory, Otto, NC, USAb Duke University, Nicholas School of the Environment, Durham, NC, USA

Received 5 July 2016; accepted 25 July 2016

Abstract

Estimating transpiration from woody plants using thermal dissipation sap flux sensors requires careful data processing. Currently, researchersaccomplish this using spreadsheets, or by personally writing scripts for statistical software programs (e.g., R, SAS). We developed the Baselinersoftware to help establish a standardized protocol for processing sap flux data. Baseliner enables users to QA/QC data and process data usinga combination of automated steps, visualization, and manual editing. Data processing requires establishing a zero-flow reference value, or“baseline”, which varies among sensors and with time. Since no set of algorithms currently exists to reliably QA/QC and estimate the zero-flow baseline, Baseliner provides a graphical user interface to allow visual inspection and manipulation of data. Data are first automaticallyprocessed using a set of user defined parameters. The user can then view the data for additional, manual QA/QC and baseline identification usingmouse and keyboard commands. The open-source software allows for user customization of data processing algorithms as improved methods aredeveloped.Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

Keywords: Sap flux; Thermal dissipation probe; Granier probe; Data processing

Code metadata

Current Code version 4.0Permanent link to code/repository used of this code version https://Legal Code License GNU GCode Versioning system used gitSoftware Code Language used MATLACompilation requirements, Operating environments & dependenciesIf available Link to developer documentation/manual https://Support email for questions acoishi

Software metadata

Current software version 4.0Permanent link to executables of this version https://Legal Software License GNU GComputing platform/Operating System MicrosInstallation requirements & dependenciesIf available Link to user manual — if formally publishedinclude a reference to the publication in the reference list

https://

Support email for questions acoishi

∗ Corresponding author.E-mail address: [email protected] (A.C. Oishi).

http://dx.doi.org/10.1016/j.softx.2016.07.0032352-7110/Published by Elsevier B.V. This is an open access article under the CC

github.com/ElsevierSoftwareX/SOFTX-D-16-00055eneral Public License v3.0

B

github.com/ElsevierSoftwareX/SOFTX-D-16-00055/blob/master/[email protected]

github.com/ElsevierSoftwareX/SOFTX-D-16-00055eneral Public License v3.0

oft Windows, MATLAB

github.com/ElsevierSoftwareX/SOFTX-D-16-00055/blob/master/README.md

@fs.fed.uc

BY license (http://creativecommons.org/licenses/by/4.0/).

Page 2: Baseliner: An open-source, interactive tool for processing ...Baseliner: An open-source, interactive tool for processing sap flux data from ... often highly dependent on the atmospheric

140 A.C. Oishi et al. / SoftwareX 5 (2016) 139–143

1. Motivation and significance

Quantifying water use by woody plants is a vital compo-nent of research in plant physiology, hydrology, forest ecol-ogy, and environmental science. Currently, the most effectiveapproach for estimating continuous, in-situ, whole-tree wateruse is with sap flux sensors. Various types of sap flux sensorshave been developed over the past several decades, but all op-erate on similar principles. Sensors apply heat to a portion ofthe tree’s water-conducting tissue and measure how the flow ofxylem water (henceforth sap) affects changes in sensor temper-ature over time.

One of the most commonly used type of sap flux sensor is thethermal dissipation probe (TDP) [1,2]. These probes are com-mercially available or can be constructed by researchers withrelative ease and low cost. TDPs measure the difference in tem-perature between a heated and unheated sensor (details in Sec-tion 2: Theory of Thermal Dissipation Probe Operation) andoutput a raw voltage signal that can be recorded by an auto-mated datalogger. Accurately estimating sap flux from the rawTDP signal requires addressing several important challenges,including data quality assurance and quality control (QA/QC),and converting raw data to sap flux. Improper data processingwill propagate error in subsequent analyses, resulting in incor-rect estimates of tree- and stand-level water use and nocturnalsap flux [3,4]. Data from TDPs may exhibit considerable vari-ability, both for an individual probe over time and among differ-ent probes. Currently, there is no universal algorithm availablefor data QA/QC and processing.

Here, we present software that enables users to QA/QC andconvert raw TDP data into sap flux. This software combinesboth automated and manual approaches to data QA/QC andprocessing. The open-source design of the software enables im-proved data processing algorithms to be incorporated as theyare developed.

2. Theory of thermal dissipation probe operation

Based on Granier’s original design [1], one TDP consists oftwo, cylindrical metal tubes, each typically 20 mm in length and2 mm in outer diameter, containing a T-type copper-constantanthermocouple. The tubes are installed radially into the tree’s ac-tive xylem (sapwood) with vertical separation of approximately15 cm. The upper probe includes a heating element made ofconstantan wire, wound around the probe, supplied with 0.200W. Thermocouples produce a small voltage that varies withtemperature and the pair of thermocouples is used to measurethe temperature difference (dT ;

◦C) between heated and un-heated probes. As the velocity of water movement increases,more heat near the upper probe is dissipated and the dT de-clines (Fig. 1a).

dT is inversely related to sap flux (F ; m3 m−2 s−1) asa function of the maximum temperature differential betweenprobes when flux is zero (dTmax; ◦C). Thus, F can be related todT with the following equations:

K = (dTmax − dT )/dT = (dTmax/dT ) − 1, (1)

F = α × K β , (2)

Fig. 1. Example time series of (a) raw temperature differential (dT ) from athermal dissipation probe with zero-flow reference “baseline” (dTmax) in red,and (b) converted flow index (K ). This example shows a relatively stable dTmax.Note that K during the second half of day of year 220 was lower than other daysdue to an afternoon rain event.

where K is a dimensionless “flow index” and α and β areempirical coefficients [1].

The dT signal has some predictable characteristics. dT istypically greater than 2 ◦C and less than 15 ◦C, with a dielwave-like pattern with a typical amplitude of less than 5 ◦C(Fig. 1a). However, the amplitude will vary among days withsap flux and the wave-like pattern may be interrupted withina day if sap flux declines dramatically (e.g. as the result of anafternoon rain event; Fig. 1).

TDPs are relatively simple and reliable devices; however,they can output data within the range of expected values, butexhibiting erratic patterns, inconsistent with plant physiologicalbehavior. The dT signal may be compromised by faulty wiring,power supply interruptions, or other electrical interference(Fig. 2a). These data do not represent the true sap flux andshould be filtered out prior to data processing. Additionally,short gaps in reliable data can occur, often due to an interruptionin power (Fig. 2b).

Identifying a reliable dTmax also presents a methodologi-cal challenge. dTmax varies among sensors and changes overtime due to tree water status, ambient temperature fluctuations,and variability in the power supplied to the heating element,among other factors [3]. Thus, over time, dTmax may appearstable (Fig. 1a), drift upward or downward (Fig. 3a), or exhibit

Page 3: Baseliner: An open-source, interactive tool for processing ...Baseliner: An open-source, interactive tool for processing sap flux data from ... often highly dependent on the atmospheric

A.C. Oishi et al. / SoftwareX 5 (2016) 139–143 141

Fig. 2. Example time series of temperature differential (dT ) data from a thermal dissipation probe illustrating (a) unreliable data, likely due to a faulty wiringconnection and (b) a single data-point interruption in the dT signal.

Fig. 3. Example time series of temperature differential (dT ; black line) data from a thermal dissipation probe and maximum dT representing zero-flow conditions(dTmax) illustrating (a) a drift in dTmax and (b) a step change in the signal, likely due to a change in heat supplied to the sensor.

a step-change (Fig. 3b). Additionally, “noise” in sensor data,such as a spike or step-change in nighttime dT , can lead tomisinterpretation of the likely dTmax. In some systems, dTmaxmay occur every night if air humidity within the tree canopyis very high, or vapor pressure deficit (D; kPa) reaches 0 kPa.However, this assumption is not valid for many systems andnumerous studies have demonstrated water movement throughthe stem during night, either due to nighttime transpiration orrecharge of stem water [4–8]. For these reasons, no universalrule or algorithm exists for identifying dTmax. The Baselinersoftware takes a hybrid approach to dTmax estimation by firstidentifying points in time where flow is likely zero, based ondT stability and biophysical conditions, then allowing the userto visually inspect and modify those points. After identifyingindividual dTmax “anchor points”, a continuous dTmax, or “base-line” is linearly interpolated for the entire time series.

3. Software framework

Baseliner (version 4.0) is open source software writtenin MATLAB (R2015b, Mathworks Inc., Natick, MA) that is

designed to run within the MATLAB environment or compiledas a standalone executable program for Windows. The softwareincorporates much of the user interface appearance of earlierversions of the Baseliner program, but has been rewritten toincorporate greater functionality. It is released under an opensource license and allows for user modifications to the corealgorithm for processing TDP data.

Baseliner provides a graphical user interface (GUI) forvisualizing data from each TDP and performing two types ofoperation: QA/QC of raw data and conversion of raw data intoflow values. Each type of operation is described in detail below.

3.1. User interface

Baseliner’s main window has options for opening and savingfiles and exporting converted data (Fig. 4). The GUI presents atime-series plot of dT and K for visual inspection of data fromeach TDP. The mouse and shortcut keys can be used to zoomin and out, pan forward and backward in time. Since sap flux isoften highly dependent on the atmospheric demand for water,the GUI displays D (if measured) alongside K data, which can

Page 4: Baseliner: An open-source, interactive tool for processing ...Baseliner: An open-source, interactive tool for processing sap flux data from ... often highly dependent on the atmospheric

142 A.C. Oishi et al. / SoftwareX 5 (2016) 139–143

Fig. 4. Example view of Baseliner user interface window, including one year of TDP data.

provide a reference for the timing and magnitude of diurnaltrends.

3.2. Input data

Baseliner imports raw data as a Comma Separated Values(.csv) file containing columns with time and date, radiation,D, and TDP output. Since measurements are not consistentamong research sites, flexibility has been incorporated forinput variables. Measurements can be at any increment of time(typically 15 min to 1 h records), but must be continuous, andday-of-year must increase monotonically. The type of radiationmeasured is not specified and can include photosyntheticallyactive radiation (PAR), incoming shortwave radiation, or netradiation. This variable is only used to partition nighttime anddaytime data, so in the event that no radiation data are available,a placeholder vector of zeros and ones can be used to representnight and day, respectively. If D data are available, they can beused for conditional dTmax identification; however, this variableis not required. Units for dT are arbitrary and can be expressedas raw mV values from the thermocouples or converted to ◦C.Baseliner does not alter the raw data and tracks any changesmade during processing.

3.3. Data QA/QC

Preliminary QA/QC of the dT data is done automaticallybased on several user-defined parameters. Data will be setto not-a-number (NaN) values if they exceed a minimum ormaximum threshold, outside the reliable operational rangefor the sensors. Short segments of data interrupted by NaNvalues are often indicative of a sensor malfunction and, if theyare shorter than one day, the segments may be too short toprovide reliable sap flux estimates. Thus, the user can define

the minimum length of consecutive valid data to accept (e.g.,filter-out data segments if valid consecutive measurements areless than 4 h). Although rapid changes in dT are possible, somechanges may be unreasonably large and indicate questionabledata. The user can define a maximum absolute change over oneunit time to omit. Additionally, manual omission of data canbe performed using the mouse and shortcut keys. The user canselect a box encompassing a range of data to be deleted. Themouse can also be used to select a range of data to interpolatelinearly. The interpolation function is useful for filling smallgaps in the data or replacing short spikes in the data.

3.4. Data conversion

Baseliner provides users the opportunity to use bothautomatically-selected dTmax points as well as manuallyidentified values. The default option for automatic dTmax pointselection assumes that flow ceases every night and identifiesthe maximum dT value each day, between midnight and 7:00AM. This approach accounts for the environmental conditionsin which temperature is most likely to drop below the dew pointas well as the physiological response in which cessation of flowpast the sensor may lag behind stomatal closure at the leaf level.

The second option for automatic dTmax point selection findsa joint set of conditions when sap flux is likely zero. Theseconditions are (1) nighttime hours, characterized by near-zeroradiation, (2) stable dT , characterized by a low coefficient ofvariation, and (3) low D, characterized by values below a setthreshold for a designated length of time [4]. If these conditionsare met on more than one point in time on a given night, the lastsuch point is selected.

Since conditions may exist where an automated approachmay not identify a reasonable dTmax point, the GUI alsoallows the user to use the mouse to add dTmax points by

Page 5: Baseliner: An open-source, interactive tool for processing ...Baseliner: An open-source, interactive tool for processing sap flux data from ... often highly dependent on the atmospheric

A.C. Oishi et al. / SoftwareX 5 (2016) 139–143 143

clicking near the dT line or remove unreasonable dTmax pointsby highlighting these points with a box. The unitless flowparameter, K , is automatically recalculated after any changesto the dTmax baseline or the dT data are made. The K timeseries is displayed in the GUI.

The structure of the open source code allows users tomodify the core algorithm for dTmax point selection, as wellas processes for filtering data.

3.5. Data output

The user has two options for exporting converted K data toa.csv file. The first option is to export K using all modificationsto dT and dTmax anchor points. For any sensors that have notbeen modified, the default dTmax values will be used to calculateK . The second option uses the user-modified dT data, but re-evaluates the dTmax baseline by selecting the peak nightly value.Any modified dTmax anchor points are not used for these Kestimates, but they are also not reset in the main project file.The second option allows the user to compare results from theinteractive approach and the forced nightly dTmax approach.

The user also has the option to export an estimate of theerror associated with the precision of point selection. Thesoftware runs Monte-Carlo simulations of the K estimatesbased on randomly selected dTmax points, varying around theselected dTmax anchor points within a normal distribution with astandard deviation of 1 h (independent of time step). The outputfrom this file is the standard deviation of exported K . Columnsfollow the raw input file.

Baseliner also creates and saves an Extensible MarkupLanguage (.xml) “project file” that tracks any changes made tothe dT values and the dTmax baseline. This .xml file allows theprogram to reopen an existing project file and make additionalmodifications to data.

4. Conclusions

Baseliner is designed to help users avoid some of themost common mistakes in processing data from TDPs andto help establish a standardized approach for data QA/QCand processing. The structure of the software is intendedto provide users with maximum flexibility, both in terms ofthe data processing interface and the ability to modify thecore algorithms in the source code. We acknowledge that noapproach for processing TDP data will be immune to errorsand that some level of subjectivity of data analysis is necessary,either as pre-defined thresholds and algorithms or through userinteraction. Therefore, the format of Baseliner strikes a balance

between automation and visual inspection. This approach helpsusers to produce the best estimates of sap flux, accounting forvariability in probe heat supply, variability in tree water status,and nocturnal sap flow.

Acknowledgments

We would like to thank Chelcy Miniat and Ken Krauss forconstructive feedback on the development of this software, forproviding sample test data, and providing comments on themanuscript. We thank Doug Aubrey for providing commentson the manuscript, also Pete Anderson and Shelly Hooke fortesting the software.

This software development was funded by the USDAForest Service, Southern Research Station. Previous versions ofBaseliner were developed at Duke University, Nicholas Schoolof the Environment at Duke University with programmingsupport by Huang Ce (v.1) and Yavor Parashkevov (v.2and v.3) and funding support from the Biological andEnvironmental Research (BER) Program (Grant No. DE-FG02 00ER63015), U.S. Department of Energy, through theSoutheast Regional Center (SERC) of the National Institutefor Global Environmental Change (NIGEC; DOE cooperativeagreement DE-FC030-90ER61010), and through the TerrestrialCarbon Process (TCP) Program (DE-FG02-95ER62083 andDESC0006967).

References

[1] Granier A. Une nouvelle methode pour la mesure du flux de seve brute dansle tronc des arbres. Ann Sci For 1985;42:81–8.

[2] Granier A. Evaluation of transpiration in a Douglas-fir stand by means ofsap flow measurements. Tree Physiology 1987;3:309–20.

[3] Lu P, Urban L, Zhao P. Granier’s thermal dissipation probe (TDP)methodology for measuring sap flow in trees: theory and practice. ActaBot Sin 2004;46:631–46.

[4] Oishi AC, Oren R, Stoy PC. Estimating components of forest evapotran-spiration: A footprint approach for scaling sap flux measurements. AgricultForest Meteorol 2008;148:1719–32.

[5] Daley MG, Phillips NG. Interspecific variation in nighttime transpirationand stomatal conductance in a mixed New England deciduous forest. TreePhysiol 2006;26:411–9.

[6] Dawson TE, Burgess SSO, Tu KP, Oliveira RS, Santiago LS, Fisher JB,Simonin KA, Ambrose AR. Nighttime transpiration in woody plants fromcontrasting ecosystems. Tree Physiol 2007;27:561–75.

[7] Oren R, Phillips N, Ewers BE, Pataki DE, Megonigal JP. Sap-flux-scaled transpiration responses to light, vapor pressure deficit, and leaf areareduction in a flooded Taxodium distichum forest. Tree Physiol 1999;19:337–47.

[8] Phillips N, Oren R, Zimmermann R. Radial patterns of xylem sap flow innon-, diffuse- and ring-porous tree species. Plant, Cell Environ 1996;19:983–90.