XPalm
A process-based model for simulating oil palm (Elaeis guineensis) growth and development.
https://github.com/palmstudio/xpalm.jl
Category: Consumption
Sub Category: Agriculture and Nutrition
Keywords from Contributors
plants
Last synced: about 4 hours ago
JSON representation
Repository metadata
A crop model for Oil Palm
- Host: GitHub
- URL: https://github.com/palmstudio/xpalm.jl
- Owner: PalmStudio
- License: mit
- Created: 2022-05-24T08:31:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-13T01:12:57.000Z (about 1 month ago)
- Last Synced: 2026-01-08T07:21:22.240Z (7 days ago)
- Language: Julia
- Homepage: https://palmstudio.github.io/XPalm.jl/dev/
- Size: 7.31 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 48
- Releases: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
README.md
XPalm - Growth and yield model for oil palm
Overview
XPalm is a process-based model for simulating oil palm (Elaeis guineensis) growth and development. The model simulates key physiological processes including:
- Phenology and development
- Carbon assimilation and allocation
- Water balance
- Reproductive organ development
- Yield components
Figure 1. Simplified diagram of the component models used in XPalm. The numbering is associated to the computational flow, from the first models to execute to the last.
XPalm implements a multiscale approach, modeling processes at different organizational levels:
Scene: Environment and canopy-level processes
Plant: Whole palm processes
Phytomer: Individual growth unit processes
Organ: Leaf, internode and reproductive organ processes
The model uses a daily time step and requires standard meteorological inputs (temperature, radiation, rainfall...).
The model also includes a submodule VPalm to design palm tree mockups from a set of architectural parameters and allometric equations. It is designed to integrate smoothly with the physiological models from the package.
The model is implemented in the Julia programming language, which is a high-level, high-performance dynamic programming language for technical computing.
Example outputs
Here are some example outputs from the model, showing the evolution of variables at different scales:
Scene level:
Leaf area index (LAI) at the scene level over time:

Plant level:
Maintenance respiration (Rm), absorbed PPFD (aPPFD), biomass of bunches harvested, and leaf area at the plant level over time:

Leaf level:
Leaf area at the level of the individual leaf over time:

Soil level:
Fraction of transpirable soil water (FTSW) over time:

Installation
Install XPalm using Julia's package manager, typing ] in the Julia REPL (i.e. the console) to enter the Pkg REPL mode and then typing:
pkg> add XPalm
To use the package, type the following in the Julia REPL:
using XPalm
Quick Start
From the Julia REPL, load the package:
using XPalm
The easiest way of running the model
The easiest way to run the model is to use the template notebook provided by the package. To run the notebook, you need to install the Pluto package first by running ] add Pluto. Then, you can run the notebook using the following commands in the Julia REPL:
using Pluto, XPalm
XPalm.notebook("xpalm_notebook.jl")
This command will create a new Pluto notebook (named "xpalm_notebook.jl") in the current directory, and open it automatically for you.
Once closed, you can re-open this notebook by running the same command again. If the file already exists, it will be opened automatically.
Programmatically running the model
Basic simulation
Run a simple simulation using default parameters and meteorological data:
using XPalm, CSV, DataFrames
# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
# Run simulation
df = xpalm(meteo, DataFrame;
vars = Dict("Scene" => (:lai,)), # Request LAI as output
)
!!! note
You need to install the CSV and DataFrames packages to run the example above. You can install them by running ] add CSV DataFrames.
Advanced Usage
Customize palm parameters and request multiple outputs:
# Read the parameters from a YAML file (provided in the example folder of the package).
using YAML
parameters = YAML.load_file(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.yml"))
# Load example meteorological data
meteo = CSV.read(joinpath(dirname(dirname(pathof(XPalm))), "0-data/meteo.csv"), DataFrame)
# Create palm with custom parameters
p = XPalm.Palm(parameters=parameters)
# Run simulation with multiple outputs
results = xpalm(
meteo,
DataFrame,
vars = Dict(
"Scene" => (:lai,),
"Plant" => (:leaf_area, :biomass_bunch_harvested),
"Soil" => (:ftsw,)
),
palm = p,
)
You can also import the parameters from a JSON file using the JSON package:
using JSON # You first need to install the JSON package by running `] add JSON`
params = open(joinpath(dirname(dirname(pathof(XPalm))), "examples/xpalm_parameters.json"), "r") do io
JSON.parse(io; dicttype=Dict{String,Any}, inttype=Int64)
end
!!! note
The configuration file must contain all the parameters required by the model. Template files are available from the examples folder.
Importing the models
The models are available from the Models submodule. To import all models, you can use the following command:
using XPalm
using XPalm.Models
More examples
The package provides an example script in the examples folder. To run it, you first have to place your working directory inside the folder, and then activate its environement by running ] activate ..
You can also find example applications in the Xpalm applications Github repository.
VPalm
The package also includes a submodule VPalm that is an automaton that builds 3d mockups of palm plants from architectural parameters and allometric equations. It also integrates a biomechanical model to compute the leaf bending and torsion using the biomass of each leaf.
You can run VPalm simply by loading the submodule. Here is an example to load VPalm default parameters and build a palm tree with a multiscale architecture defined using the Multiscale Tree Graph format (MTG).
using XPalm
using XPalm.VPalm
using PlantGeom, CairoMakie
# Load example parameters
file = joinpath(dirname(dirname(pathof(XPalm))), "test", "references", "vpalm-parameter_file.yml")
parameters = read_parameters(file)
mtg = build_mockup(parameters)
plantviz(mtg, color = :green)

