Pylbo comes as a ready-to-install Python package, contained in the
post-processing folder of the legolas repository.
It depends on a few standard packages, listed below:
- Numpy, for obvious reasons.
- Matplotlib, for plotting.
- f90nml, to handle reading and writing namelists.
- tqdm, used for progress bars.
- psutil, for management of multiprocessing resources during parallel runs.
Installing as a package (recommended)
This is the recommended installation option. To do so, navigate to the
post-processing folder and execute
setup.py script. This will automatically install the above listed packages as well if they are not already there.
Activate any conda/virtualenv environment beforehand in order to install it there.
cd post-processing python setup.py develop
All of the dependencies listed above will be automatically handled if you run this.
develop argument means that you can pull updates to the package from the upstream repository straight away,
without having to install it again.
Sourcing the folder
Another possibility is adding the folder to your PYTHONPATH. If the above option does not work, i.e. if you can not manage your python environment for some reason, this is a valid alternative.
.bashrc or similar, we assume that you have already set the
$LEGOLASDIR environment variable
Control panel >
Edit the system environment variables > tab
Create or edit the PYTHONPATH environment variable and add the full path to the
Multiple paths are separated by a semicolon