What is PyARTS -------------- PyARTS is a python package originally started by Cory Davis , which has been developed to compliment the Atmospheric Radiative Transfer System - ARTS (http://www.sat.ltu.se/arts/). Although ARTS is very flexible software, it's primary function currently is to perform radiative transfer simulations for a given atmospheric state. PyARTS simplifies the process of creating these atmospheric scenarios, and also provides a front-end to the ARTS software for convenient configuration and execution of ARTS radiative transfer calculations. PyARTS includes two high-level modules that provide most of the functionality needed for the preparation and execution of ARTS simulations: clouds and arts. See the documentation of those modules for details. Downloading PyARTS ------------------ I think you have already downloaded PyARTS succesfully, but otherwise, PyARTS is available by svn from the ARTS website http://www.sat.ltu.se/arts/tools. Prerequisites ------------- Note: those are the versions that PyARTS was most recently developed and tested with. It may work with older versions and probably will work with newer versions (possibly with minor changes). * Python 2.6, (you will probably have this already) Should also work with Python 2.7. - Note: PyARTS does not work with Python 3. * A fortran compiler. On Ubuntu, probably the GNU compiler. See note below. * NumPy 1.3.0 (FIXME: test if this is really correct) * SciPY 0.7.2 (FIXME: test if this is really correct) * matplotlib 0.99.3 (FIXME: test if this is really correct) * To build the documentation: docutils (Ubuntu: python-docutils) Installation ------------ Once you have all of the above prerequisites installed, and checked out PyARTS from the svn repository, run the following from the base directory. python setup.py install --user This will install the package in ~/.local/lib and also it will put some required scripts in ~/.local/bin. Some parts of PyARTS are compiled from Fortran code. For those parts, you need to make sure to use the same Fortran compiler as what was used for scipy, numpy, and underlying libraries. To check what Fortran compiler was used: ldd /usr/lib/python2.6/dist-packages/numpy/core/_dotblas.so (or something similar). If this shows a dependency on libgfortran, use python setup.py build --fcompiler=gfortran to build PyARTS. If it shows something else, choose the appropiate compiler from the list to be obtained with python setup.py build --help-fcompiler . Do not try to add the PyARTS svn repository to your PYTHONPATH directly. It won't work. You need to install PyARTS first, because some parts need to be compiled (such as the *tmatrix* module). If you omit the --user argument python will try and install the modules in the standard 3rd party location (something like /usr/lib/python2.6/site-packages), which obviously won't happen unless you have superuser privileges In most cases the install command above will work, however, if it cannot find numpy or scipy, you will need to tell it where to find it: python setup.py build_src build_ext --include-dirs=/include/python install --user Once installed you should make sure that the PATH environment variable includes ~/.local/bin and the ARTS_PATH environment variable points to the arts executable, if this is not in the PATH already. Some functionality requires certain paths to be set. To make sure ARTS can find this, set the environment variable ARTS_XMLDATA_PATH to your arts-xml-data repository and copy the example_config to ~/.PyARTSrc and edit this accordingly. Testing your Installation ------------------------- There are several unit tests in the test/ folder of the distribution. These test both the functionality and the accuracy of the software. To run them all, and check that your installation is OK, from inside the test/ folder type: python testall.py -v If you would like to contribute to PyARTS, which is definitely encouraged, it is strongly recommended that the above command is run, and that all tests are successful, before committing your changes to svn. NOTE: - currently (Nov 2012) the unit TESTS are NOT WORKING (you still can use your PyARTS installation, or at least parts of it)! - some tests have been disabled (19 May 2011) because of significant changes in ARTS since the code was originally written. Examples -------- Some example scripts are provided in the examples/ folder. Most of them should work as they only depend on data provided in the data/ folder. Some fail because of changes in ARTS. The testall.py script described above actually verifies that the examples run without error. Documentation ------------- Most modules in the package have reasonably complete docstring documentation. This means that in an interactive python session, online help on a given PyARTS class or function can be obtained by typing ``help(PyARTS_function_or_class)``. Or, in ipython, ?PyARTS_function_or_class. The docstring documentation can also be viewed in easily navigatable html documents by doing the following: ``/pydoc.py -p 1234`` and open ``http://localhost:1234`` in your web browser. There is a user guide in the doc/ folder of the distribution.