CMAQv5.0.2 Two-way model release notes

Jump to: navigation, search

Release Date: April 2014


The CMAQv5.0.2 Two-Way Model is an online meteorology-chemistry model that simulates the two-way feedback between meteorology and chemistry in a single simulation. Coupled with the Weather Research Forecast Model version 3.4 (WRFv3.4), the CMAQv5.0.2 Two-Way Model, or WRF-CMAQ, simulates the interactions of estimated aerosol mass on incoming shortwave radiation.

The current release of the WRF-CMAQ model supports only the RRTMG radiation scheme for short wave aerosol direct effect. It does not simulate the effects of aerosols on long wave radiation and cannot be used with the CAM radiation scheme. This release also uses a core-shell model to perform the aerosol optics calculation rather than the volume mixing technique used in the previous version of WRF-CMAQ. This version of the model also only supports the CB05 chemical mechanism and AE6 aerosol mechanism (cb05tucl_ae6_aq). WRF-CMAQ uses a robust coupling scheme with WRF through the CMAQ stencil exchange (stenex) library.

Aerosol information for direct feedback effect

All three modes of seven components: water soluble mass (mass_ws), water insoluble mass (mass_wi), elemental carbon (mass_ec), sea salt (mass_ss), water (mass_h2o), diameters and standard deviations are passed to WRF to affect the radiation calculation directly. WRF-CMAQ only supports the AE6 aerosol mechanism.

     water soluble:

       mass_ws (i mode) = ASO4I + ANH4I + ANO3I
       mass_ws (j mode) = ASO4J + ANH4J + ANO3J +
                                          AMGJ  + AKJ   + ACAJ
       mass_ws (k mode) = 0.0

    water insoluble:

       mass_wi (i mode) = APOCI  + AOTHRI + APNCOMI
       mass_wi (j mode) = AALKJ  + AXYL1J + AXYL2J  +
                                         AXYL3J + ATOL1J + ATOL2J  +
                                         ATOL3J + ABNZ1J + ABNZ2J  +
                                         ABNZ3J + AOLGAJ + APOCJ   +
                                         ATRP1J + ATRP2J + AISO1J  +
                                         AISO2J + AISO3J + ASQTJ   +
                                         AOLGBJ + AOTHRJ + APNCOMJ +
                                         AFEJ   + AALJ   + ASIJ    +
                                         ATIJ   + AMNJ
       mass_wi (k mode) = ACORS  + ASOIL

    elemental carbon:

       mass_ec (i mode) = AECI
       mass_ec (j mode) = AECJ
       mass_ec (k mode) = 0.0

    sea salt:

       mass_ss (i mode) = 0.0
       mass_ss (j mode) = ANAJ + ACLJ
       mass_ss (k mode) = ACLK + ASO4K + ASECAT


       mass_h2o (i mode) = AH2OI
       mass_h2o (j mode) = AH2OJ
       mass_h2o (k mode) = AH2OK

Build Instructions

Download and install NetCDF and I/O API

If not already available on your system, install the netCDFv4.x and I/O APIv3.1 libraries

Download and configure WRFv3.4

Download WRF version 3.4 from NCAR and unzip/untar (tar xvzf) the tar file. Rename the directory WRFV3 to WRFV34.

Configure WRF

  • Set the variable NETCDF to the point the netCDF installation directory on your system
  • Type configure at the command line (this creates a configure.wrf file)
  • Choose the dmpar + compiler platform that matches your system - WRF-CMAQ does not support the serial, smpar or dm_sm options.
  • In the compile for nesting section, choose the default value

Download and install CMAQv5.0.2

Download CMAQ version 5.0.2 model from the CMAS Center and unzip/untar (CMAQv5.0.2.Apr2014.tar.gz)

  • Follow the standard build procedures for bldit, Pario, and Stenex
  • Configure the CCTM build to output a Makefile:
    • comment the "set Local" line
    • uncomment the "set MakeFileOnly" line
    • set build_twoway = 1
  • Select the cb05tucl_ae6_aq Mechanism and associated solver for the CCTM. NOTE: WRF-CMAQ only supports the cb05tucl_ae6_aq mechanism at this time

Run the bldit.cctm script and rename the resulting BLD_* directory to "cmaq"

Move or copy this directory into the WRFV34 directory

Download and install the WRF-CMAQ Two-Way Package

Set the following environment variables before proceeding

