Difference between revisions of "How to run WRF-SFIRE"

From openwfm
Jump to navigation Jump to search
m (Afarguell moved page How to run WRF-Fire to How to run WRF-SFIRE: Change of code name)
(No difference)

Revision as of 15:18, 2 July 2020

Back to the WRF-SFIRE user guide.

This Howto shows how to build WRF-SFIRE and run an ideal test case.

Prerequisites

The prerequisites are given by the needs of building WRF.

  • NetCDF, must be built with the Fortran interface using the same compiler as used for WRF.
    • Set the environment variables FC and F90 to your Fortran compiler, and NETCDF to where you want to install NETCDF. Best add to your startup files.
    • ./configure --prefix=the contents of your NETCDF variable
    • make
    • make install
  • MPI (for a distributed memory build only), must be built with the Fortran interface using the same compiler as used for WRF. Make sure mpicc and mpif90 are on the search path.

Step by step directions

  • Get WRF-SFIRE from the repository or a mirror.
  • cd WRF-SFIRE
  • ./clean -a to delete the remains of any previous build and ensure start from a known state
  • ./configure, choose nesting 1=basic.
  • ./compile em_fire >& compile.log
  • Search for Err in compile.log. If not found, all is well.
    • If you see error like mpif90: -f90=something option not recognized, run ./clean -a; rerun ./configure, edit the file configure.wrf and change the line DM_FC = mpif90 -f90=$(SFC) to read just DM_FC = mpif90 Unfortunately, some versions of MPI crash with the -f90 flag, and some crash without. You will need to repeat this every time after you run ./configure.
  • cd test/em_fire/hill
  • if there is no namelist.input file, link an existing case, such as ln -s namelist.input.hill namelist.input
  • ./ideal.exe
  • ./wrf.exe

NetCDF large file support

By default, WRF will write classic format NetCDF files that are limited to a total 2 GB in size. Recent versions of NetCDF support much larger files using a 64 bit offset format [1]. One can configure WRF at build time to write files using the 64 bit offset format by setting the environment variable WRFIO_NCD_LARGE_FILE_SUPPORT to 1 before compiling. Older applications that are built against NetCDF libraries without large file support will not be able to read output files created using this option. Even with large file support, there are constraints on the size of individual variables that can be created in an output file. This effectively limits the maximum domain size of WRF-Fire to around a 10,000 x 10,000 fire grid.

NetCDF4/HDF5 output file support

As of Oct 16, 2010, WRF-Fire supports compilation with NetCDF4 built with HDF5 support. This allows the output of much larger domains than is possible even with large file support. This feature is currently exclusive to WRF-Fire as the necessary changes in the code and build system have not yet been included in the standard WRF release. We advise users to avoid using HDF output format unless absolutely necessary because many utilities and API's have not been updated to read these files.

To build WRF-Fire to output HDF formatted NetCDF files, you will need to build NetCDF with HDF support. First, download and install HDF5 1.8.x. Extract the source package and install as described above. Assuming you installed HDF to the path in the environment variable NETCDF, you can compile NetCDF as follows:

./configure --enable-netcdf4 --with-hdf5=${NETCDF} --prefix=${NETCDF}
make
make install

By default, WRF-Fire will still create classic NetCDF files for output even when linking with an HDF5 capable library. To override this, set the environment variable WRFIO_NETCDF4_FILE_SUPPORT to 1 and WRFIO_NCD_LARGE_FILE_SUPPORT unset or set to 0 before compiling. NetCDF version 4 files are capable of transparent compression of the output files using zlib for only a small performance hit. To enable compression of output files, set WRFIO_NETCDF4_GZIP_LEVEL to an integer between 1 and 9. (The NetCDF developers recommend only using a value of 2 or 3.)

Works with

June 2010

  • WRF-Fire Jun 12 2010 based on WRF 3.2
  • NETCDF 4.1.1
  • Linux x64 gfortran/gcc 4.4
  • Mac OS X 10.6 gfortran/gcc 4.3 (from Mac Ports)

January 2010

WRF-Fire Nov 15 2009 works with NetCDF 4, MPI 2, and

  • PGI Fortran 8.0 and gcc 4.3.4 on Linux Gentoo 5 64bit
  • Intel Fortran 11 and gcc 4.4.1 on Fedora 11 64bit
  • gfortran/gcc 4.3.4 on Linux Gentoo 5 64bit
  • gfortran/gcc 4.3.0 on Mac OS X Snow Leopard