Coupling with WRF-Chem

From openwfm
Jump to navigation Jump to search

As of WRF 3.4, WRF-Chem is now included in the SFire repository. Work into coupling SFire with WRF-Chem is ongoing. See branch chem. As of April 21, 2012, a working template has been implemented to inject a tracer into the atmosphere. This implementation seems to work as expected.

SFire smoke tracer in action. See File:Smoke small.avi.

Compiling with chem support

Compiling the code with support for WRF-Chem is similar to the standard procedure. You must set an environment variable WRF_CHEM and configure with the argument chem as follows.

export WRF_CHEM=1
./configure chem
./compile em_fire

Running an idealized example

An idealized example based on the hill case has been created in test/em_fire/chem. This example doesn't quite work out of the box because WRF-Chem requires USGS landuse data that the ideal case doesn't initialize. To get this example working, you have to trick WRF into thinking that the input file contains USGS landuse data. (I'm not sure if this data is even used when just using passive tracers anyway.) To do this, you can just change the global attribute MMINLU in wrfinput_d01 to the string "USGS". A python script (make_usgs.py) that does this is included in the test/em_fire/chem directory, but it requires netcdf4-python to run. Assuming you have this module, the following will execute the example.

./ideal.exe
./make_usgs.py
./wrf.exe

The tracer will appear as an atmospheric variable in the output file with the name smoke.

Development notes