Computational Science Community Wiki

PREP-CHEM-Sources

This is a preprocessor used to generate emission files for WRF-Chem from prescribed data sets. For more info see:

PREP-Chem uses various databases as inputs. These have been downloaded for some years (e.g. 2009, 2012, speak to Scott). If doing a study for other years, you will need contact Saulo Freitas directly (See Freitas 2011 for more details).

Compiling PREP-Chem-SRC

Compiling V 1.2

Compiling V1.4 on ARCHER

The compiled code can be found here on hector: /work/n02/n02/scottan/executables/PREP-Chem/ 

BUG WARNING: the standard version of PREP-Chem has some misnaming issues for some of the emitted organics. It also only gives emissions of organic carbon mass, not total organic aerosol mass. These have been corrected in a locally modified version. Factors of 1.5 for biomass burning emissions and 1.6 to anthropogenic emissions are applied to OC mass to give OA emissions.

The edited source code can be found on the Manchester internal SVN: http://hyperbar.cas.manchester.ac.uk/svn/atmos_modelling/dynamic_modelling/PREP-CHEM/PREP-CHEM-SRC-1.4_MSG_mods/

We have compiled PREP-Chem using the INTEL compiler on ARCHER.

Running PREP-Chem-SRC

NINEST     = i_parent_start, 
NJNEST     = j_parent_start, 
POLELAT   = ref_lat, 
POLELON  = ref_lon, 
STDLAT1  = truelat1, 
STDLAT2  = truelat2.

ect....

Compiling convert_emiss

PREP-Chem generates binary files (.bin). These need to be converted by the program convert_emiss.exe into netcdf files before they can be used by WRF-chem.

convert_emiss : convert_emiss.o
        $(RANLIB) ../main/$(LIBWRFLIB)
        $(FC) -o convert_emiss.exe $(LDFLAGS) convert_emiss.o ../main/$(LIBWRFLIB) ../dyn_em/module_initialize_real.o ../share/module_optional_input.o $(LIB)

 ./compile emi_conv &> emi_conv_compile.log 

Running Convert_emiss

  qsub -m abe -N convert_emiss -l mppwidth=2 -l mppnppn=2 -l walltime=01:00:00 -j oe -A n02-weat ./batch_run_convert_emiss.sh 

ln -sf <emiss-file-path>/<filename>-T-yyyy-mm-dd-hhmmss-g1-ab.bin emissopt3_d01
ln -sf <emiss-file-path>/<filename>-T-yyyy-mm-dd-hhmmss-g1-bb.bin emissfire_d01
ln -sf <emiss-file-path>/<filename>-T-yyyy-mm-dd-hhmmss-g1-gocartBG.bin wrf_gocart_backg

wrfchemi_d01 
wrffirechemi_d01 
wrfchemi_gocart_bg_d01

mv wrfchemi_d01 wrfchemi_d01_$year-$cmonth-${cday}_00:00:00
mv wrffirechemi_d01 wrffirechemi_d01_$year-$cmonth-${cday}_00:00:00
mv wrfchemi_gocart_bg_d01 wrfchemi_gocart_bg_d01_$year-$cmonth-${cday}_00:00:00

mv wrfchemi_d01 wrfchemi_d02_$year-$cmonth-${cday}_00:00:00
mv wrffirechemi_d01 wrffirechemi_d02_$year-$cmonth-${cday}_00:00:00
mv wrfchemi_gocart_bg_d01 wrfchemi_gocart_bg_d02_$year-$cmonth-${cday}_00:00:00

Automating the PREP-Chem -- Convert_emiss Process

PREP-Chem and Convert Emiss need to be run for every day you need emissions for. This can be very time consuming. Several scripts have been written to run multiple days at a time. Modify these scripts for your domain to make the task easier.