PlantBiophysics.jlPlantBiophysics.jl

PlantBiophysics.jlSimulate plant carbon, water, and heat exchanges

Combine photosynthesis, stomatal conductance, and energy balance in Julia. Fit parameters to measurements and run models from one leaf to whole plants.

PlantBiophysics.jl

From measurements to whole plants​#

Fit a model to leaf measurements, then explore how individual leaves contribute to the exchanges of a whole plant.

Measured net CO2 assimilation and the fitted photosynthesis response to intercellular CO2 concentration.
Fit photosynthesis to measurements

Estimate photosynthetic capacities from gas-exchange measurements and compare the fitted response with the observations.

Try the fitting example →
See what you can do

You can simulate whole-plant fluxes in 3D. Colours show net CO₂ uptake in a young oil palm under three chamber scenarios. An animation from our presentation at the FSPM 2023 conference.

Explore the 3D simulation →

Your first leaf simulation​#

PlantBiophysics is a Julia package for simulating photosynthesis, stomatal conductance, leaf temperature, and exchanges of heat and water. It also provides simple canopy light-interception models.

The models run together through PlantSimEngine and can be applied to one leaf, several organs, or a whole plant.

If you are new to the package, the Design page introduces processes, models, parameters, and simulation inputs.

Installation​#

In the Julia REPL, press ] to enter package mode, then install the packages used in the examples:

text
pkg> add PlantBiophysics PlantSimEngine PlantMeteo DataFrames

Press Backspace to return to the Julia prompt.

Quick Start​#

This example combines an energy-balance model (Monteith), a photosynthesis model (Fvcb), and a stomatal-conductance model (Medlyn) for one leaf. The input values are illustrative.

julia
using PlantBiophysics, PlantSimEngine, PlantMeteo, Dates, DataFrames

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

scene = CompositeModel(
    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; outputs=:all)
outs = collect_outputs(simulation; sink=DataFrame) |> unstack |> first
(Tₗ=outs.Tₗ, A=outs.A, Gₛ=outs.Gₛ)
(Tₗ = 18.003618476920586, A = 32.010730315098684, Gₛ = 1.3459773860136361)

CompositeModel sets up the simulation by combining the models, leaf inputs, and weather. run! calculates their results, and collect_outputs retrieves the saved values as a table. The values shown are leaf temperature (Tₗ, °C), net CO₂ assimilation (A, µmol CO₂ m⁻² s⁻¹), and stomatal conductance to CO₂ (Gₛ, mol CO₂ m⁻² s⁻¹).

Next Steps​#