User Tools

Site Tools


Installing WRF-Fire on Mac OS X

These are ongoing notes describing the steps to install WRF-Fire on a Mac Mini Core 2 Duo running OS X 10.6.8 (Snow Leopard).

System prerequisites

Installed via homebrew:

  • git
  • wget
  • netcdf
  • hdf5
  • jasper

Note: NetCDF needs to be compiled with the Fortran interface support: brew install netcdf –enable-fortran. This didn't work with my previous set-up (Xcode 3.2.6, gfortran-4.2 from Homebrew). I downloaded a DMG of gfortran and gcc 4.6.2 and installed that. It seems to work … for the moment.

Environment variables

export NETCDF
export FC
export F90

Installation steps

Download WER-Fire from Github:

$ git clone git://

Note: This will install WRF 3.2. However, the fire code is included with WRF since this version and is available as a compilation option also in the current version 3.4. (see the WRF-Fire for Wildland Fire page).

Run configuration script:

$ ./configure

This will warn for missing environment variables. Select the appropriate platform target (15. Darwin (MACOS) gfortran with gcc (serial)) and '1' for 'basic nesting'. Then compile: '

$ ./compile em_fire > compile.log 2>&1 &

This redirects both STDERR and STDOUT to the log file. Next step is to fix all errors in the log file.

Note: Between each ./configure run, remove old objects from the environment by running

$ ./clean

Running an ideal test case

Once WRF compiles with no errors left in compile.log, you can run an idealized test case included with the code. Note that the code from the Wildifire Modelling wiki includes a larger number of test cases than the WRF-Fire code that comes with WRF v. 3.2 or greater. The configuration files (namelist.* files and sounding.input) have to be copied from the respective subdirectory to the test directory.

$ cd test/em_fire
$ cp hill/* . 
$ ./ideal.exe
$ ./wrf.exe

For further instructions see the WRF User Guide. The output comes in wrfout files that can be visualized with ncview. It looks, for example, like this (variable T):

Running a real case

This requires compiling WPS (the WRF Preprocessing System). I'm not quite there yet.

installing_wrf-fire_on_a_mac.txt · Last modified: 2012/09/13 17:39 by chris