WRF/CHEM: Frequently Asked Questions

Q: Does the chemistry code come with the latest release of the WRF model?

A: No, chemistry is not currently part of the latest release of the WRF model. However, it is in the WRF repository and should be made available some time in the future.


Q: How do I obtain a copy of the WRF chemistry code?

A: The chemistry section of the WRF/Chem model is available from the WRF model code download page.


Q: What are the chemistry namelist.input options?

A: The namelist.input options are discussed in chapter 4 of the User's Guide. In addition, the tutorial exercises demonstrate the steps involved in running the code and each exercice provides solutions that include the namelist.input file.


Q: What data do I need to run a simulation with chemistry included?

A: One only needs to run the WRF WPS to get the dust fields and then run WRF with some chemistry capabilities included.

If you want to run more complex chemistry than just dust one needs to generate anthropogenic emissions data files. The methodology is discussed in the User's Guide and demonstrated in the tutorial exercises.


Q: I compile the WRF model, but chemistry does not appear to have been compiled. What do I need to do so that I will get a simulation with chemistry included?

A: The latest version of the WRF model requires environmental variables to be set.

To compile the mass dynamic core of the WRF model and include chemistry, at a minimum one needs to set two environmental variables. These environmental variables are EM_CORE and WRF_CHEM.

In the bash shell environment use the commands:

  • export EM_CORE=1
  • export WRF_CHEM=1

    and in the c-shell environment use the commands:

  • setenv EM_CORE 1
  • setenv WRF_CHEM 1

    Chapter 2 of the User's Guide discusses compiling the WRF/Chem code in more detail.


    Q: Why am I unable to compile the WRF/Chem that was downloaded from the NCAR web site?

    A: While we attempt to test the WRF/Chem code on a wide variety of computing platforms, there are occasionally some errors that slip through web of the tests. When we are notified of a possible code error, we examine the code, verify that there is in fact an error and then look for and test the a solution. When the error solution is fully tested and confirmed, the updated code is made available on the WRF/Chem known-problems web site (see links on WRF/Chem web page). This process can take from several minutes to several weeks to complete.

    When you get a WRF/Chem compile error, one should first make sure your code is up to date with the known-problems. If the error then persists, then examine your compile log for the first error statement. Most likely the solution to the error will be a relatively easy fix and you can report the error/solution to either WRF help or (if it is related to the chemistry code) WRF/Chem help. If you are unable to determine how to resolve the error on your own, please contact WRF help or WRF/Chem help for assistance and we will help you resolve the compilation conflict.


    Q: I was unable to compile the emiss_v03.F using the provided PGF compile example. How do I compile the same code using ifort?

    A: The ifort compile command should be similar to the following:

    ifort -O2 -FR -convert big_endian emiss_v03.F -I /opt/netcdf/include -L/opt/netcdf/lib -lnetcdf where the path should be corrected to match your path to the netCDF libraries.


    Q: How are the gas phase emissions units converted from mole per km^2 per hour to the change in parts per million used by WRF/Chem?

    A: It is assumed that you have examined the anthropogenic emissions web page that discusses how one can build the emissions using the emiss_v03.F program.

    The units of all gas species in the binary files created with emiss_v03.F have units of mole/(km*km)/hr. The units of all aerosol species are microgram/(m*m)/s and they are treated differently than the gas phase emissions - hence the different emissions units. (These are also units of elevated (point) sources for each vertical grid).

    In module_emissions_anthropogrnics.F WRF/Chem code, the subroutine add_anthropogenics has the variable "conv_rho" that is used to convert the emissions units (gas-phase chemistry) to ppm (note that the model works with them as a mixing ratio). Specifically, conv_rho is used in module_emissions_anthropogenics.F to convert the gas-phase emissions from mole/(km*km)/hr into delta-ppmv, where delta-ppmv is the incremental addition to the gas phase species (units of ppmv).

    The calculation of conv_rho needs:

  • rho_phy: the air density in kg/(m3),
  • dtstep: the meteorology big time step in seconds,
  • dz8w: the vertical grid spacing (delta-z) for the lowest layer (or the layer for the emissions) in meters
  • Let E be emission in mole(/km-km)/hr from binary files (this is the output data from the emiss_v03.F program)

    Then

    E*(1.E-3)*(1.E-3)/(dz8w(I,K,J)*3600.) = E2 =emission in mole/(m^3)/sec

    And then let D be the dry air density in mole/(m3), or

    D=rho_phy(i,k,j)/(.02897 kg/mole)

    And the mixing ratio in units of parts per million (ppmv) is equal to 1.E6 * mixing ratio where the mixing ratio units is (mole/mole).

    So that leads to the conv_rho variable which converts the emissions units to parts per million being:

    conv_rho = (1.E6)*dtstep*E2/D = E*dtstep*8.047E-6/(rho_phy(I,k,J)*dz8w(i,k,j))

    So, the chemical emissions that are read into the WRF/Chem model and are multiplied by "conv_rho" to change the units.


    Q: How do I generate the 3-D anthropogenic emissions data files for my model domain located over the United States?

    A: Anthropogenic emissions data for the 48 contiguous states and parts of Canada and Mexico have been made available for download by the NOAA Earth System Research Laboratory - Chemical Sciences Division. The process to create anthropogenic emissions input data files from this data is as follows:

  • Modify emiss_v03.F to set map and grid parameters for your particular domain.
  • Compile emiss_v03.F and run emiss_v03 using raw emissions data to generate WRF emissions files in binary format (file names are set in emiss_v03.F to be wrfem_00to12Z and wrfem_12to24Z). These filenames need to match the name of the binary input data file in convert_emiss.F (in the WRFV3/chem directory).
  • If necessary, change namelist.input file in the WRFV3/test/em_real directory:

    interval_seconds=3600, (hourly update to the emissions data)

    chem_opt=1,

    chem_in_opt=0,

    emiss_opt=3,

  • Run real.exe to create wrfinput data file - need header information for WRF chemical emissions data files.
  • Compile emi_conv (in WRFV3 directory) to build the emissions conversion package.
  • Run convert_emiss.exe for 11 hours starting at 0000 UTC and ending at 1100 UTC and save the netcdf wrfchemi_d01 data file as wrfchemi_00z_d01.
  • Run convert_emiss.exe for 11 hours starting at 1200 UTC and ending at 2300 UTC and save the netcdf wrfchemi_d01 file as wrfchemi_12z_d01.


    Q: What species are included in the chemistry and what are the units for chemical, aerosols and emissions arrays?

    A: The registry.chem file contains the names and dimensions of the chemical species used by the WRF/Chem model.

    The gas phase chemistry variables are in units of parts per million (ppm).

    The aerosol units are in mixing ratio (microgram of aerosol per kg of dry air). The 3-d variable "alt" (inverse density) should be included to the list of output variables in the registry.chem registry file if you desire to convert from mixing ratio to microgram/m3. This is done by dividing the desired aerosol variable or variables by "alt".

    The chemical emissions are in units of mole per square kilometer per hour for the gaseous chemical species and microgram per square meter per second (microgram/(m^2 s)) for the aerosol species.

    The following is important if one wants to use your own biogenic emissions instead of the Gunther scheme. In module_bioemi_beis313.F, after the biogenic emissions are read into the model, a conversion factor which changes emissions from mole/km^2/hr to ppm is calculated. The 4.828E-4/rho_phy term of this factor converts mole/km^2/hr to ppm*m/min (contains conversion factors of molecular weight of air = 0.02897 kg/mol, hours to minutes, and kilometers squared to meters squared). The rest of the factor converts minuntes to seconds, multiplies by the chemistry time step in seconds, and divides by layer thickness in meters. [Thanks goes to Gregory Frost (NOAA-ESRL-CSD, CIRES) for this explanation]


    Q: Which routines can be used to plot the output from WRF/Chem?

    A: Any plotting routine that can read NetCDF formatted data can be used to plot the data from a WRF/Chem simulation. This includes, but is not limited to, the RIP and Vis5d routines that can be downloaded and used with the WRF model.


    Q: I want to make a WRF/Chem run, but the domain is not located over the U.S. Is there some place I can get biomass burning data for the world?

    A: You can get the wild fire location data for the entire world from MODIS data download web sites. The WRF/Chem User's Guide discusses the gathering and use of biomass burning data in more detail.



    Q: Which chemistry namelist options do I need to set for a nested domain?

    A: Nearly every chemistry namelist option needs to be set when running a 2-way nested

    simulation. A user is referred to the Registry/registry.chem file and asked to examine the

    chemistry namelist variables. Those variables that are dimensione as max_domains need to be

    for each domain.

    The following shows some of the chemistry namelist variables which should and should not be set for a nested domain.

    &chem

    kemit = 19,

    chem_opt = 301, 105,

    bioemdt = 30, 30,

    photdt = 30, 30,

    chemdt = 2.0, 0.66666,

    io_style_emissions = 1,

    emiss_opt = 5, 3,

    chem_in_opt = 1, 0,

    phot_opt = 1, 1,

    gas_drydep_opt = 1, 1,

    aer_drydep_opt = 1, 1,

    bio_emiss_opt = 1, 1,

    dust_opt = 1,

    dmsemis_opt = 1,

    seas_opt = 0,

    gas_bc_opt = 1, 1,

    gas_ic_opt = 1, 1,

    aer_bc_opt = 1, 1,

    aer_ic_opt = 1, 1,

    gaschem_onoff = 1, 1,

    aerchem_onoff = 1, 1,

    wetscav_onoff = 0, 0,

    cldchem_onoff = 0, 0,

    vertmix_onoff = 1, 1,

    chem_conv_tr = 1, 1,

    biomass_burn_opt = 1, 0,

    plumerisefire_frq = 30, 0,

    aer_ra_feedback = 0, 0,

    have_bcs_chem = .false., .false.,


     

    This page developed by Steven Peckham and Georg Grell
    Model questions should be directed to WRF/Chem help.
    Last modified: Monday July. 16, 2012 10:30 AM