Step 1: Getting meteorological data from IFS or ERA5 reanalysis
Boundary conditions for WRF can be freely downloaded from ftp://ftp.ecmwf.int/pub/wrf. The output comes from ECMWF's operational HRES forecast and only one day's data is available. For more information please have a look at: ECMWF WRF Test Data. For those who have access to ECMWF MARS (access restricted) they can find the recipe how to retrieve the data for the past.
Alternatively, users can download the freely available ERA5 global reanalysis data from the C3S Climate Data Store (CDS) to drive WRF meteorological component. Please read through How to download ERA5. You also need to have a look at the parameter table in ECMWF WRF Test Data for retrieving relevant data.
If your version of the WRF model requires separate input GRIB files for each time step, you can easily split it using ecCodes:
$>grib_copy era_sfc_20100101-20100102.grib era_sfc_[validityDate][validityTime].grib $>grib_copy era_pl_20100101-20100102.grib era_pl_[validityDate][validityTime].grib
Step 2: Downloading CAMS data from MARS
2.1 Retrieving the data from MARS
We tested with the CAMS reanalysis data for driving the WRF-Chem model. Please have a look at how to download the CAMS Reanalysis data so that you have a good understanding of the scripts below. Scripts below are using ECMWF's Web API.
Script for retrieving aerosols, parameter names are given in the table bellow:
Param | Short Name | Long Name |
---|---|---|
t | Temperature | |
1.210 | aermr01 | Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio |
2.210 | aermr02 | Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio |
3.210 | aermr03 | Sea Salt Aerosol (5 - 20 um) Mixing Ratio |
4.210 | aermr04 | Dust Aerosol (0.03 - 0.55 um) Mixing Ratio |
5.210 | aermr05 | Dust Aerosol (0.55 - 0.9 um) Mixing Ratio |
6.210 | aermr06 | Dust Aerosol (0.9 - 20 um) Mixing Ratio |
7.210 | aermr07 | Hydrophobic Organic Matter Aerosol Mixing Ratio |
8.210 | aermr08 | Hydrophilic Organic Matter Aerosol Mixing Ratio |
9.210 | aermr09 | Hydrophobic Black Carbon Aerosol Mixing Ratio |
10.210 | aermr10 | Hydrophilic Black Carbon Aerosol Mixing Ratio |
11.210 | aermr11 | Sulphate Aerosol Mixing Ratio |
Script for retrieving global reactive gases, parameter names are given in the table bellow:
Param | Short Name | Long Name |
---|---|---|
203.210 | O3 | ozone |
123.210 | CO | carbonmonoxide |
27.217 | NO | nitrogen_monoxide |
121.210 | NO2 | nitrogen_dioxide |
13.217 | PAN | peroxyacetyl_nitrate |
6.217 | HNO3 | nitric_acid |
124.210 | CH2O | formaldehyde |
122.210 | SO2 | sulfur_dioxide |
Script for retrieving volatile organic compounds, parameter names are given in the table bellow:
param | Short Name | Long Name |
---|---|---|
52.217 | CH3COCH3 | acetone |
45.217 | C2H6 | ethane |
9.217 | PAR | paraffins |
42.217 | CH3OH | methanol |
47.217 | C3H8 | propane |
46.217 | C2H5OH | ethanol |
10.217 | C2H4 | ethene |
12.217 | ALD2 | aldehydes |
11.217 | OLE | olefins |
16.217 | C5H8 | isoprene |
43.217 | HCOOH | formic_acid |
7.217 | CH3OOH | methylperoxide |
15.217 | ONIT | organic_nitrates |
Script for retrieving h2o2:
Script for retrieving surface pressure:
2.2 Converting GRIB to NetCDF
Before running the script below you will need to have these packages installed:
You also need to download the get_tablecol script and table_tm5ver15htap.txt file into the same directory where script is to be run. The next step is to run the script below:
If the above script runs successfully, you should have the following files created:
AER_20100101_20100102_eac4_EU.nc GRG_20100101_20100102_eac4_EU.nc GRG_voc_20100101_20100102_eac4_EU.nc PS_20100101_20100102_eac4_EU.nc
Step 3: Using mozbc to interpolate CAMS data for WRF
With a set of additional utilities, it is possible to use the mozbc package provided by the Atmospheric Chemistry Observations and Modelling Lab (ACOM) of NCAR to pre-process CAMS data with some minor modifications to the original code. The set of additional utilities has been developed as part of the AQMEII project and kindly provided by A. Lupascu (IASS-Posdam) and C. Knote (NCAR): public_box.tar.gz. The package contains:
Directory ./ECMWF2WRFChem/ | |
---|---|
MACC_BC2MOZART.ncl | ncl script to convert CAMS files containing surface pressure, global reactive gases, and aerosols into a single file ready to be used by modified MOZBC package. |
convert.sh | Runs the ncl script. |
Directory ./ | |
mo_mozart_lib.patch | Patch for mo_mozart_lib.f90 program (part of original mozbc package). The file should be copied to mozbc/ and then executed: $>patch < mo_mozart_lib.patch |
saprc99.inp | Namelist. Defines input and output directories and which variables to interpolate to WRF grid. It is possible to use only those variables already defined in wrfinput_d01, which depends on chemical package and options selected in &chem section of WRF's namelist.input. Here, an example for SAPRC99 chemical mechanism coupled with the MOSAIC aerosol chemistry module with 4 size bins. The users have to provide their own mapping to get the chemical boundary condition for their preferred chemistry option. |
mozart.inp | A namelist example for mozart package. |
Step 4: Running the model
The first step is to run the WRF model but only up to real.exe. Instruction on how run the model are provided in WRF official user guide. Note that you should not execute the wrf.exe because we still do not have a chemical BC interpolated to the WRF grid. This will be created using the utility provided by AQMEII and the mozart package. Before running this step you should check and edit paths in convert.sh and MACC_BC2MOZART.ncl if necessary.
$> cd ECMWF2WRFChem/ $> ./convert.sh
This step converts four NetCDF files (AER_*, GRG_*, GRG_voc_*, and PS_*) into a single AQMEII_*.nc file.
Once it is completed you can run the next step. Unpack, mozbc.tar, go to the mozbc main directory, copy mo_mozart_lib.patch, install, edit path to WRF run directory in the saprc99.inp namelist, and finally run mozbc.
$> tar -xvf mozbc.tar $> cd mozbc/ $> cp public_box/mo_mozart_lib.patch . $> patch < mo_mozart_lib.patch $> make_mozbc $> mozbc < saprc99.inp > mozbc.out
This program will read NetCDF files created in the previous step (AQMEII_*.nc), chemical variables from it will be interpolated on WRF grid and added to wrfinput_d01 and wrfbdy_d01 files. Once this step has completed successfully you are ready to execute wrf.exe.