To reproduce the image above, you can use the following code snippet. It will create a mockup of a palm plant with colored segments based on their type.
using XPalm
using XPalm.VPalm
using PlantGeom, CairoMakie
file = joinpath(dirname(dirname(pathof(XPalm))), "test", "references", "vpalm-parameter_file.yml")
parameters = read_parameters(file)
mtg = build_mockup(parameters; merge_scale=:leaflet)
traverse!(mtg) do node
if symbol(node) == "Petiole"
petiole_and_rachis_segments = descendants(node, symbol=["PetioleSegment", "RachisSegment"])
colormap = cgrad([colorant"peachpuff4", colorant"blanchedalmond"], length(petiole_and_rachis_segments), scale=:log2)
for (i, seg) in enumerate(petiole_and_rachis_segments)
seg[:color_type] = colormap[i]
end
elseif symbol(node) == "Leaflet"
node[:color_type] = :mediumseagreen
elseif symbol(node) == "Leaf" # This will color the snags
node[:color_type] = :peachpuff4
end
end
f, ax, p = plantviz(mtg, color=:color_type)
save("palm_mockup.png", f, size=(1200, 800), px_per_unit=3, update=false)
Note that the MTG is built with the following scales: ["Plant", "Stem", "Phytomer", "Internode", "Leaf", "Petiole", "PetioleSegment", "Rachis", "RachisSegment", "Leaflet", "LeafletSegment"].
Funding
This work is supported by the PalmStudio research project, funded by the SMART Research Institute and CIRAD.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: 'XPalm.jl : A model for Oil Palm '
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- orcid: 'https://orcid.org/0000-0002-0808-1461'
given-names: Rémi
family-names: Vezy
email: remi.vezy@cirad.fr
affiliation: CIRAD
- given-names: Raphael
name-particle: P.A.
family-names: Perez
email: raphael.perez@cirad.fr
affiliation: CIRAD
orcid: 'https://orcid.org/0000-0001-5270-9212'
- given-names: Thomas
family-names: Arsouze
email: thomas.arsouze@cirad.fr
affiliation: CIRAD
orcid: 'https://orcid.org/0000-0002-8871-6120'
- given-names: Jean
family-names: Dauzat
affiliation: CIRAD
identifiers:
- type: swh
value: 'swh:1:dir:a92b3660e4387b5ffc4a915c849bea7c0808b199'
repository-code: 'https://github.com/PalmStudio/XPalm.jl'
url: 'https://palmstudio.github.io/XPalm.jl/stable/'
abstract: >-
XPalm is a process-based model for simulating oil palm
(Elaeis guineensis) growth and development. The model
simulates key physiological processes at different
organizational levels, using a multiscale approach.
keywords:
- FSPM
- Oil Palm
- Elaeis guineensis
- Modeling
- Growth
- Development
- Julia language
license: MIT
commit: f5842c4ea02aafa48443311f46a82a0c3fcba32a
version: 0.3.3
date-released: '2025-06-04'
Owner metadata
- Name: PalmStudio research project
- Login: PalmStudio
- Email:
- Kind: organization
- Description: Oil Palm modelling
- Website: https://palmstudio.github.io/
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/59010813?v=4
- Repositories: 3
- Last ynced at: 2023-03-02T09:47:25.520Z
- Profile URL: https://github.com/PalmStudio
GitHub Events
Total
- Create event: 30
- Commit comment event: 28
- Release event: 6
- Issues event: 49
- Watch event: 4
- Delete event: 19
- Member event: 1
- Issue comment event: 28
- Push event: 227
- Pull request review comment event: 1
- Pull request review event: 8
- Pull request event: 38
Last Year
- Create event: 20
- Commit comment event: 28
- Release event: 6
- Issues event: 30
- Watch event: 3
- Delete event: 11
- Member event: 1
- Issue comment event: 19
- Push event: 126
- Pull request review comment event: 1
- Pull request review event: 8
- Pull request event: 23
Committers metadata
Last synced: 3 days ago
Total Commits: 467
Total Committers: 7
Avg Commits per committer: 66.714
Development Distribution Score (DDS): 0.139
Commits in past year: 141
Committers in past year: 6
Avg Commits per committer in past year: 23.5
Development Distribution Score (DDS) in past year: 0.213
| Name | Commits | |
|---|---|---|
| Rémi Vezy | V****Y | 402 |
| raphael perez | r****z@c****r | 34 |
| thomasarsouze | t****e@z****m | 12 |
| github-actions[bot] | 4****] | 8 |
| Samuel-AMAP | s****n@c****r | 7 |
| dependabot[bot] | 4****] | 2 |
| CompatHelper Julia | c****y@j****g | 2 |
Committer domains:
- cirad.fr: 2
- julialang.org: 1
- zoho.com: 1
Issue and Pull Request metadata
Last synced: about 1 month ago
Total issues: 61
Total pull requests: 46
Average time to close issues: about 1 month
Average time to close pull requests: about 1 month
Total issue authors: 6
Total pull request authors: 5
Average comments per issue: 0.2
Average comments per pull request: 0.15
Merged pull request: 32
Bot issues: 0
Bot pull requests: 12
Past year issues: 45
Past year pull requests: 34
Past year average time to close issues: 3 days
Past year average time to close pull requests: 6 days
Past year issue authors: 6
Past year pull request authors: 5
Past year average comments per issue: 0.16
Past year average comments per pull request: 0.15
Past year merged pull request: 20
Past year bot issues: 0
Past year bot pull requests: 10
Top Issue Authors
- VEZY (48)
- Samuel-amap (4)
- thomasarsouze (4)
- rpaperez (2)
- lailanhabibah (2)
- JuliaTagBot (1)
Top Pull Request Authors
- VEZY (24)
- github-actions[bot] (8)
- Samuel-amap (6)
- dependabot[bot] (4)
- thomasarsouze (4)
Top Issue Labels
- VPalm (6)
- hypothesis (1)
- enhancement (1)
- documentation (1)
Top Pull Request Labels
- dependencies (4)
- github_actions (2)
Package metadata
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
juliahub.com: XPalm
A crop model for Oil Palm
- Homepage: https://palmstudio.github.io/XPalm.jl/dev/
- Documentation: https://docs.juliahub.com/General/XPalm/stable/
- Licenses: MIT
- Latest release: 0.5.0 (published 7 months ago)
- Last Synced: 2026-01-11T13:36:29.190Z (3 days ago)
- Versions: 9
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 8.429%
- Average: 22.378%
- Dependent packages count: 36.328%
Dependencies
- actions/checkout v2 composite
- codecov/codecov-action v2 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
Score: -Infinity