Page info infoType Modified date prefix Last modified on type Flat
Info | ||||
---|---|---|---|---|
| ||||
|
Easy Heading Macro navigationExpandOption collapse-all-but-headings-1-2
Step 1: Getting meteorological data from IFS or ERA5 reanalysis
...
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.
...
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 via the ECMWF Web API so 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 |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
'dataset' : "cams_reanalysis | ||||||
Code Block | ||||||
| ||||||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ 'dataset' : "cams_reanalysis", 'class' : "mc", 'type' : "an", 'stream' : "oper", 'expver' : "eac4", 'levtype' : "ml", 'repres' : "gg", 'levellist' : "7/to/60", 'param' : "T/1.210/2.210/3.210/4.210/5.210/6.210/7.210/8.210/9.210/10.210/11.210", 'date' : "20100101/to/20100102", 'step' : "0", 'timeclass' : "0/to/21/by/3mc", 'grid' type' : "0.75/0.75an", 'stream' 'target : "oper", 'expver' : "AER_20100101_20100102_eac4.grib" }) | ||||||
Code Block | ||||||
| ||||||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ 'dataset' : "cams_reanalysis, 'levtype' : "ml", 'repres' : "gg", 'levellist' : "7/to/60", 'classparam' : "mcT/1.210/2.210/3.210/4.210/5.210/6.210/7.210/8.210/9.210/10.210/11.210", 'typedate' : "an20100101/to/20100102", 'stream' : "oper", 'expver'step' : "eac40", 'levtypetime' : "ml", 'repres' : "gg0/to/21/by/3", 'levellistgrid' : "7/to/600.75/0.75", 'paramtarget' : "203.210/123.210/27.217/121.210/13.217/6.217/124.210/122.210", 'date' : "20100101/to/20100102", 'step' : "0", 'time' : "0/to/21/by/3", 'grid' : "0.75/0.75", 'target' : "GRG_20100101_20100102_eac4.grib" }) AER_20100101_20100102_eac4.grib" }) |
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 |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
'dataset' : "cams_reanalysis",
'class' : "mc",
'type' : "an",
'stream' : "oper",
'expver' : "eac4",
'levtype' : "ml",
'repres' : "gg",
'levellist' : "7/to/60",
'param' : "203.210/123.210/27.217/121.210/13.217/6.217/124.210/122.210",
'date' : "20100101/to/20100102",
'step' : "0",
'time' : "0/to/21/by/3",
'grid' : "0.75/0.75",
'target' : "GRG_20100101_20100102_eac4.grib"
})
|
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 |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ 'dataset' : "cams_reanalysis", 'class' : "mc", 'type' : "an", 'stream' : "oper", 'expver' : "eac4", 'levtype' : "ml", 'repres' : "gg", 'levellist' : "7/to/60", 'param' : "52.217/45.217/9.217/42.217/47.217/46.217/10.217/12.217/11.217/16.217/43.217/7.217/15.217", 'date' : "20100101/to/20100102", 'step' : "0", 'time' : "0/to/21/by/3", 'grid' : "0.75/0.75", 'target' : "GRG_voc_20100101_20100102_eac4.grib" }) |
Script for retrieving h2o2:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ 'dataset' : "cams_reanalysis", 'class' : "mc", 'type' : "an", 'stream' : "oper", 'expver' : "eac4", 'levtype' : "ml", 'repres' : "gg", 'levellist' : "7/to/60", 'param' : "3.217", 'date' : "20100101/to/20100102", 'step' : "0", 'time' : "0/to/21/by/3", 'grid' : "0.75/0.75", 'target' : "GRG_h2o2_20100101_20100102_eac4.grib" }) |
Script for retrieving surface pressure:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ 'dataset' : "cams_reanalysis", 'class' : "mc", 'type' : "an", 'stream' : "oper", 'expver' : "eac4", 'levtype' : "ml", 'repres' : "gg", 'levellist' : "1", 'param' : "152", 'date' : "20100101/to/20100102", 'step' : "0", 'time' : "0/to/21/by/3", 'grid' : "0.75/0.75", 'target' : "PS_20100101_20100102_eac4.grib" }) |
...
Before running the script below you will need to have these packages installed:
You also need to download the get_tablecol script and and table_tm5ver15htap.txt file into the same directory where script is to be run. The next step is to run the script below:
...
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.
No Format |
---|
$> 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.
No Format |
---|
$> 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 |
...
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.
No Format |
---|
$> 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.
No Format |
---|
$> 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.
Info | ||
---|---|---|
| ||
This document has been produced in the context of theCopernicus Atmosphere Monitoring Service (CAMS). The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of CAMS on behalf of the European Union (Delegation Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose. The users thereof use the information at their sole risk and liability. For the avoidance of all doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts have no liability in respect of this document, which is merely representing the author's view |
...
. |
Content by Label | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...