Analytical Instrumental Laboratory
CHEM F314 (CRN:33323)
Spring of 2019
Meeting Time: M 9:15-10:15am (lecture), MW 2:15-5:15pm (lab)
Office Hours: T&TH 3-4PM (other times by appointment)
Papers to be reviewed (click the following links for each paper):
- Barsanti_2007_NMR
- Bates_2015_EST_ROS
- Charrier_2015_EST
- Clifton_1988_EST
- Faust_1993_EST
- Fraser_2000_EST_levoglucosan
- Gouin_2010_PAHs_AtmosPolRes_Fairbanks
- Hopmans_2013_OrganicGeochem_Levoglucosan
- Oakes_2010
- Chanlon_2005
- Graham_2002_JGR_NMR
Atmospheric Chemistry
CHEM F406 (CRN:36497)
CHEM F606 (CRN:36498)
ATM F606 (CRN:35142)
Fall of 2018
Tu/Th 9:45–11:15
REIC 204
Term project (photochemical box modeling)
Introduction
Photochemical box model has been an extremely useful tool to understand the evolution of atmospheric composition in the presence of sunlight, natural and anthropogenic emissions. This project is designed to explore the evolution of certain atmospheric species (ozone, carbon monoxide, formaldehyde, bromine monoxide etc.) under different nitrogen oxides (NOx) conditions . So you can see how human activities may impact chemical transformation of atmospheric composition, and the implication for air quality and climate change.
In this box model, the sunlight intensity is calculated based on location and the local time of model simulation, and updated every time step. This information will be used to drive diurnal cycle in model runs.
By setting up some initial values, you will be able to see the diurnal cycle of those species you are interested. After you familiar with running the model, we will design some numerical experiments that can help to understand the chemical transformation of atmospheric composition in the real world.
Login
By now, I assume that you already have an account on chinook.
To login into Chinook, the instructions can be found here:
https://www.gi.alaska.edu/research-computing-systems/hpc/chinook/logging-in
You should just install the terminal and have X window ready. You do NOT need VNC.
Notes: if you find that your terminal is slow, you can try to log in with another node.
ssh -Y uausername@chinook01.alaska.edu
or
ssh -Y uausername@chinook03.alaska.edu
Here Y is for graphic display from your terminal.
Model setup
1. First, download the code and configure
curl -kLO https://github.com/barronh/DSMACC/archive/master.zip unzip master.zip cd DSMACC-master/ module load lang/flex/2.6.0-foss-2016b for free open source system module load lang/flex/2.6.0-pic-intel-2016b for intel compiler ./configure (to generate Makefile.defs)
2. The second step is to add these two lines to your .cshrc or .bashrc
.cshrc:
setenv KPP_HOME $HOME/DSMACC-master/kpp setenv PATH $HOME/DSMACC-master/kpp/bin:${PATH}
AFter you finish editing, exit and type:
source $HOME/.cshrc
.bashrc:
KPP_HOME=$HOME/DSMACC-master/kpp export KPP_HOME export PATH=$KPP_HOME/bin:$PATH
AFter you finish editing, exit and type:
source $HOME/.bashrc
3. The next step is to modify Makefile.defs change this line
FLEX_LIB=
to
FLEX_LIB=/usr/local/pkg/lang/flex/2.6.0/lib/libfl.a
4. Fourth step is to generate the executable for kpp
make kpp/bin/kpp
This will generate the executable file kpp.
Generate mechanism
cd $HOME/DSMACC-master/kpp/models cp /import/u/u1/uaf/jmao2/DSMACC-master/kpp/models/mcm33.kpp . cp -rf /import/u/u1/uaf/jmao2/DSMACC-master/kpp/models/MCM . cd $HOME/DSMACC-master/
cp /import/u/u1/uaf/jmao2/DSMACC-master/src/constants.f90 ./src/
cp /import/u/u1/uaf/jmao2/DSMACC-master/rate.inc .
cd $HOME/DSMACC-master/src ../kpp/bin/kpp ../kpp/models/mcm33.kpp dsmacc make This will generate a series of .f90 files under this directory and compile them to an executable file ($HOME/bin/dsmacc).
You could create your own mechanism by going to this MCM website. Here is some brief instruction:
https://github.com/barronh/DSMACC/blob/master/README.md#mcm-input
Run the model
First, you need to get a file for initial conditions.
cd $HOME/DSMACC-master/test cp /import/u/u1/uaf/jmao2/DSMACC-master/test/Init_cons.dat .
The explanation for the initial condition file can be found here:
https://github.com/barronh/DSMACC/blob/master/README.md#mcm-input
Then run the model:
../bin/dsmacc > test.log
Plot results
You can choose to either use IDL or Python. You need to make sure you have X windows set up correctly.
IDL (recommended for checking all species in this model)
To use IDL, type:
cp /import/u/u1/uaf/jmao2/DSMACC-master/test/output_reader_mat.pro . module load idl idl
In IDL environment, type:
>.r output_reader_mat.pro >output_reader >exit
Plot the results with gv:
gv Plot1.ps
Python (check targeted species)
To use Python, type:
cp /import/u/u1/uaf/jmao2/DSMACC-master/test/plotMCM.py . module load vis/matplotlib/1.5.1-pic-intel-2016b-Python-2.7.12 python plotMCM.py display NO.png
Basic Unix Commands/Tools
Command | Example | Description |
---|---|---|
1. ls | ls ls -alF |
Lists files in current directory List in long format |
2. cd | cd tempdir cd .. cd ~dhyatt/web-docs |
Change directory to tempdir Move back one directory Move into dhyatt’s web-docs directory |
3. mkdir | mkdir graphics | Make a directory called graphics |
4. rmdir | rmdir emptydir | Remove directory (must be empty) |
5. cp | cp file1 web-docs cp file1 file1.bak |
Copy file into directory Make backup of file1 |
6. rm | rm file1.bak rm *.tmp |
Remove or delete file Remove all file |
7. mv | mv old.html new.html | Move or rename files |
8. more | more index.html | Look at file, one page at a time |
9. pwd | pwd | Show current directory |
10. man | man ls | Online manual (help) about command |
Text editing tools
There are a few tools for text editing in Unix environment, including vi/emacs/nano. If you have not done any text editing, gvim might be a good choice as it offers graphic interface (just type “gvim” when you log into Chinook).
Copy files between Chinook and your own computer
For Mac, you can use SCP.
Using SCP
SCP is ideal for quick transfer of single files, such as email attachments. Syntax is similar to the Unix copy command. For demonstration purposes, we’ll use two computers (near
and far
) with the usernames this
and that
, respectively.
scp path/to/file that@remote.computer:path/to/destination
For example, if you want to transfer the file example.txt
from your home directory on near
to your home directory on far
, the command might look like this:
scp /home/this/example.txt that@far.uiuc.edu:/home/that/
Note that you can also use SCP in reverse. If you want to transfer a file from far
to near
, you can type something like this:
scp that@far.uiuc.edu:/home/that/example.txt /home/this/
If you need to copy an entire directory, you’ll need to use the recursive flag, like this:
scp -r thisdirectory that@far.uiuc.edu:/home/that/
Obviously, this system is a bit cumbersome for multiple file transfers.
For Windows, you can use winscp, which can be downloaded here.
How to change input file?
Follow this link to modify Init_cons.dat you copied to your folder.
https://github.com/barronh/DSMACC/wiki/Inputs%20and%20Initial%20Conditions
Project 1: Numerical solvers
In order to change the numerical solvers, you should modify this file:
$HOME/DSMACC-master/kpp/models/mcm33.kpp
Where you can find:
#INTEGRATOR rosenbrock //#INTEGRATOR kpp_lsode // #INTEGRATOR ros2_manual // #INTEGRATOR radau5
The detailed documentation for solvers can be found here:
Click to access kpp-2.1_UsersManual.pdf
Project 2: HCHO yield from biogenic VOCs
This project is designed to understand the relationship between isoprene/monoterpene emissions and HCHO using MCM chemical mechanism. This will help to derive isoprene/monoterpene emissions with satellite observed HCHO column.
The idea is to set isoprene (or monterpene) to initial concentration, and let it evolve in your photochemical box model. If you turn off HCHO loss in your model, you will cumulative production of HCHO in your model after In order to do that, you need to download the chemical mechanism for isoprene or monoterpene from MCM website. The default mechanism is for isoprene. You can swap the mechanism to monoterpene by downloading the file from MCM website.
Calculate HCHO yield from isoprene
- Find mcm_setup.kpp located at $HOME/DSMACC-master/kpp/models/. This is the file for your chemical mechanism.
- Turn off the HCHO loss in your mechanism. Find the reactions where HCHO is the reactant, you can either deactivate this reaction, or add HCHO to the product side, so HCHO will not be consumed.
- Recompile the model. This is because you have changed the model mechanism in step 2.
cd $HOME/DSMACC-master/src ../kpp/bin/kpp ../kpp/models/mcm33.kpp dsmacc make
- Run the model once, make sure you go through the initial condition file Init_cons.dat, see descriptions above (https://github.com/barronh/DSMACC/wiki/Inputs%20and%20Initial%20Conditions).
- Run the model by varying NOx concentrations.
Calculate HCHO yield from monoterpenes
- Download the chemical mechanism for monoterpenes (ALPHA-PINENE, or BETA-PINENE). Instructions can be found here: https://github.com/barronh/DSMACC/blob/master/README.md#mcm-input
- Make sure you put the downloaded mcm_setup.kpp in this folder $HOME/DSMACC-master/kpp/models/.
- Turn off the HCHO loss in your mechanism. Find the reactions where HCHO is the reactant, you can either deactivate this reaction, or add HCHO to the product side, so HCHO will not be consumed.
- Recompile the model. This is because you have changed the model mechanism in step 2.
cd $HOME/DSMACC-master/src ../kpp/bin/kpp ../kpp/models/mcm33.kpp dsmacc make
- Run the model once, make sure you go through the initial condition file Init_cons.dat, see descriptions above (https://github.com/barronh/DSMACC/wiki/Inputs%20and%20Initial%20Conditions).
- Run the model by varying NOx concentrations.
Project 3: Bromine chemistry
This project can be done by using a different chemical mechanism (GEOS-Chem).
A full set of GEOS-Chem mechanism can be found here:
$HOME/DSMACC-master/kpp/models/geoschem-09-02.eqn
To run this mechanism, you need to do a few things:
- Type:
cd $HOME/DSMACC-master/src
rm -f depend.mk - Type (to make your executable file):
../kpp/bin/kpp ../test/geoschem-09-02.kpp dsmacc
make - Type (you need to check your initial input file):
mv ../bin/dsmacc ../test/geoschem-09-02
cd $HOME/DSMACC-master/test
./geoschem-09-02