- Herve Sinoquet
- Marc Saudreau
- Jerome Ngao
- Boris Adam
- Christophe Pradal
- Christian Fournier
- Fabrice Bauget
RATP: Radiation Absorption, Transpiration and Photosynthesis
Python package
CecILL-C URL : https://pyratp.rtfd.io
- meson-python
- numpy
- pandas
- scipy
- openalea.plantgl
- openalea.mtg
- QtPy
- Installation with make: it compiles fortran part with f2py then installs the package with setuptools and pip
- Compute transmitted radiation for each voxel
- Intercepted and transmitted radiation among the output results
- leaf angle distribution for each voxel
- Local or solar hour option for computing sun position
- Possibility for external use of the sun computation routine
- Install Miniforge: https://github.com/conda-forge/miniforge
- Create a conda environment:
mamba create -n pyratp openalea.ratp -c conda-forge -c openalea3- activate the environment:
mamba activate pyratp
The user has the possibility to install the package from a candicate release channel of the conda repository of openalea as follows:
mamba create -n pyratp openalea.ratp -c conda-forge -c openalea3/label/rcThe rc channel corresponds to the latest build of PyRatp when the main channel is the stable release.
Editable install with conda/environment.yml is not functionning because of namespace conflict. A workaround is as follow:
- download the repository and change to the root directory:
git clone https://github.com/openalea/PyRATP.git
cd PyRATP- Create a conda environment with dependencies manually with:
mamba create -n pyratp -c openalea3 -c conda-forge openalea.plantgl openalea.mtg qtpy compilers meson-python gfortran scipy pytest jupyter-
activate the environment:
mamba activate pyratp -
Build the fortran library:
meson setup builddir
meson compile -C builddir
cp builddir/src/openalea/ratp/pyratp.cpython-31*.so src/openalea/ratp- modify the Python path: via the environment variable
export PYTHONPATH="$PWD/src":$PYTHONPATHEditable install with conda/environment.yml is not functionning because of namespace conflict. A workaround is as follow:
- download the repository and change to the root directory:
git clone https://github.com/openalea/PyRATP.git
cd PyRATP- Create a conda environment with dependencies manually:
Using MAC and Linux:
mamba create -n pyratp_dev -c conda-forge -c openalea3 openalea.plantgl openalea.mtg qtpy compilers meson-python scipy pytest jupyterUsing Windows:
mamba create -n pyratp_dev -c conda-forge -c openalea3 openalea.plantgl openalea.mtg qtpy m2w64-toolchain meson-python scipy pytest gfortran jupyter-
activate the environment:
mamba activate pyratp_dev -
Compile everything:
pip install ."[test]"and after each modification of the python or Fortran part, run
pip install .then restart your kernel (when using IPython) for your modifications to be taken into account.
- Have a look at the notebooks and scripts in
example/!