This package consists of two components:
- A folder with yaml files which encode several soil, vegetation, and ecosystem models in a unified way.
- A python package that can be used (and extended) to run queries against single models or subsets of the encoded models.
The main work has been done by the Theoretical Ecosystem Ecology Group lead by Carlos Sierra, especially by Veronika Ceballos, Holger Metzler and Markus Müller. Many people outside the group have also helped.
We want to thank:
- Volodymyr Saruta for kicking off the work that lead to the docker image support
- To install we recommend using a virtual python environment.
The python3 standard library provides the module venv already, so there is no need for third party
software.
Some distributions do not install it by default
E.g. for ubuntu you have to say:
bash sudo apt-get install python3-venv*
- pandoc newer than 2.06
E.g. for ubuntu-16.04 the version provided by the distribution is too old,
and you have to download the debian package from the pandoc website and install the downloaded file, e.g. by :
bash sudo apt-get install ./pandoc-2.2.1-1-amd64.deb*
(Version numbers will change.)
$ cd ~
$ mkdir test
$ python3 -m venv test
$ source ~/test/bin/activate
From now on python3 and pip commands will operate in this virtual environment and install everything that is needed there.
- Assuming that you just want to use the package and are not going to change any of the packages it depends on you can just type the following commands:
$ pip install -r requirements.freeze
$ python setup.py develop
- You can also run the script
$ ./install.sh
which does the same but installs some additional software that is usefull in connection with the package.
The package depends on other packages which will often be edited and tested at the same time: (testinfrastructure, LAPM, CompartmentalSystems) If you develop those packages it is recommended to install them also in development mode. If you do that for the first time it means to go to run setup.py (or the install script ) in the respective directories of th packages on your system in the following order:
- testinfrastructure,
- LAPM ,
- CompartmentalSystems. After this you can type.
$ pip install -r requirements.developer
$ python setup.py develop
or run the script
$ ./install_developer.sh
which does the same. All the changes you make to the source code of either package will then be immidiately visible in your virtualenv since
$ python setup.py develop
does not copy files to the virtual environment (or any other environment) . It just links them there, so that source code changes take immediate effect in the installed package. No reinstallation after source changes is necessary.
Likely troublemakers are (due to their complex buildprocess) matplotlib ,numpy and scipy. To identify the problems you can also try to install them separately e.g:
pip3 install numpy
on unbuntu building of these python packages requires non python libraries to be installed try:
$ sudo apt-get install libfreetype6-dev
$ sudo apt-get install libffi6 libffi-dev
$ sudo apt-get install libssl-dev
go to the directory of the package (e.g. /path/to/bgc-md/bgc_md/) and run the commandline tool ren
render report_templates/single_model/FlagstaffVegetationTemplate.py -y data/all_records/veg_1.yaml -t output