You can either install Iris using the conda package manager or from source.
To install Iris using conda, you must first download and install conda, for example from http://conda.pydata.org/miniconda.html.
Once conda is installed, you can install Iris using conda on any platform with the following command:
conda install -c scitools iris
If you wish to run any of the code examples (see http://scitools.org.uk/iris/docs/latest/examples/index.html) you will also need the Iris sample data. This can also be installed using conda:
conda install -c scitools iris_sample_data
Further documentation on using conda and the features it provides can be found at http://conda.pydata.org/docs/intro.html.
The latest Iris source release is available from https://github.com/SciTools/iris.
Iris makes use of a range of other libraries and python modules. These dependencies must be in place before you can successfully install Iris. Once you have satisfied the requirements detailed below, extract the iris source package, cd to the new directory, and enter:
python setup.py install
We strongly encourage people to contribute to Iris and for this type of development activity an in-place build can be useful. Once you’ve cloned the Iris git repository you can perform an in-place build by entering:
python setup.py std_names python setup.py build_ext --inplace
Details of other setup.py options and commands can be found by entering:
python setup.py --help
python setup.py --help-commands
These are external packages which you will need to have installed before installing and running Iris.
Many of these packages are available in Linux package managers such as aptitude and yum. For example, it may be possible to install Numpy using:
apt-get install python-numpy
If you are installing dependencies with a package manager on Linux, you may need to install the development packages (look for a “-dev” postfix) in addition to the core packages.
These are optional packages which you may want to install to enable additonal Iris functionality such as plotting and loading/saving GRIB. These packages are required for the full Iris test suite to run.
The libmo_unpack library can be used by Iris for decoding/unpacking PP files or Fields files that use an lbpack value of 1 or 4. This library is open source, licensed under the 2-clause BSD licence. It can be obtained from http://puma.nerc.ac.uk/trac/UM_TOOLS/wiki/unpack.
Use of this library is not enabled by default. If this library is available its use can be enabled by installing Iris with the following command:
python setup.py --with-unpack install
Note that if this library and/or its associated header files are installed in a custom location then additional compiler arguments may need to be passed in to ensure that the Python extension module linking against it builds correctly:
python setup.py --with-unpack build_ext -I <custom include dir> \ -L <custom link-time libdir> -R <custom runtime libdir> install
The default site configuration values can be overridden by creating the file iris/etc/site.cfg. For example, the following snippet can be used to specify a non-standard location for your udunits library:
[System] udunits2_path = /path/to/libudunits2.so
An example configuration file is available in iris/etc/site.cfg.template. See iris.config() for further configuration options.