Chemical Initial/Boundary Conditions (IC/BC)

WRF-GC is a regional model. Boundary conditions from a global model are generally required. Initial conditions can be provided by a WRF-GC run or other global models.

You can use MOZART4-GEOS5, CAM-chem, or GEOS-Chem as input for initial/boundary conditions.

The general process is as follows:

  • Identify which data source you want to use as ic/bc.

  • Set-up WRF-GC, and run real.exe to generate wrfinput_d01 (initial conditions), and wrfbdy_d01 (boundary conditions)

  • Prepare ic/bc inputs into a netCDF format accepted by mozbc. (mozbc for WRF-GC is located here)

  • Use mozbc to add these inputs to wrfinput_d01 and/or wrfbdy_d01 files.

  • Run the WRF-GC model.

Preparing IC/BC file from global GEOS-Chem output

Details are available in the PDF getting started guide. A MATLAB script will process global GEOS-Chem outputs to netCDF files accepted by mozbc, which are then generated into WRF(-GC) initial/boundary files.

Run the GEOS-Chem standard full-chemistry simulation

We recommend running at a resolution 2 x 2.5 degree because this will provide higher resolution initial and boundary condition data to WRF-GC (which generally has higher resolution). 4 x 5 degree is also supported.

The running time must cover the WRF-GC simulation period, with at least one day preceding: e.g. if the simulation period of WRF-GC is from 2015-06-10 00:00:00 to 2015-06-20 00:00:00 (UTC), the time ranges for GEOS-Chem should be at least available from 2015-06-09 00:00:00 to 2015-06-20 00:00:00, not including necessary initialization (spin-up).

Output the netCDF diagnostic files every 6 hours (00, 06, 12, 18), including:

  1. GEOSChem.SpeciesConc.xxxxxxxxxxxxxx.nc4 (contains instantaneous SpeciesConc_?ADV?)

  2. GEOSChem.StateMet.xxxxxxxxxxxxxx.nc4 (contains Met_PS1DRY).

Converting GEOS-Chem output to mozbc readable format

Use the MATLAB script convert_gcoutput_mozart_structure_selected_domain.m (GNU Octave may work as well) to merge the GEOS-Chem output files and reconstruct the data structure for mozbc to read.

Run the script in the GEOS-Chem output directory (OutputDir). Modify the script before running as follows:

  1. filename_input: set the input filename as any one of the GEOS-Chem species concentration output files, e.g. GEOSChem.SpeciesConc.20150601_0000z.nc4.

  2. filename_output: set the output filename freely.

  3. simulation_4_5/simulation_2_25:

If the resolution of global GEOS-Chem simulation is 2×2.5 degree, please set it as follows:

simulation_4_5               = false;
simulation_2_25              = true;

If the resolution of global GEOS-Chem simulation is 4×5 degree, please set it as follows:

simulation_4_5               = true;
simulation_2_25              = false;
  1. Set the time ranges for output file

startyr                      = 2015;
endyr                        = 2015;
startmon                     = 6;
endmon                       = 6;
startdate                    = 7;
enddate                      = 21;
  1. Set the domain for output file (needs to be larger than your WRF-GC domain)

If the resolution of global GEOS-Chem simulation is 2x2.5:

longitude: 0 (index 1):2.5:357.5 (index 144) latitude: -90 (index 1):2:90 (index 91)

Here is an example:

lon_left                     = 1;  % longitude of western lateral condition
lon_right                    = 73; % longitude of eastern lateral condition
lat_bottom                   = 46; % latitude of southern lateral condition
lat_upper                    = 91; % latitude of northern lateral condition

The netCDF file will be generated after running the script.

Preparing IC/BC file from CAM-chem/WACCM output

Refer to the WRF-Chem documentation.

Using mozbc

Building mozbc (only need to do once)

  1. Download a customized version of mozbc for WRF-GC’s hybrid sigma-eta grid. This is available at Xu Feng’s GitHub, fengx7/mozbc_for_WRFv3.9

git clone mozbc
  1. Go to the mozbc directory downloaded and configure the environment. Set up the path to your netCDF library

export NETCDF_DIR=/path/to/netcdf/here

The content inside $NETCDF_DIR should have include, … folders that correspond to netCDF.

  1. Compile mozbc. Run ./make_mozbc.

Configuring mozbc

Edit the input configuration file ending in .inp, corresponding to the version of GEOS-Chem you are using.

Configure the paths to the WRF input in dir_wrf (wrfinput_d01, wrfbdy_d01 … - run real.exe to generate these first) and the source netCDF file for IC/BC (created in step above). Make sure the paths end in trailing slashes (/)

dir_wrf = '/my/path/to/WRF/run/'
dir_moz = '/my/path/to/source/data/for/ic-bc/'
fn_moz  = ''

Run mozbc:

./mozbc < input.inp


If you want to change the species mapping or add new species, please modify the spc_map in the input file, e.g.: 'isoprene -> ISOP' where “isoprene” is the name of WRF-GC chemical species and “ISOP” is the name of GEOS-Chem species.

If the chemical IC/BC have been successfully written into the wrfinput_d<domain> and wrfbdy_d<domain> files, “bc_wrfchem completed successfully” will appear.