PROSPECT, SAIL and PROSAIL Python wrappers
This repository contains the Python bindings to the PROSPECT and SAIL leaf and canopy reflectance models. The code is written in FORTRAN. The original fortran code was downloaded from Jussieu. I only added a function to simplify writing the wrappers, and you should go to that page to get newer versions of the code. A recent review of the use of both models is availabe in this paper_.
The installation of the bindings is quite straightforward: unpack the distribution and run the following command
python setup.py install
You can usually install it to your user’s directory (if you haven’t got superuser privileges) by
python setup.py install --user
You will need a working FORTRAN compiler. I have only tested this with GCC on Linux, but it should work on other systems. You can also pass optimisation flags to the compiler:
python setup.py config_fc --fcompiler=gnu95 --arch=-march=native --opt=-O3 install --user
The bindings offer several functions, which will be described in detail below:.
The parameters used by the models and their units are introduced below:
|Parameter||Description of parameter||Units||Typical min||Typical max|
|N||Leaf structure parameter||N/A||0.8||2.5|
|cab||Chlorophyll a+b concentration||ug/cm2||0||80|
|caw||Equivalent water thickiness||cm||0||200|
|cm||Dry matter content||g/cm2||0||200|
|lai||Leaf Area Index||N/A||0||10|
|lidfa||Leaf angle distribution||N/A|
|lidfb||Leaf angle distribution||N/A|
|psoil||Dry/Wet soil factor||N/A||0||1|
|rsoil||Soil brigthness factor||N/A|
|tts||Solar zenith angle||deg||0||90|
|tto||Observer zenith angle||deg||0||90|
|phi||Relative azimuth angle||deg||0||360|
|typelidf||Leaf angle distribution type||Integer|
The parameter typelidf regulates the leaf angle distribution family being used. The following options are understood:
The soil model is a fairly simple linear mixture model, where two spectra are mixed and then a brightness term added:
rho_soil = rsoil*(psoil*soil_spectrum1+(1-psoil)*soil_spectrum2)
The idea is that one of the spectra is a dry soil and the other a wet soil, so soil moisture is then contorlled by psoil. rsoil is just a brightness scaling term.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|prosail-1.2.2.linux-x86_64.tar.gz (193.2 kB) Copy SHA256 Checksum SHA256||2.7||Dumb Binary||Feb 22, 2016|
|prosail-1.2.2.tar.gz (64.2 kB) Copy SHA256 Checksum SHA256||–||Source||Feb 22, 2016|