Learn R Programming

tealeaves (version 1.0.6)

.get_Pa: P_a: density of dry air (g / m^3)

Description

P_a: density of dry air (g / m^3)

Usage

.get_Pa(T_leaf, pars, unitless)

Value

Value in g / m\(^3\) of class units

Arguments

T_leaf

Leaf temperature in Kelvin

pars

Concatenated parameters (leaf_par, enviro_par, and constants)

unitless

Logical. Should function use parameters with units? The function is faster when FALSE, but input must be in correct units or else results will be incorrect without any warning.

Details

$$P_\mathrm{a} = P / (R_\mathrm{air} (T_\mathrm{leaf} - T_\mathrm{air}) / 2)$$

SymbolRDescriptionUnitsDefault
\(P\)Patmospheric pressurekPa101.3246
\(R_\mathrm{air}\)R_airspecific gas constant for dry airJ / (kg K)287.058
\(T_\mathrm{air}\)T_airair temperatureK298.15
\(T_\mathrm{leaf}\)T_leafleaf temperatureKinput

Examples

Run this code

library(tealeaves)

cs <- make_constants()
ep <- make_enviropar()
lp <- make_leafpar()

T_leaf <- set_units(298.15, K)

tealeaves:::.get_Pa(T_leaf, c(cs, ep, lp), FALSE)

Run the code above in your browser using DataLab