PyARTS: an ARTS related Python package ====================================== :Author: Cory Davis .. contents:: Package Contents ------------------ It is now planned to provide the T-matrix tool as part of a broader package of ARTS related Python modules: PyARTS. The main priority remains the T-matrix single scattering property generation module (arts\_scat.py), but its functionality will be increased with the inclusion of other modules which enable (for example): * the generation of ARTS particle number density (PND) files, which define the cloud field in ARTS simulations. * the creation of "artificial" particle types from PND fields and SingleScatteringData objects for efficient implementation of size and habit distributions in ARTS simulations. * XML input, manipulation, and XML output of most(all?) ARTS data types (artsXML.py) * A Python front-end for arts simulations (PyARTS.py - currently only Monte Carlo and clear sky calculations supported). This enables convenient scripting for multiple ARTS simulations. This is achieved through an "arts\_run" class that as well as performing ARTS simulations, stores parameters and results together in the same arts\_run instance, which can be saved to disk. For Monte Carlo scattering calculations, single arts simulations can be spread over multiple CPUs. * functions for performing batch scattering file generation and ARTS simulations on multi-processor machines. Prerequisites ------------- * Python 2.?, (you will probably have this already) * Numeric Python * f2py * scipy-distutils (this comes with f2py) Installation ------------ once you have all of the above 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