Skip to content

openalea/PyRATP

Repository files navigation

PyRATP

Docs Build Status Python Version License Anaconda-Server Badge

Software

Authors

  • Herve Sinoquet
  • Marc Saudreau
  • Jerome Ngao
  • Boris Adam
  • Christophe Pradal
  • Christian Fournier
  • Fabrice Bauget

Description

RATP: Radiation Absorption, Transpiration and Photosynthesis

Status

Python package

License

CecILL-C URL : https://pyratp.rtfd.io

Dependencies

  • meson-python
  • numpy
  • pandas
  • scipy
  • openalea.plantgl
  • openalea.mtg
  • QtPy

Modifications

  • 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

Installation

for user

  1. Install Miniforge: https://github.com/conda-forge/miniforge
  2. Create a conda environment:
mamba create -n pyratp openalea.ratp -c conda-forge -c openalea3
  1. 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/rc

The rc channel corresponds to the latest build of PyRatp when the main channel is the stable release.

For developpers

Editable install with conda/environment.yml is not functionning because of namespace conflict. A workaround is as follow:

  1. download the repository and change to the root directory:
   git clone https://github.com/openalea/PyRATP.git
   cd PyRATP
  1. 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 openalea.mtg
  1. activate the environment: mamba activate pyratp

  2. Build the fortran library:

meson setup builddir
meson compile -C builddir
cp builddir/src/openalea/ratp/pyratp.cpython-31*.so src/openalea/ratp
  1. modify the Python path: via the environment variable
export PYTHONPATH="$PWD/src":$PYTHONPATH

or

add the path to src in your ipython or in IDE with:

import sys; sys.path.extend([mypath to 'src'])

with mypath to 'src' the absolute path to 'PyRatp/src'

About

RATP: Radiation Absorption, Transpiration and Photosynthesis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •