Skip to content

Latest commit

 

History

615 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlantBiophysics

Stable Dev Build Status

PlantBiophysics provides reusable Julia models for leaf light interception, photosynthesis, stomatal conductance, and energy balance. Models implement the PlantSimEngine kernel contract and can be assembled on one leaf or inside larger multi-plant scenes.

Installation

using Pkg
Pkg.add("PlantBiophysics")

One-leaf simulation

using PlantBiophysics, PlantSimEngine, PlantMeteo, Dates

meteo = Atmosphere(
    T=22.0,
    Wind=0.8333,
    P=101.325,
    Rh=0.45,
    duration=Hour(1),
)

scene = leaf_scene(
    Monteith(),
    Fvcb(),
    Medlyn(0.03, 12.0);
    status=Status(
        Ra_SW_f=13.747,
        sky_fraction=1.0,
        aPPFD=1500.0,
        d=0.03,
    ),
    environment=meteo,
)

simulation = run!(scene)
leaf = only(model_objects(scene; scale=:Leaf))
(temperature=leaf.status.Tₗ, assimilation=leaf.status.A)

leaf_scene is a convenience constructor. The returned value is an ordinary PlantSimEngine.CompositeModel, so applications can also be assembled explicitly with Object, ModelSpec, selectors such as One and Many, explicit inputs=, Call dependencies, and every= timestep policies.

PlantBiophysics models preserve generic numeric types, which supports units, automatic differentiation, and uncertainty propagation when the supplied operations support those types. Model parameter types do not implicitly change runtime status carriers: use type_promotion for a general mapping or status_transform for variable-specific conversion.

Development with PlantSimEngine

Until PlantSimEngine 0.15 is released, check out its multi-plants branch wherever you keep development packages, then point the PlantBiophysics environment to that working tree:

pkg> activate .
pkg> develop /path/to/PlantSimEngine
pkg> test

Pkg.develop records the working-tree path only in the local Manifest.toml; the repository does not assume where PlantSimEngine is cloned. Once a compatible PlantSimEngine release is available, run free in each environment where it was developed:

pkg> free PlantSimEngine

The documentation uses the same workflow:

pkg> activate docs
pkg> develop /path/to/PlantSimEngine
pkg> instantiate

Then build it with julia --project=docs docs/make.jl.

Questions

Use the issue tracker or the Virtual Plant Lab forum.

About

A Julia package for computing processes related to plant ecophysiology and biophysics

Resources

Stars

32 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages