How to run the standalone fire model in WRF-SFIRE

From openwfm
Jump to navigation Jump to search

The fire code in WRF-Fire, called SFIRE (for Spread FIRE model), can be used independently without WRF for testing. To make comparison easier, it can run from the same inputs as WRF-Fire.

Step by step instructions

  • cd wrf-fire/standalone
  • Find a suitable make.inc.* file and soft-link it to make.inc, for example ln -s make.inc.gfortran make.inc
  • Type make to create fire.exe
  • Change to one of the test directories, for example cd ../WRFV3/test/em_fire/hill
  • Run ./ideal.exe to create the file wrfinput_d01
  • Run ./fire.exe

Interface between WRF and SFIRE

  • The defined interface to SFIRE is between WRFV3/phys/module_fr_sfire_driver_wrf.F and subroutine sfire_driver_em in WRFV3/phys/module_fr_sfire_driver.F
  • The arguments of sfire_driver_em consist of two structures (called derived types in Fortran), grid, which contains all state, input, and output variables, and config_flags, with all variables read from from namelist.input, plus some array dimensions.
  • The standalone code defines its own grid derived type with only the subset of the fields needed, and replicates config_flags from WRF.
  • All fields in grid are set in the standalone driver main file, model_test_main.F, and nothing is hidden elsewhere.
  • SFIRE is compliant with WRF coding conventions. WRF divides the horizontal domain into patches and divides the patches into tiles. Each patch executes in one MPI process. Each tile is updated by one OpenMP thread.
    • The SFIRE standalone code is capable of parallel execution in shared memory. Division into tiles is controlled by fields in grid. There is only one OpenMP loop over the tiles, in WRFV3/phys/module_fr_sfire_driver.F. The rest of the SFIRE code executes on a single tile, starting from WRFV3/phys/module_fr_sfire_model.F Because the tiles need to access values from neighboring tiles in various stages of the computation, the parallel loop is executed several times within a single invocation of SFIRE.
    • When SFIRE runs in distributed memory, the communication between the patches is done in includes in WRFV3/phys/module_fr_sfire_driver.F (search for HALO). This has no effect in the standalone code; in WRF, the includes are provided by the WRF parallel infrastructure, RSL-Lite.

Works with

  1. REDIRECT Template:WRF-Fire-branch Jul 31 2010
  • tested with gfortran 4.4 (gcc44 on Centos 5.5) and 4.3 (on OS X, from MacPorts), but will not compile under gfortran 4.1.2 (which is the default compiler distributed with RHEL5 and Centos 5.5) because of its lack of support of the Fortran 2003 standard
  • PGI Fortran 10.5 and hopefully later