Authors : Maurane Woussen, Romain Barillot, Didier Combes, Gaëtan Louarn
Institutes : INRAE
Status : Python package
License : Cecill-C
URL : https://github.com/openalea-incubator/plantfusion
Documentation : https://plantfusion.readthedocs.io/en/latest/
This package provides an API for modelling mixing crops involving several functional-structural plant models (FSPM). Its aim is to simplify the building of such simulations. It takes place through the MobiDiv research project, especially in the modelling of mixed crops with wheat and alfafa.
Currently, this API recognizes two FSPM, CN-Wheat and l-egume.
Main packages used for the simulations:
- CN-Wheat: wheat modelling
- l-egume: legume modelling
- CARIBU: light modelling through surfacic meshes*
- PyRATP: light modelling through volumic meshes
- RiRi5: compact version of RATP
- LightVegeManager: Tool for managing lighting for plant modelling
- soil3ds
Their dependencies:
- openalea.mtg
- openalea.plantgl
- openalea.lpy
- Adel wheat
- numpy
- pandas
- scipy
- gcc
- gfortran
- make
We use conda for managing our python environment.
Note: git
commands must be run in a git bash terminal (or linux terminal) and python
, conda
, mamba
, in a powershell terminal (or linux terminal).
- Recommended step: install mamba in your
base
conda environment:
conda install mamba
- Create your conda environment (replace conda with mamba if installed):
conda create -n myenvname openalea.mtg openalea.plantgl openalea.deploy openalea.lpy openalea.sconsx alinea.caribu alinea.astk numpy=1.22.4 pandas pytest sphinx sphinx-rtd-theme xlrd coverage nose statsmodels scipy=1.7.3 scons zipp=3.15.0 m2w64-gcc-fortran -c conda-forge -c openalea3
- Convert CARIBU and Astk namespace in PEP 420. This step is required for installing other packages in the
alinea
namespace. To do so, you need to delete the__init__.py
file in thealinea
folder. For example, on a Windows computer, you could use this command:
del C:\Users\username\AppData\Local\miniconda3\envs\myenvname\Lib\site-packages\alinea.astk-2.3.2-py3.9.egg\alinea\__init__.py
del C:\Users\username\AppData\Local\miniconda3\envs\myenvname\Lib\site-packages\alinea.caribu-8.0.10-py3.9-win-amd64.egg\alinea\__init__.py
/!\ For all the following steps, run the commands inside the downloaded folders (commands after git clone
).
-
Installation of Adel
-
git clone -b python3 https://github.com/rbarillot/adel
-
Convert the namespace package to PEP 420:
-
Delete the
__init__.py
in alinea folderdel src/alinea/__init__.py
-
Replace the
setup.py
withsetup_adel.py
inplantfusion/installation_ressources
. Rename itsetup.py
.
-
-
Installation :
python setup.py develop
-
-
Installation of PyRATP. For this step, you need to have
gcc
,gfortran
andmake
installed-
Download the package:
git clone -b update_mobidiv https://github.com/mwoussen/PyRATP
-
Installation:
make mode=develop make clean
Note:
make
will compile the fortran part, then run the package installation with pip. -
-
Installation of WheatFspm
-
Create a WheatFspm folder and copy the
clone_wheatfspm.sh
andsetup_wheatfspm.py
files in it. -
Run
clone_wheatfspm.sh
in a git bash terminal. This step will download all the wheatfspm submodules. -
Rename
setup_wheatfspm.py
tosetup.py
and install the package withpython setup.py develop
-
-
Installation of l-egume
-
Download the package:
git clone -b Develop https://github.com/glouarn/l-egume
-
Install:
python setup.py develop
-
-
Installation of LightVegeManager
-
Download the package:
git clone https://github.com/mwoussen/lightvegemanager
-
Install:
python setup.py develop
-
-
Installation of soil3ds
-
Download the package:
git clone https://github.com/glouarn/soil3ds
-
Install:
python setup.py develop
-
-
Installation of riri5
-
Download the package:
git clone https://github.com/glouarn/riri5
-
Install:
python setup.py develop
-
- copy of l-egume default simulation with the API
- copy of fspmwheat default simulation with the API
- compare l-egume default with l-egume + RATP
- compare l-egume default with l-egume + CARIBU
- compare fspmwheat default with fspmwheat + RATP
- soil coupling fspmwheat + soil3ds
- light coupling l-egume + fspmwheat + CARIBU
- full coupling l-egume + fspmwheat + CARIBU + soil3ds
In your conda environment run one the simulation scripts in simulations
:
python simulations/simulation_name.py
This project is licensed under the CeCILL-C License - see file LICENSE for details