ASAD Logo

ASAD
M
ore Information

   ASAD home
What's New  |  More Info
Mailing List  |  User Guide
Server Index


Here we describe ASAD in more detail. This is short summary of the User Guide which gives you a full description of ASAD and takes you through using ASAD in building a chemistry model step-by-step.
Also see the ASAD paper published in : Computer Physics Communications, 105 (1997), 197.
Reprints of this paper are available. Email me for to request one.

What is ASAD? | Files | Structure | User supplied routines | What's next


What is ASAD?

ASAD can be thought of as a 'black box' which can be plugged into models of the atmosphere and used to solve a chemical scheme developed by the user. ASAD includes all the subroutines to perform the time integration of the scheme. It also includes standalone programs to help you to develop your own chemistry scheme. ASAD allows the user to develop chemistry schemes without writing any fortran code. The scheme is specified by input files; a choice of species and reactions, and the ASAD subroutines will automatically solve the resultant equations.

The advantages to using ASAD are that the development time for a chemistry scheme is substantially reduced, the code will easily plug into any atmospheric model so moving schemes from one model to another is simple, coding errors are greatly reduced and the user has a builtin choice of time integration schemes and approximation methods for atmospheric chemistry, such as the use of chemical families.

What ASAD isn't

ASAD is not a complete model. If you think of an atmospheric chemistry model as consisting of several components; transport/dynamics, chemistry, photolysis, emissions etc, then ASAD represents the chemistry part with links to the photolysis and emissions and deposition schemes. You therefore need access to an existing transport model and need to supply additional codes such as photolysis schemes. However, ASAD saves you significant coding effort in solving the chemistry equations and has the advantage that it is very easy to move between different models.

What computers does ASAD run on?

ASAD is developed on Sun Ultra workstations and Apple PowerMac computers and runs on these machines and on Cray high performance computers. However, it has been carefully written using standard FORTRAN77 with no extensions and runs on a wide range of different computers as long as a FORTRAN compiler is available.

ASAD has been run on the following computers without any problems: Sun workstations (Solaris 1 & 2), Silicon Graphics workstations (IRIX 5), IBM RS6000, Cray computers (YMP, J90), Apple MacIntosh (680x0 and PowerMacs; system 7.5) and Pentium and Pentium Pro PCs (running Linux using GNU f77). The UserGuide contains information on suggested compiler options for some of these computers to achieve the best performance.


Files you need

To use ASAD, you need to create the following datafiles:

chch.d
This is the file containing the list of species with flags to indicate how ASAD should treat each species (ie. whether it's a member of a family or not).
ratb.d
This is the file containing the list of bimolecular reactions to use.
ratt.d
This is the file containing the list of termolecular reactions to use.
ratj.d
This the file containing the list of photolysis reactions.
rath.d
This is the file containing the list of heterogeneous reactions.

It is up to you to decide what species to include in your chemistry scheme. However, once you have set up the chch.d file, you run a simple program that creates the rat*.d files for you by scanning the master ratefiles for reactions involving the species you have selected. You can of course edit the ratefiles yourself at any time to add in your own reactions or alter the ones that are already there.

One of the big advantages of ASAD is that it allows the chemist to spend more time thinking about what species and reactions to use rather than worrying about writing the code for this scheme. Because you never need to write any code, changing the species set and reactions and carrying out 'what if?' type experiments is very easy with ASAD.

Sample rate file

A line from a rate file might look something like:

 8     Br     O3       BrO       O2              1.70E-11  0.00   800.0   C

The first column is the reaction no. in the file. The next 2 fields are the reactants, and the next 3 fields (only 2 in this example) are the products. The following numeric fields are the parameters used to compute the rate coefficient for this reaction. Lastly a comment field exists for the inclusion of notes. Lines beginning with a '#' are ignored and can be used for adding comments.

ASAD will read these ratefiles and calculate the rate coefficient. Specifying the reactions used in your scheme in files in this way has several benefits:


Structure

ASAD has a modular code structure and has been written with extensive comments. It has been written in standard Fortran77 and makes use of no extensions. It's known to run under virtually all flavours of Unix (Solaris, SunOS, Linux, UNICOS, AIX) on Sun, IBM, Pentium PC workstations and Apple Mac and PowerMac computers (using the Fortner Research LS Fortran compiler).

ASAD has been tested extensively on both scalar and vector processors. The code is very efficient on a vector machine; all the loops vectorise. A discussion about the performance of the code is included in the user guide.

This is a flow diagram of the ASAD code as it would be called from an atmospheric chemistry model.

Flow diagram of ASAD code

Calling ASAD

ASAD uses one dimensional arrays throughout making it easy to change the spatial domain over which the chemistry is solved. For example, for a box model, there would be only one point. For a 3D model we might pass ASAD a latitude-height section.

The calling model calls the subroutine CINIT to initialise ASAD . This reads in the ratefiles, computes constants and so on. In the model's time loop, the routine CDRIVE would be called. This controls the timestepping and solution of the chemistry kinetic equations. The arguments and further details of these routines is contained in the User Guide. The user is required to set some parameters in ASAD which set the number of reactions in the rate files for example.

Families

Chemical families are often used in atmospheric models to overcome the very short lifetimes of some of the species are used. In a chemical family, several species are parametrized in terms of one longer lived species with which they are closely linked. Using chemical families involves calculating ratios between the family members so that they can be computed from the total family concentration used in the calling model. Steady state is assumed for the short lived chemical species in the family.

ASAD contains builtin code to compute the family ratios and the family members. The user doesn't need to supply any code to do this.

A number of other approximations are supported by ASAD such as; steady state species, fractional products and more details are contained in the user guide.

Time integration

ASAD comes with several time integration (or ODE solvers) methods. There are schemes designed to cope with stiff chemical systems and others for schemes not so stiff. One typical development scencario is to use a stiff integrator and treat all species separately to test the important reactions and species, and then develop a simpler scheme using species in steady state and families.

One scheme is an implicit, efficient time integration scheme, called IMPACT. This scheme has been designed for efficiency and primarily with three-dimensional models but works and compares well with more accurate integration methods (such as Gear) when used in a box model. The user is able to control the timestep used and other key parameters in the timescheme without the need for recompilation.

The IMPACT routine is an enhanced version of the scheme proposed by Stott and Harwood, 1992, Annales Geophysicae and is described in the paper by Carver and Stott, submitted to Annales Geophysicae.

There are a mix of ODE solvers included to solve stiff and non-stiff problems. Some of these vectorise and some don't. More details are provided in the User Guide.


User supplied subroutines

ASAD is not a complete atmospheric chemistry model. It would be impossible to write such a package. However, it is a comprehensive software package that removes much of the drudgery of coding chemistry schemes.

There are some things that the user must supply. Since photolysis schemes vary considerably with the subject under study, we decided not to equip ASAD with any photolysis code (although we do have some available in the group - contact me for details). You must therefore supply your own photolysis code, albeit simple fixed rates or a more complex scheme. Likewise, no code for heterogeneous reactions, emissions or depositions are included. However, ASAD does include dummy routines for these and will correctly take such scheme into account in the time scheme and so on. More details are in the User Guide.


What's next

If you want to know more about how ASAD works please see the User Guide. This will take you through building your own chemistry scheme step-by-step.

There is also a paper describing ASAD version 2.0, published in Computer Physics Communications (Carver et al ., 105, 1997, 197).


This web site is designed and maintained by Dr. Glenn. Carver