Difference between revisions of "Coupling with WRF-Chem"
Line 14: | Line 14: | ||
==Running an idealized example== | ==Running an idealized example== | ||
+ | An idealized example based on the hill case has been created in <tt>test/em_fire/chem</tt>. | ||
+ | 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 <tt>MMINLU</tt> in | ||
+ | <tt>wrfinput_d01</tt> to the string "<tt>USGS</tt>". A python script (<tt>make_usgs.py</tt>) | ||
+ | that does this is included in the <tt>test/em_fire/chem</tt> directory, but it requires | ||
+ | [http://code.google.com/p/netcdf4-python/ netcdf4-python] to run. Assuming you have this module, the | ||
+ | following will execute the example. | ||
+ | <pre> | ||
+ | ./ideal.exe | ||
+ | ./make_usgs.py | ||
+ | ./wrf.exe | ||
+ | </pre> | ||
+ | The tracer will appear as an atmospheric variable in the output file with the name <tt>smoke</tt>. | ||
==Development notes== | ==Development notes== |
Revision as of 23:54, 21 April 2012
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.
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.