Difference between revisions of "How to run the standalone fire model in WRF-SFIRE"

From openwfm
Jump to navigation Jump to search
(updated for the just completed code)
Line 1: Line 1:
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.
+
{{users guide}}
 +
 
 +
The fire code in WRF-Fire, called SFIRE (for Spread FIRE model), can be used independently without WRF, using only one-way atmosphere-fire coupling. WRF needs to run first to create the atmospheric forcing first.
  
 
==Step by step instructions==
 
==Step by step instructions==
  
* [[How to get WRF-Fire|Download WRF-Fire]] and set the '''NETCDF''' environment variable as for building WRF-Fire
+
* [[How to get WRF-Fire|Download and build the coupled WRF fire software]] to create '''wrf.exe''' and leave the '''NETCDF''' environment variable set.
  
 
* '''cd wrf-fire/standalone'''
 
* '''cd wrf-fire/standalone'''
Line 9: Line 11:
 
* Find a suitable '''make.inc.*''' file and soft-link it to '''make.inc''', for example '''ln  -s make.inc.gfortran make.inc'''
 
* 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'''.  
+
* Navigate to a directory with your example (such as '''WRFV3/test/em_fire/hill'''). Make sure namelist.input specifies a short  '''history_interval_s''' (these will be the atmosphere states used by the fire model) and set large '''frames_per_outfile''' so that only one '''wrfout''' file is created.
 +
 
 +
* Run '''wrf.exe''' as usual.
 +
 
 +
* Link or rename the created '''wrfout''' file to '''fire_input.nc''''
 +
 
 +
* '''Run '''fire.exe''' in the same directory. This will create file '''fire_output.nc'''.
 +
 
 +
==How it works==
 +
 
 +
* The standalone model '''fire.exe''' reads the fire model inputs from the '''wrfout''', including interpolated wind fields '''UF''' and '''VF'''. Because the first frame in '''wrfout''' is called before the fire model is called and so those fields are not set yet, the fire model starts from the second frame. The atmosphere fields are interpolated linearly in time between the frames before they are passed to the fire model.
 +
 
 +
* The file '''fire_output.nc''' has the same format as '''wrfout''' but it contains only the variables that are the fire model outputs and some other fields copied from '''wrfout''', which are needed for visualization and interpreting the results. These include coordinates of the fire nodes in '''FXLONG''' and '''FXLAT''', the time string '''Times''', and the terrain height '''ZSF'''.
 +
 
 +
==Remarks==
  
* To run from the same inputs as WRF-Fire
+
* The results of the coupled model and the standalone model will not be identical, even if the coupled model runs the same fire, because the wind fields are interpolated between the frames for the standalone model. But the results should be close.
** [[How to run WRF-Fire|Build WRF-Fire]]
 
** 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'''
 
  
==Testing==
+
* To simulate different fires in the standalone model, the coupled model should run without ignition.  Then the coupled model will create the fire model inputs, but the atmosphere state will not be disturbed by the fire in the coupled model.
  
If you change anything in the files '''WRFV3/phys/module_fr_sfire_*.F''', you must test that the changes do not break WRF-Fire, otherwise your changes will not be maintainable.
+
* The '''&fire''' section in '''namelist.input''' can change, and the fuel data including '''namelist.fire''' may also change.
  
* Build WRF-Fire with SM+DM parallelism with debugging, and test all 4 versions (serial, SM, DM, SM+DM) with the examples provided in '''WRFV3/test/em_fire''' and various numbers of processors. The results (the '''wrfrst''' files) must be bit-identical to each other and identical to what they were before your changes.
+
* At the moment, '''fire.exe''' is serial only.
* Build WRF-Fire with optimization and test on several platforms (at least gfortran and PGI).
 
  
 
==Works with==
 
==Works with==
  
* {{WRF-Fire-branch|jm2/driver_wrf}} {{WRF-Fire-commit|8d8ef07dd3aec14bc298e5cfc55e051274e51e42|Aug 2 2010}}
+
* {{WRF-Fire-branch|jm2/devel}} {{WRF-Fire-commit|168fbfaa8a62061b51999001dc55162e2ac3a798|Oct 28 2011}}
* tested with gfortran 4.4 (gcc44 on Centos 5.5) and 4.3 (on OS X, from [http://www.macports.org/ MacPorts]), but will not compile under gfortran 4.1.2 (which is the default compiler distributed with RHEL5 and [http://www.centos.org Centos 5.5]) because of its lack of support of the Fortran 2003 standard
+
* Tested with gfortran 4.4.4 and pgf90 11.9 on Linux, and gfortran 4.3.3 on OSX (from   [http://www.macports.org/ MacPorts]).
* [http://www.pgroup.com/support/new_rel.htm PGI Fortran] 10.5 and hopefully later
 
  
 
==See also==
 
==See also==
  
 
* [[SFIRE|Fire model interface and standalone code description]]
 
* [[SFIRE|Fire model interface and standalone code description]]
 +
* [[SFIRE variables]]
  
 
[[Category:WRF-Fire]]
 
[[Category:WRF-Fire]]
 
[[Category:Howtos|Run the standalone fire model in WRF-Fire]]
 
[[Category:Howtos|Run the standalone fire model in WRF-Fire]]

Revision as of 18:17, 28 October 2011

Back to the WRF-SFIRE user guide.

The fire code in WRF-Fire, called SFIRE (for Spread FIRE model), can be used independently without WRF, using only one-way atmosphere-fire coupling. WRF needs to run first to create the atmospheric forcing first.

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
  • Navigate to a directory with your example (such as WRFV3/test/em_fire/hill). Make sure namelist.input specifies a short history_interval_s (these will be the atmosphere states used by the fire model) and set large frames_per_outfile so that only one wrfout file is created.
  • Run wrf.exe as usual.
  • Link or rename the created wrfout file to fire_input.nc'
  • Run fire.exe in the same directory. This will create file fire_output.nc.

How it works

  • The standalone model fire.exe reads the fire model inputs from the wrfout, including interpolated wind fields UF and VF. Because the first frame in wrfout is called before the fire model is called and so those fields are not set yet, the fire model starts from the second frame. The atmosphere fields are interpolated linearly in time between the frames before they are passed to the fire model.
  • The file fire_output.nc has the same format as wrfout but it contains only the variables that are the fire model outputs and some other fields copied from wrfout, which are needed for visualization and interpreting the results. These include coordinates of the fire nodes in FXLONG and FXLAT, the time string Times, and the terrain height ZSF.

Remarks

  • The results of the coupled model and the standalone model will not be identical, even if the coupled model runs the same fire, because the wind fields are interpolated between the frames for the standalone model. But the results should be close.
  • To simulate different fires in the standalone model, the coupled model should run without ignition. Then the coupled model will create the fire model inputs, but the atmosphere state will not be disturbed by the fire in the coupled model.
  • The &fire section in namelist.input can change, and the fuel data including namelist.fire may also change.
  • At the moment, fire.exe is serial only.

Works with

See also