The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
In some cases, users may not wish to provide a parameter value, but rather have a value calculated based on other parameters. Currently, the only parameters that can be provided as functions are:
nu_constant
in constants()
sh_constant
in constants()
T_sky
in enviro_par()
I plan to make more of these in the future, but I’ll briefly
demonstrate how one would change the T_sky
function. The
default function from Okajima et al.
(2012), which was hard-coded in versions 1.0.0 and 1.0.1, is:
library(tealeaves)
#> Loading required package: units
#> udunits database from /usr/share/xml/udunits/udunits2.xml
leaf_par <- make_leafpar() # leaf parameters
enviro_par <- make_enviropar() # environmental parameters
constants <- make_constants() # physical constants
enviro_par$T_sky
#> function (pars)
#> {
#> pars$T_air - set_units(20, K) * pars$S_sw/set_units(1000,
#> W/m^2)
#> }
#> <bytecode: 0x5585efdfe3b0>
#> <environment: 0x5585efdfd8c0>
Let’s change it simply be the air temperature (T_air
).
The current requirements for this function as of version 1.0.2 are:
pars
as the only argument, where
pars
is the concatenated set of leaf
(leaf_par()
) and environmental parameters
(enviro_par()
)T_sky
in units K. You can ensure this by
using units::set_units(., K)
enviro_par <- make_enviropar(
replace = list(T_sky = function(pars) {pars$T_air})
)
enviro_par$T_sky
#> function (pars)
#> {
#> pars$T_air
#> }
T_leaf <- tleaf(leaf_par, enviro_par, constants, quiet = TRUE)
knitr::kable(T_leaf)
T_leaf | value | convergence | R_abs | S_r | H | L | E | Ar | Gr | Re | g_bw |
---|---|---|---|---|---|---|---|---|---|---|---|
302.7549 [K] | 0 | 0 | 1469.209 [W/m^2] | 924.1651 [W/m^2] | 151.0922 [W/m^2] | 393.9514 [W/m^2] | 0.008996103 [mol/m^2/s] | 0.0062368 | 1010434 | 12728.37 | 0.0297597 |
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.