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
wrfinput_d01(initial conditions), and
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
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:
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:
filename_input: set the input filename as any one of the GEOS-Chem species concentration output files, e.g.
filename_output: set the output filename freely.
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;
Set the time ranges for output file
startyr = 2015; endyr = 2015; startmon = 6; endmon = 6; startdate = 7; enddate = 21;
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.
Building mozbc (only need to do once)
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 https://github.com/fengx7/mozbc_for_WRFv3.9.git mozbc
Go to the mozbc directory downloaded and configure the environment. Set up the path to your netCDF library
The content inside
$NETCDF_DIR should have
include, … folders that correspond to netCDF.
Compile mozbc. Run
Edit the input configuration file ending in
.inp, corresponding to the version of GEOS-Chem you are using.
GEOS-Chem 14.0.0 with Simple SOA: GEOSCHEM_v14_0_0_SimpleSOA.inp
GEOS-Chem 13.4.x: GEOSCHEM_v13_4_0.inp
GEOS-Chem 12.8.x: GEOSCHEM_v12_8_1.inp
GEOS-Chem 12.2.1: GEOSCHEM_v12_2_1.inp
Configure the paths to the WRF input in
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 = 'wrfgc_icbc_data_test1.nc'
./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
wrfbdy_d<domain> files, “bc_wrfchem completed successfully” will appear.