PSI0calc: Calculate the water potential at the stem base of a plant...

Description Usage Arguments Value Author(s) Examples

Description

This function constructs a vector of water potentials at stem base for every timestep [in m H2O]

Usage

1
2
 PSI0calc(ARi = NULL, k = NULL, PSIs = NULL, SF=NULL, 
t = NULL, Z = NULL)

Arguments

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

Value

A vector of water potential at stem base for every timestep [in m H2O]

Author(s)

Hannes De Deurwaerder, Marco D. Visser, Matteo Detto, Pascal Boeckx, Felicien Meunier and Hans Verbeeck

Examples

 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
## 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
          use <- which(RWU0<0)
          RWU <- RWU0
          while (sum(use)>0){
              index <- which(RWU == min(RWU))
              RWU[index] <- 0
              use <- which(RWU>0)
              PSI0 <- (sum(k[use]*ARi[use]*(PSIs[use]-Z[use])) 
                        - SF[a]) / sum(k[use]*ARi[use])
              RWU[use] <- k[use]*ARi[use]*(PSIs[use]-Z[use] - PSI0)
              use <- which(RWU<0)
          }
          # assign PSI0 of one time point to the vector of PSI 
          # at stem base
          PSI0vec[a] <- PSI0
        }
      return(PSI0vec)
}

HannesDeDeurwaerder/iSWIFT documentation built on Dec. 17, 2021, 10:29 p.m.