FC (compiler you will use, at this point, we only support pgi and ifort)
IOAPI (path of the ioapi 3.1 library, e.g. /home/wdx/lib/x86_64/ifc/ioapi_3.1)
PARIO (path of the PARIO library, e.g. /home/wdx/lib/x86_64/ifc/pario_3.1)
STENEX (path of the STENEX library, e.g. /home/wdx/lib/x86_64/ifc/se_snl)
MPI_INC (path of the mpif.h, e.g. /usr/local/intel/impi/

Download twoway.tar.gz from the CMAS Center and unzip/untar.

  • Move the resulting "twoway" directory into the WRFV34 directory

Go into the directory WRFV34 and execute the command: "twoway/assemble" from the command prompt

  • This command will update all necessary files in WRF and CMAQ to create the WRF-CMAQ model. The original WRF and CCTM files are saved to the twoway/misc/orig directory

Compile the twoway model by typing "compile em_real >& mylog"

  • Look for the executable main/wrf_new.exe to confirm that the compilation completed successfully

Run Instructions

A sample run script (run.wrf34_cctm502) can be found in the twoway/script directory. The run script requires outck_wrfcmaq.q, which should be located in the same directory as the run script. Table 1 lists the required and optional run-time environment variables for WRF-CMAQ. Download and use the WRF-CMAQ benchmark dataset to test the installation of the codes and for examples of the input data needed to run the model. The benchmark data include sample WRF (including outputs from REAL) and CMAQ input files for running a one day test case.

To run WRF-CMAQ test case:

  1. Point the run script to the config.cmaq configured for your system
  2. Set the BASE environment variable in the run script to the location of the WRF34 directory that you created during the WRF-CMAQ installation
  3. Set the IOAPIDIR environment variable to the location of the I/O API m3tools binaries on your system
  4. The default script is configured for the WRF-CMAQ test case. Set the number of processors to run the case using the NPROCS environment variable. Check how the MPI wrapper is configured for the executable call toward the bottom of the script. Users will need to configure this call to be consistent for running MPI jobs on their system. Run the script at the command line once it is configured correctly for your system.

To check the results of the test case:

  1. Look in the $M3DATA/wrfcmaq/output/20080620 for the CCTM output files and the run logs.
  2. Check the rsl.error.# and rsl.out.# files for any errors or warnings
  3. Compare the results of the 1-day test case to the results from the WRF-CMAQ reference dataset
Table 1. WRF-CMAQ run script settings
Option Settings Default Required Description
pxlsm_smois_init 0/1 N/A Y 1 = initialize the P-X soil moisture; 0 = continuation from a previous run
NUM_LAND_USE_TYPE ## N/A Y Dependent on input data: 20 = MODIS, 24 = USGS, 50 = NLCD
RUN_CMAQ_DRIVER Y/N N Y Run the coupled WRF CMAQ model; N = run WRF only
DO_SW_CAL Y/N N Y Calculate aerosol feedback on incoming shortwave radiation; only use if RUN_CMAQ_DRIVER = Y
WRF_CMAQ_FREQ # 1 Y Number of WRF time steps to run per 1 CMAQ time step
WRF_COL_DIM ### N/A Y Number of WRF grid columns
WRF_ROW_DIM ### N/A Y Number of WRF grid rows
WRF_LAY_DIM ### N/A Y Number of WRF vertical layers
CMAQ_COL_DIM ### N/A Y Number of CMAQ grid columns
WRF_ROW_DIM ### N/A Y Number of CMAQ grid rows
TWOWAY_DELTA_X ### 5 Y Number of columns from the SW corner of the WRF domain to the SW corner of the CMAQ domain
TWOWAY_DELTA_Y ### 5 Y Number of rows from the SW corner of the WRF domain to the SW corner of the CMAQ domain
RSTFLAG .true./.false. .false. ? Is this a restart of a previous WRF-CMAQ run
WRF_RSTFLAG .true./.false. .false. ? Description Needed
CREATE_PHYSICAL_FILE Y/N N N Output MCIP meteorology output files; N = use buffered files in memory
FILE_TIME_STEP HHMMSS 010000 N Time step length of the physical meteorological output file
SD_TIME_SERIES Y/N N N Turn on subdomain monitoring capability; what does this mean?
SD_CONC_SPECIES "SP1 SP2...SPn", e.g. "NO2 NO O3" N/A N Subdomain time series species
SD_SCOL ### N/A N WRF grid starting column number for time series subdomain
SD_ECOL ### N/A N WRF grid ending column number for time series subdomain
SD_SROW ### N/A N WRF grid starting row number for time series subdomain
SD_EROW ### N/A N WRF grid ending row number for time series subdomain
WRF_LC_REF_LAT ##.# N/A N WRF Lambert Conformal reference latitude (See MCIP documentation)
radt ## N/A Y Minutes between radiation physics calls in WRF

Refer to the CCTM documentation for a listing of the CMAQ run-time environment variables.

WRF-CMAQ Input/Output Data

The WRF-CMAQ benchmark data provide examples of the files needed to run the model. The general list of inputs required for WRF-CMAQ include,

  • REAL outputs
    • required: wrfbdy, wrfinput, wrflowinp
    • optional: wrffdda, wrfsfdda, wrfrstrt
  • CMAQ inputs
    • required: emissions (CB05ae6 speciation), IC, BC, OMI, ocean file
    • optional: lightning NOx, gridded landuse for inline biogenics and windblown dust

WRF-CMAQ outputs standard WRF (wrfout) and CMAQ output files.


Wong, D. C., Pleim, J., Mathur, R., Binkowski, F., Otte, T., Gilliam, R., Pouliot, G., Xiu, A., Young, J. O., and Kang, D.: WRF-CMAQ two-way coupled system with aerosol feedback: software development and preliminary results, Geosci. Model Dev., 5, 299-312, doi:10.5194/gmd-5-299-2012 , 2012.

For an overview of the 2-way Coupled WRF-CMAQ see:

and for more details on the 2-way Coupled WRF-CMAQ system see:


David Wong, Atmospheric Modeling and Analysis Division, U.S. EPA