Difference between revisions of "DSMACC chemical box model"

From Geos-chem
Jump to: navigation, search
(Source code and data)
Line 32: Line 32:
 
*[mailto:jingqium@princeton.edu Jingqiu Mao] ''(Princeton/NOAA GFDL)''
 
*[mailto:jingqium@princeton.edu Jingqiu Mao] ''(Princeton/NOAA GFDL)''
  
== Source code and data ==
+
== DSMACC for GEOS-Chem ==
  
DSMACC code developed for GEOS-Chem can be found here:
+
I recently tested v9-02 with tremendous help from Barron.
 +
===setup===
 +
First, download the code and configure
 +
<pre>
 +
curl -kLO https://github.com/barronh/DSMACC/archive/master.zip
 +
unzip master.zip
 +
cd DSMACC-master/
 +
configure (to generate Makefile.defs)
 +
</pre>
 +
The next step is to modify Makefile.defs
 +
change this line
 +
<pre>FLEX_LIB=-lfl</pre>
 +
to
 +
<pre>FLEX_LIB=/usr/lib64/libfl.a</pre>
  
*[ftp://ftp.as.harvard.edu/pub/exchange/jmao/boxmodel/ DSMACC for GEOS-Chem]
+
Third step is to generate the executable for kpp
 +
<pre> make kpp/bin/kpp </pre>
 +
 
 +
This will generate the executable file kpp.
 +
 
 +
===Prepare the input file===
 +
Using python parser (assuming you have python loaded up in your machine)
 +
<pre>python geoschem2kpp.py globchem.dat > globchem.eqn</pre>
 +
This will produce globchem.eqn.
 +
 
 +
====Mapping photolysis rates to TUV index====
 +
DSMACC uses TUV model to drive the photolysis reactions.
 +
You will need to modify the generated eqn for this.
 +
TUV reactions are described in '''usrinp'''.
 +
 
 +
====Special treatment for special rates====
 +
You can define some special rates that not in the standard form of reaction rates. This can be done by modifying '''GEOSFunctions.inc'''.
 +
 
 +
====Generate kpp files based on your mechanism====
 +
go to src folder
 +
<pre>../kpp/bin/kpp ../test/geos.kpp dsmacc </pre>
 +
Here geos.kpp includes all the information for the mechanism. This will generate a series of .f90 files.
 +
 
 +
===Run the model===
 +
compile the files that are generated by kpp. Type make in the DSMACC-master/src folder. This will generate the executable file '''dsmacc''' in DSMACC-master/bin folder.
 +
 
 +
To run the model, you should have a initialization file "Init_cons.dat", which describes the initial concentrations of all species.
  
 
== References ==
 
== References ==

Revision as of 17:40, 23 July 2014

This page describes the DSMACC chemical box model (U. Leeds).

Overview

Brief description

The Dynamically Simple Model of Atmospheric Chemical Complexity (DSMACC) is designed to be a simple box model which can easily change its chemical scheme and can be used both for free running and constrained simulations. It is written in FORTRAN and uses the KPP chemical pre-processor, the TUV photolysis scheme and can use the Master Chemical Mechanism or other chemical mechanisms.

DSMACC is a useful and flexible tool. We are using it to test new GEOS-Chem chemical mechanisms.

New information on DSMACC can be found here. The code is freely available although support is limited!


Instructions for Use

Instructions for DSMACC are in the README, but are summarized below.

  1. Download the model (wget https://github.com/barronh/DSMACC/archive/master.zip)
  2. Unzip the archive (e.g., unzip master.zip)
  3. Navigate a terminal into DSMACC-master
  4. Run the test case (make check)

The test case includes a version 8 GEOS-Chem simulation that you can modify for your purposes. This test case is just a toy and is not meant for analysis.


--barronh 10:04, 25 October 2013 (EDT)

Authors and collaborators

DSMACC for GEOS-Chem

I recently tested v9-02 with tremendous help from Barron.

setup

First, download the code and configure

curl -kLO https://github.com/barronh/DSMACC/archive/master.zip
unzip master.zip
cd DSMACC-master/
configure (to generate Makefile.defs)

The next step is to modify Makefile.defs change this line

FLEX_LIB=-lfl

to

FLEX_LIB=/usr/lib64/libfl.a

Third step is to generate the executable for kpp

 make kpp/bin/kpp 

This will generate the executable file kpp.

Prepare the input file

Using python parser (assuming you have python loaded up in your machine)

python geoschem2kpp.py globchem.dat > globchem.eqn

This will produce globchem.eqn.

Mapping photolysis rates to TUV index

DSMACC uses TUV model to drive the photolysis reactions. You will need to modify the generated eqn for this. TUV reactions are described in usrinp.

Special treatment for special rates

You can define some special rates that not in the standard form of reaction rates. This can be done by modifying GEOSFunctions.inc.

Generate kpp files based on your mechanism

go to src folder

../kpp/bin/kpp ../test/geos.kpp dsmacc 

Here geos.kpp includes all the information for the mechanism. This will generate a series of .f90 files.

Run the model

compile the files that are generated by kpp. Type make in the DSMACC-master/src folder. This will generate the executable file dsmacc in DSMACC-master/bin folder.

To run the model, you should have a initialization file "Init_cons.dat", which describes the initial concentrations of all species.

References

  1. Emmerson, K.M., M. J. Evans, Comparison of tropospheric gas-phase chemistry schemes for use within global models, Atmos. Chem. Phys., 9, 1831-1845, 2009. PDF

Known issues

None at this time.