In order to run \(\omega radlib\), you need to have a Python interpreter installed on your local computer, as well as a number of Python packages (Dependencies). We recommend installing Anaconda as it includes Python, numerous required packages, and other useful tools (e.g. Spyder).

Using Anaconda the installation process is harmonised across platforms. Download and install the latest Anaconda distribution from https://www.anaconda.com/download/ for your specific OS. You might also consider the minimal Miniconda if you do not want to install a full scientific python stack.

The \(\omega radlib\) version on PyPI might lag behind the actual developments. You can use the bleeding edge code from the \(\omega radlib\)repository. Note, however, that you need to make sure yourself that all Dependencies are met (see below).

Although we recommend using the Anaconda Python Environment you can install \(\omega radlib\) from PyPi via pip.

Open a terminal and run:

$ pip install wradlib

Depending on your system you might need to be root (or sudo the above command) for this to work.
pip will then fetch the source distribution from the Python Package Index and run the installation.

Afterwards it will check for any dependencies not met, yet.

Be aware that using pip we can only look for python-module dependencies.
For example the numpy module itself depends on some other libraries, which need to be present in order for the module to compile properly after being downloaded by pip. We have no control over these dependencies and it is rather hard to give a complete overview.

\(\omega radlib\) was not designed to be a self-contained library. Besides extensive use of Numpy and Scipy, \(\omega radlib\) uses additional libraries, which you will need to install before you can use \(\omega radlib\).

Package

min

recommended

numpy

>= 1.6.1

>= 1.14.0

matplotlib

>= 1.5.1

>= 2.1.0

scipy

>= 0.9

>= 1.0.0

h5py

>= 2.0.1

>= 2.7.0

netCDF4

>= 1.0

>= 1.3.0

gdal

>= 1.9

>= 2.2.0

You can check whether the required Dependencies are available on your computer by opening a Python console and enter:

>>> import<package_name>ImportError: No module named <package_name>

This will be the response in case the package is not available.

In case the import is successful, you should also check the version number:

Apart from the obligatory Dependencies, some dependencies in \(\omega radlib\) are optional. This is because the installation of these dependencies can be somewhat tedious while many \(\omega radlib\) users will not need them anyway. In case users use a \(\omega radlib\) function that requires an optional dependency, and this dependency is not satisfied in the local environment, \(\omega radlib\) will raise an exception.

As for now, the following dependencies are defined as optional:

The speedup module

The speedup module is intended as a collection of Fortran code in order to speed up specific \(\omega radlib\) function that are critical for performance.
In order to build the speedup module as a shared library, you need to use f2py (https://sysbio.ioc.ee/projects/f2py2e/). f2py usually ships with numpy and should be available via the command line. To test whether f2py is available on your system, execute f2py on the system console. Or, alternatively, f2py.py. If it is available, you should get a bunch of help instructions. Now change to the \(\omega radlib\) module directory and execute on the system console:

$ f2py.py -c -m speedup speedup.f

Now the speedup module should be available.

xmltodict

We use xmltodict to convert the Rainbow Data Files (which have a metadata XML header) to an ordered dict. It is easily installed with pip:

Depending on your OS and installation method you may encounter different problems. Here are some guidelines for attacking them.

We strongly recommend using the Anaconda conda package and environment manager (see Installation). Using conda-forge we will maintain the wradlib-feedstock for constant availability of recent \(\omega radlib\) versions.

If you can’t use Anaconda/Miniconda, it is generally a good idea to use your systems package manager to install dependencies. This will also take account for other needed bindings, libs etc.

If you encounter problems installing \(\omega radlib\), check on your favorite search engine or create an issue here with details on the problem or send an email on the wradlib-users mailing list.