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.
Combine photosynthesis, stomatal conductance, and energy balance in Julia. Fit parameters to measurements and run models from one leaf to whole plants.

Fit a model to leaf measurements, then explore how individual leaves contribute to the exchanges of a whole plant.
Estimate photosynthetic capacities from gas-exchange measurements and compare the fitted response with the observations.
Try the fitting example →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 →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.
In the Julia REPL, press ] to enter package mode, then install the packages used in the examples:
pkg> add PlantBiophysics PlantSimEngine PlantMeteo DataFramesPress Backspace to return to the Julia prompt.
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.
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ₛ)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⁻¹).
First simulation: understand each step.
Several time steps: use changing weather and collect a table of results.
Models: choose equations and parameters.
Model evaluation: compare simulations with measurements.
Whole-plant simulation: apply models to organs.
Implement a model: add your own equations.
API reference: look up individual functions.