Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 38a5cf3
Showing
78 changed files
with
8,118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Package: bigleaf | ||
Type: Package | ||
Version: 0.3.0 | ||
Date: 2018-01-24 | ||
Title: Physical and Physiological Ecosystem Properties from Eddy | ||
Covariance Data | ||
Authors@R: c( person("Juergen", "Knauer", role=c("aut","cre"), email="jknauer@bgc-jena.mpg.de"), | ||
person("Soenke", "Zaehle", role=c("ctb"), email="szaehle@bgc-jena.mpg.de"), | ||
person("Tarek", "El-Madany", role=c("ctb"), email="telmad@bgc-jena.mpg.de"), | ||
person("Mirco", "Migliavacca", role=c("ctb"), email="mmiglia@bgc-jena.mpg.de") | ||
) | ||
Maintainer: Juergen Knauer <jknauer@bgc-jena.mpg.de> | ||
Description: Calculation of physical (e.g. aerodynamic conductance, surface temperature), | ||
and physiological (e.g. canopy conductance, water-use efficiency) ecosystem properties | ||
from eddy covariance data and accompanying meteorological measurements. Calculations | ||
assume the land surface to behave like a 'big-leaf' and return bulk ecosystem/canopy variables. | ||
URL: https://bitbucket.org/juergenknauer/bigleaf/overview | ||
Depends: R (>= 2.10) | ||
Imports: robustbase | ||
License: GPL (>= 2) | ||
LazyData: yes | ||
RoxygenNote: 6.0.1 | ||
NeedsCompilation: no | ||
Packaged: 2018-01-25 14:31:18 UTC; jknauer | ||
Author: Juergen Knauer [aut, cre], | ||
Soenke Zaehle [ctb], | ||
Tarek El-Madany [ctb], | ||
Mirco Migliavacca [ctb] | ||
Repository: CRAN | ||
Date/Publication: 2018-01-25 15:16:34 UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
e4df586eb4b6d7defde22e4d88731046 *DESCRIPTION | ||
84ec224aa5e343a280270f915cf7fe68 *NAMESPACE | ||
104a65fde34091bd0738b5a6b49980ed *R/WUE_metrics.r | ||
0385125ced5dccc39d208683b40cfddb *R/aerodynamic_conductance.r | ||
34ba2135e7ea0356d554f10ed35e1da9 *R/bigleaf_constants.r | ||
70f7131a624bb04be63d412431f49205 *R/bigleaf_physiology.r | ||
e35f1be56044f46d5f7697a310385546 *R/boundary_layer_conductance.r | ||
8b867f3ed66f89b7191c67cc497c4300 *R/check_input.r | ||
9f83625fbdb84cc48f275381d6ff93d7 *R/datasets_description.r | ||
867953fd6c1123618e7b9d1676eb3b5d *R/decoupling.r | ||
5f4bea86d84a7b7fd149e24db49d32c7 *R/energy_balance.r | ||
5dc025918438ce48caf11fe67180b1a1 *R/evapotranspiration.r | ||
da49ff396279f0fa441dc29ab3b610c4 *R/filter_data.r | ||
99aaa64f0832f7d2235e5c6c9a5618ad *R/meteorological_variables.r | ||
b4f2df65775944c5ff922db423141a18 *R/stability_correction.r | ||
678cf4c66ef5cf48423a6e954be224ef *R/surface_conditions.r | ||
414c6b5011a0fffe807cdbe76827e324 *R/surface_conductance.r | ||
85a07a2cdf2b03f404a0085dd0e1e31b *R/surface_roughness.r | ||
bb7b587e71672f95b8bf85bec4266726 *R/unit_conversions.r | ||
afe33cf05751fdb6471396e344d4e87e *data/AT_Neu_Jul_2010.rda | ||
1c2a7ce4ae65849e4a53411217906af4 *data/DE_Tha_Jun_2014.rda | ||
c69db5fcea09412b25d1dd2a3f5f5258 *data/FR_Pue_May_2012.rda | ||
79345a5188b0afcd9fa07843a7cbf56f *man/AT_Neu_Jul_2010.Rd | ||
ae9553698e02d653ee4ead85e8bb2043 *man/Arrhenius.temp.response.Rd | ||
cf678bbeb84cc6b0d37c9577769af17e *man/DE_Tha_Jun_2014.Rd | ||
044d3989bb04d55c25e6a5de7c2aad74 *man/Esat.slope.Rd | ||
67aea5d44315a3c3c950f62f7cbd28b9 *man/FR_Pue_May_2012.Rd | ||
59b8d581ed7d66c0e71490277c6823f7 *man/Gb.Choudhury.Rd | ||
fc9a80d6684939379453d15718dbbfd9 *man/Gb.Su.Rd | ||
7e17dbf16eca2adf1b8e8b76dd0ac8ff *man/Gb.Thom.Rd | ||
3dd6cdd399f92f3a3b73fd54d7bb5cd0 *man/LE.to.ET.Rd | ||
7659799f655bbe0876952e73881c73fc *man/Monin.Obukhov.length.Rd | ||
17a996dc1b4f40c7ee75827115abb601 *man/Reynolds.Number.Rd | ||
cf3589109b828b0a37c900e8897e8241 *man/Rg.to.PPFD.Rd | ||
abdf1f4b6802b123884fb032dc4ac54c *man/VPD.to.rH.Rd | ||
08b19ed1c83c7fd2eceef0cc6a7746ea *man/WUE.metrics.Rd | ||
58e72e261545fc4f9df4e36f2872a77e *man/aerodynamic.conductance.Rd | ||
33b08341fb1a2b0c4e3bb99449d17d2f *man/air.density.Rd | ||
83cffa29135357853796fd1abd701b28 *man/bigleaf.constants.Rd | ||
e00d83fb0e46858754401e6d8fbe835a *man/biochemical.energy.Rd | ||
9041470134033a721fa0b59aacf35605 *man/check.input.Rd | ||
cea5407ac444d3127c22fa68516c1ce8 *man/check.length.Rd | ||
e198cfa472db8069995829ee93da382d *man/decoupling.Rd | ||
872fc65034f721fc07ef7765b00f687c *man/dew.point.Rd | ||
7bbdfe3e9be38c3215e604e7da820945 *man/dew.point.solver.Rd | ||
407a9cccc4b91e6995b8f88aa81ed223 *man/energy.closure.Rd | ||
a6c9250fbc34a7bab05fce15bd2b0cd4 *man/energy.use.efficiency.Rd | ||
a633ead285a15addf5e971b30a961b3a *man/equilibrium.imposed.ET.Rd | ||
05fd47945c525e22c565afd7849a3f75 *man/filter.data.Rd | ||
7823670692dae256a819eb756d07bb5f *man/filter.growing.season.Rd | ||
d613000069be302ad541eab217c4c738 *man/intercellular.CO2.Rd | ||
2c5654480c02681ecc27309237f1d4b6 *man/isothermal.Rn.Rd | ||
028f2c5d4e4cb2344e3a0806f06285cf *man/kinematic.viscosity.Rd | ||
9dc96fd464cedf12e2c225ac524e9ce7 *man/latent.heat.vaporization.Rd | ||
0811767321bd2ec902456f9f981e8951 *man/light.response.Rd | ||
b011c947d448ad72a0767795f98a1c1a *man/light.use.efficiency.Rd | ||
b8f465c91d2790e627aa241a14bd0f0f *man/longwave.conductance.Rd | ||
a38c87be677f72685b5674fbca431ed9 *man/ms.to.mol.Rd | ||
2638ed15d9ea39346820c6b1c5e74799 *man/photosynthetic.capacity.Rd | ||
5278e74e46aecb6e702213ab18664b97 *man/potential.ET.Rd | ||
60f0a8b0bfd3e681cd33f032953861da *man/pressure.from.elevation.Rd | ||
8596c6504633bd326e1187e749f88508 *man/psychrometric.constant.Rd | ||
c13828925a01580f1e04d73249861ac9 *man/radiometric.surface.temp.Rd | ||
fc7a93ca7422b2a8a14630d23595c431 *man/reference.ET.Rd | ||
324708d7e23426d452071984cbb54a0b *man/roughness.parameters.Rd | ||
39d2c19e67df57f228a4b8436cb014de *man/stability.correction.Rd | ||
29f07825a985ca57989f0ed24384ebdd *man/stability.parameter.Rd | ||
c01f5878296704e901c4a787e399c97a *man/stomatal.sensitivity.Rd | ||
868e86f97a96d8bd26824b5941994283 *man/stomatal.slope.Rd | ||
0076d28809e69a9adb127ad772981da8 *man/surface.CO2.Rd | ||
cc5b99cc2dd31acaec24d6af83cb97c8 *man/surface.conditions.Rd | ||
f8c93f0496ad1570219e9751a4c7cebf *man/surface.conductance.Rd | ||
745b726b538f3d01ea22ccb4e2b8d96e *man/umolCO2.to.gC.Rd | ||
221b0e19794621b29f37062911c1e2f3 *man/virtual.temp.Rd | ||
7d43512699bb34537796f7a3555c35af *man/wetbulb.solver.Rd | ||
32fdf58d62e0eee46407598f2cbbb230 *man/wetbulb.temp.Rd | ||
359f90194142790c5d76ab98df828297 *man/wind.profile.Rd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(Arrhenius.temp.response) | ||
export(ET.to.LE) | ||
export(Esat.slope) | ||
export(Gb.Choudhury) | ||
export(Gb.Su) | ||
export(Gb.Thom) | ||
export(LE.to.ET) | ||
export(Monin.Obukhov.length) | ||
export(PPFD.to.Rg) | ||
export(Reynolds.Number) | ||
export(Rg.to.PPFD) | ||
export(VPD.to.e) | ||
export(VPD.to.q) | ||
export(VPD.to.rH) | ||
export(WUE.metrics) | ||
export(aerodynamic.conductance) | ||
export(air.density) | ||
export(bigleaf.constants) | ||
export(biochemical.energy) | ||
export(decoupling) | ||
export(dew.point) | ||
export(e.to.VPD) | ||
export(e.to.q) | ||
export(energy.closure) | ||
export(energy.use.efficiency) | ||
export(equilibrium.imposed.ET) | ||
export(filter.data) | ||
export(filter.growing.season) | ||
export(gC.to.umolCO2) | ||
export(intercellular.CO2) | ||
export(isothermal.Rn) | ||
export(kinematic.viscosity) | ||
export(latent.heat.vaporization) | ||
export(light.response) | ||
export(light.use.efficiency) | ||
export(longwave.conductance) | ||
export(mol.to.ms) | ||
export(ms.to.mol) | ||
export(photosynthetic.capacity) | ||
export(potential.ET) | ||
export(pressure.from.elevation) | ||
export(psychrometric.constant) | ||
export(q.to.VPD) | ||
export(q.to.e) | ||
export(rH.to.VPD) | ||
export(radiometric.surface.temp) | ||
export(reference.ET) | ||
export(roughness.parameters) | ||
export(stability.correction) | ||
export(stability.parameter) | ||
export(stomatal.sensitivity) | ||
export(stomatal.slope) | ||
export(surface.CO2) | ||
export(surface.conditions) | ||
export(surface.conductance) | ||
export(umolCO2.to.gC) | ||
export(virtual.temp) | ||
export(wetbulb.temp) | ||
export(wind.profile) | ||
importFrom(robustbase,nlrob) | ||
importFrom(stats,D) | ||
importFrom(stats,aggregate) | ||
importFrom(stats,complete.cases) | ||
importFrom(stats,filter) | ||
importFrom(stats,lm) | ||
importFrom(stats,median) | ||
importFrom(stats,na.exclude) | ||
importFrom(stats,nls) | ||
importFrom(stats,optimize) | ||
importFrom(stats,quantile) | ||
importFrom(stats,sd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
############################### | ||
### WUE metrics calculation ### | ||
############################### | ||
|
||
#' Water-Use Efficiency Metrics | ||
#' | ||
#' @description Calculation of various water use efficiency (WUE) metrics. | ||
#' | ||
#' @param data Data.frame or matrix containing all required variables | ||
#' @param GPP Gross primary productivity (umol CO2 m-2 s-1) | ||
#' @param NEE Net ecosystem exchange (umol CO2 m-2 s-1) | ||
#' @param LE Latent heat flux (W m-2) | ||
#' @param VPD Vapor pressure deficit (kPa) | ||
#' @param Tair Air temperature (deg C) | ||
#' @param constants Cmol - molar mass of carbon (kg mol-1) | ||
#' | ||
#' @details the following metrics are calculated: | ||
#' | ||
#' Water-use efficiency (WUE): | ||
#' | ||
#' \deqn{WUE = GPP / ET} | ||
#' | ||
#' Water-use efficiency based on NEE (WUE_NEE): | ||
#' | ||
#' \deqn{WUE_NEE = NEE / ET} | ||
#' | ||
#' Inherent water-use efficiency (IWUE; Beer et al. 2009): | ||
#' | ||
#' \deqn{IWUE = (GPP * VPD) / ET} | ||
#' | ||
#' Underlying water-use efficiency (uWUE; Zhou et al. 2014): | ||
#' | ||
#' \deqn{uWUE= (GPP * sqrt(VPD)) / ET} | ||
#' | ||
#' All metrics are calculated based on the median of all values. E.g. | ||
#' WUE = median(GPP/ET,na.rm=TRUE) | ||
#' | ||
#' @return a named vector with the following elements: | ||
#' \item{WUE}{Water-use efficiency (gC (kg H20)-1)} | ||
#' \item{WUE_NEE}{Water-use efficiency based on NEE (gC (kg H20)-1)} | ||
#' \item{IWUE}{Inherent water-use efficiency (gC kPa (kg H20)-1)} | ||
#' \item{uWUE}{Underlying water-use efficiency (gC kPa (kg H20)-1)} | ||
#' | ||
#' @note Units for VPD can also be hPa. Units change accordingly. | ||
#' WUE_NEE is calculated based on the absolute value of NEE (the sign convention does not matter here). | ||
#' | ||
#' @references Beer, C., et al., 2009: Temporal and among-site variability of inherent | ||
#' water use efficiency at the ecosystem level. Global Biogeochemical Cycles 23, GB2018. | ||
#' | ||
#' Zhou, S., et al., 2014: The effect of vapor pressure deficit on water | ||
#' use efficiency at the sub-daily time scale. Geophysical Research Letters 41. | ||
#' | ||
#' @seealso \code{\link{stomatal.slope}} for a measure of intrinsic WUE | ||
#' | ||
#' @examples | ||
#' ## filter data for dry periods and daytime at DE-Tha in June 2014 | ||
#' DE_Tha_Jun_2014_2 <- filter.data(DE_Tha_Jun_2014,quality.control=FALSE, | ||
#' vars.qc=c("Tair","precip","VPD","H","LE"), | ||
#' filter.growseas=FALSE,filter.precip=TRUE, | ||
#' filter.vars=c("Tair","PPFD","ustar"), | ||
#' filter.vals.min=c(5,200,0.2), | ||
#' filter.vals.max=c(NA,NA,NA),NA.as.invalid=TRUE, | ||
#' quality.ext="_qc",good.quality=c(0,1), | ||
#' missing.qc.as.bad=TRUE,GPP="GPP",doy="doy", | ||
#' year="year",tGPP=0.5,ws=15,min.int=5,precip="precip", | ||
#' tprecip=0.1,precip.hours=24,records.per.hour=2) | ||
#' | ||
#' ## calculate WUE metrics in the filtered periods | ||
#' WUE.metrics(DE_Tha_Jun_2014_2) | ||
#' | ||
#' @importFrom stats median | ||
#' @export | ||
WUE.metrics <- function(data,GPP="GPP",NEE="NEE",LE="LE",VPD="VPD",Tair="Tair", | ||
constants=bigleaf.constants()){ | ||
|
||
check.input(data,list(GPP,NEE,LE,VPD,Tair)) | ||
|
||
ET <- LE.to.ET(LE,Tair) # kg H2O s-1 | ||
GPP <- (GPP/1e06 * constants$Cmol)*1000 # gC m-2 s-1 | ||
NEE <- (NEE/1e06 * constants$Cmol)*1000 # gC m-2 s-1 | ||
|
||
WUE <- median(GPP/ET,na.rm=TRUE) | ||
WUE_NEE <- median(abs(NEE)/ET,na.rm=TRUE) | ||
IWUE <- median((GPP*VPD)/ET,na.rm=TRUE) | ||
uWUE <- median((GPP*sqrt(VPD))/ET,na.rm=TRUE) | ||
|
||
return(c(WUE=WUE,WUE_NEE=WUE_NEE,IWUE=IWUE,uWUE=uWUE)) | ||
} |
Oops, something went wrong.