Description Usage Arguments Value Author(s) Examples
This function constructs a vector of water potentials at stem base for every timestep [in m H2O]
1 2 |
ARi |
Description: the fine root surface area distributed in soil layer i [in m2]; Structure: A vector of values with length number of soil layers, representative of the studied plant |
k |
Description: Plant specific total soil-to-root conductance at each specific soil layer [in s-1]; Structure: A vector - results from the function SoilRootCond - and has n elements corresponding to the number of soil layers |
PSIs |
Description: Soil water potential at the each specific soil layer [in m]; Structure: A vector of n element, where n corresponds to the number of soil layers; Note: The water potentials per soil layer is currently considered static in time |
SF |
Description: Instantaneous sap flow over time [in m3 s-1]; Structure: A vector of n elements, where n corresponds to the number of timesteps |
t |
Description: Cumulative time steps [in s]; Structure: A vector |
Z |
Description: A vector of Soil depth [in m]; Structure: A discrete vector of n elements, where n corresponds to the number of soil layers |
A vector of water potential at stem base for every timestep [in m H2O]
Hannes De Deurwaerder, Marco D. Visser, Matteo Detto, Pascal Boeckx, Felicien Meunier and Hans Verbeeck
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## The function is currently defined as
function (ARi = NULL, k = NULL, PSIs = NULL, SF = NULL,
t = NULL, Z = NUL){
PSI0vec=rep(NA,length(t))
for (a in 1:length(t)){
# Water potential at stem base
PSI0 <- (sum(k*ARi*(PSIs-Z)) - SF[a])/ sum(k*ARi)
RWU0 <- k*ARi*(PSIs-Z - PSI0)
# make sure no negative RWU flows occurs
not.use <- which(RWU0<0)
RWU <- RWU0
while (sum(not.use)>0){
not.use <- which(RWU<0)
RWU[not.use] <- 0
use <- which(RWU>0)
ARiuse = ARi[use]
kuse = k[use]
Zuse = Z[use]
PSIsuse = PSIs[use]
PSI0 <- (sum(kuse*ARiuse*(PSIsuse-Zuse)) - SF[a]) / sum(kuse*ARiuse)
RWU[use] <- kuse*ARiuse*(PSIsuse-Zuse - PSI0)
}
# assign PSI0 of one time point to the vector of PSI
# at stem base
PSI0vec[a] <- PSI0
}
return(PSI0vec)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.