Subroutine
Name(s) |
Subroutine
Description
|
CHEM_INIT0
CHEM_INIT1 |
Allocation
of data structures used by the ACM and read initial distribution
of chemical specials and reactions |
MAINDATA
|
Setup
of ACM constants
******* the values for basic parameters *******
G = GRAVITY: CM SEC**-2;
REARTH = EQUATORIAL RADIUS OF EARTH,CM
BK = BOLTZMANN"S CONSTANT, ERG DEG K**-1
BK = 1.381d0x10**23 J/K IF NECESSARY.
SBK = STEPHAN-BOLTZMANN CONSTANT, WATTS/M**2-K**4
AVG = AVOGADRO"S NUMBER,MOL**-1
ALOS = LOSCHMIDT'S NUMBER, MOLECULES CM**-3 STP
AM = MOLECULAR WEIGHT OF AIR;
RGAS = GAS CONSTANT, ERG DEG K**-1 MOL**-1
RGAS2 = GAS CONSTANT, L-ATM/MOLE-K
SCDAY = SECONDS PER DAY
HPLANCK = PLANCK'S CONSTANT (JOULES-SEC)
CSPEED = SPEED OF LIGHT
***********************************************************************
|
READER |
This
subroutine opens all data files and reads data from m.dat |
READCHEM
|
called
by READER, reads all the chemistry species and concentrations |
READ_SFLUX |
Reads
the initial atmospheric fluxes |
RADDATA
|
Reads
constant parameters used in radiation calculations |
RPHOTDATA |
Reads
constant parameters used in the photochemistry |
CHEMSTEP
|
Main
driver routine for the chemistry step. This is call after
the initialization is completed. |
CHEMPROC
|
This
subroutine defines the grid first also updates the time
and the photodissociation rates, then divides the grid-domain
(1-dimension or 3-dimension into blocks of grid-cells and
calls the gas-phase solvers for each grid-block. |
RADPROC |
Controls
the calling radiation codes |
RSUN |
Calculates
the angular distance of the sun on the ecliptic, solar flux,
sunrise and sunset time for each day |
RRADTRAN |
Driver
Routine. Defines basic atmospheric properties. This routine
is case dependent and will have to be replaced by the user
|
CALCRATE |
This
subroutine calculates kinetic reaction and photorates (S-1,
CM3 S-1, OR CM6 S-2) and pressure and temperature-dependence
for gas-phase chemical reactions. The routine can also be
modified to calculate kinetic and photorates (S-1 L MOLE-1
S-1, AND L**2 MOLE-2 S-1) for aqueous chemistry. |
SMVGEAR |
SMVGEAR
is a GEAR-type code that solves first-order ordinary differential
equations with initial value boundary conditions. In sum,
this program includes special treatment of sparse matrices
and vectorizes around grid-blocks, which are groups of grid-cells
in the overall grid-domain. Furthermore, while this program
is optimized for multiple grid-cell problems on cray-type
machines, it can be used for zero-dimensional problems (i.e.
one grid-cell) or on other vector or non-vector machines
this version includes re-ordering of grid-cells prior to
each time-interval. the purpose of the reordering is to
group cells with stiff equations together and those with
non-stiff equations together. this reordering can save signifcant
computer time (e.g. speed the code by a factor of two or
more), depending on the variation in stiffness throughout
the grid-domain. when the stiffness is the same throughout
the grid-domain (e.g. if all concentrations and rates are
the same), then re-ordering is unnecessary and will not
speed solutions. additional reordering steps can be taken
at sunrise if the zenith angle is different in each grid-cell.
one way to reorder at sunrise is to group all cells in blocks
in order of decreasing to increasing time of sunrise. many
other possibilities exist. |
SOLVECHEM
|
In
this subroutine, future species concentratiions are calculated
with a new method, called multistep implicit-explicit (mie).
First, each species concentration is predicted with backward
Euler calculation:
Cestimate(t+1) = (C(t) + PROD x Dt) / (1. + loss x Dt )
and
the estimated values are used in an explicit, mass conserving
forward euler,calculation to predict a final VALUE:
Cfinal(t+1) = C(t) + (PROD - LOSS) * Dt
If
Cfinal for a species is negative, then Cestimate(t+1) is
recalculated for all species using new production |