PyARTS: an ARTS related Python package ====================================== :Author: Cory Davis .. contents:: Introduction ------------ PyARTS is a python package, which has been developed to compliment the Atmospheric Radiative Transfer System - ARTS (http://www.sat.uni-bremen.de/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[FIXME - This should link to another document] :: produces arbitrarily complex multi-phase multi-habit cloud fields for arts simulations. This includes the generation of single scattering properties of non-spherical ice particles and the generation of particle number density fields for given ice and liquid water content fields. *clouds* also provides convenience functions for producing simple 1D and 3D box cloud scenarios. arts (formally called PyARTS) :: contains classes and functions that actually perform ARTS simulations. The ArtsRun class provides general functionality for configuring, performing, and managing the output of ARTS simulations. There are several lower-level modules that, as well as serving the arts and cloud modules, are also useful in their own right: arts_scat :: provides functions and classes for the calculation of single scattering properties of ice and liquid water hydrometeors. arts_types :: artsXML :: arts_math :: What is currently missing. -------------------------- *Gas absorption lookup table generation* Prerequisites ------------- * Python 2.?, (you will probably have this already) * Numeric Python * f2py * scipy-distutils (this comes with f2py) Download -------- The package is available via anonymous cvs from the ARTS web-site. To check out the package, follow the instructions given at http://www.sat.uni-bremen.de/arts/download.php, but give "PyARTS" instead of "arts" as the module name. Installation ------------ once you have all of the above prerequisites installed, `download`_ and unpack the latest source distribution, and run the following from the base directory. python setup.py install --home=~ If you omit the --home argument python will try and install the modules in the standard 3rd party location (something like /usr/lib/python2.2/site-packages), which obviously wont happen unless you have superuser privileges There is a line in setup.py 'include_dirs=' that you will need to change. You need this line if like me, your Numeric package is not installed in the standard place. If Numeric is in the standard place (something like /usr/lib/python2.2/site-packages/Numeric), I think you can delete this line and remove other references to include_dirs. This has only been tested successfully with the g77 fortran compiler. f2py looks for compilers and uses the first one it finds. So if you have more than one Fortran compiler I would set the following environment variable before installing, so that f2py is forced to use g77 export FC_VENDOR=Gnu Once installed you should modify your PYTHONPATH environment variable to include the installation directory. Optional NAG enhancements to the T-matrix code ---------------------------------------------- As in the original T-matrix code by Mishchenko, performance can be significantly improved in some cases by using a optional set of NAG algorithms. This requires a NAG site license. If you have a NAG site-license you should obtain the file ampld2.f, place it in the src directory of the PyARTS distribution, and type export HAVE_NAG=1 before running the setup.py script. Documentation ------------- Most modules in the package have reasonably complete docstring documentation. To view this do the following: /pydoc.py -p 1234 and open http://localhost:1234 in your web browser. There is an arts_scat.py user guide in the doc/ folder of the distribution