Difference between revisions of "How to visualize WRF-Fire output in Matlab"

From openwfm
Jump to navigation Jump to search
Line 6: Line 6:
 
==Directions==
 
==Directions==
  
* Change in '''namelist.input''' the line with '''history_interval''' to the desired frame interval in seconds, for example '''history_interval_s=1'''. Make sure '''frames_per_outfile''' is large enough so that only one '''wrfout''' file is produced.
+
* [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#Nml Change in '''namelist.input'''] the line with '''history_interval''' to the desired frame interval in seconds, for example '''history_interval_s=1'''. Make sure '''frames_per_outfile''' is large enough so that only one '''wrfout''' file is produced.
 
* Run WRF-Fire.
 
* Run WRF-Fire.
 
* If the visualization computer is different from the computer where you run WRF-Fire,
 
* If the visualization computer is different from the computer where you run WRF-Fire,
Line 12: Line 12:
 
** Transfer the '''wrfout''' file to the visualization computer
 
** Transfer the '''wrfout''' file to the visualization computer
 
* Start Matlab on the visualization computer from the directory '''wrf-fire/WRFV3/test/em_fire'''. This is needed to set Matlab search path. Alternatively, '''cd''' in Matlab to this directory and run '''startup'''.  You can then '''cd''' to the directory where you put the '''wrfout''' file if you want.
 
* Start Matlab on the visualization computer from the directory '''wrf-fire/WRFV3/test/em_fire'''. This is needed to set Matlab search path. Alternatively, '''cd''' in Matlab to this directory and run '''startup'''.  You can then '''cd''' to the directory where you put the '''wrfout''' file if you want.
* Type in Matlab '''help runvis3d''' and follow the instructions.
+
* Type in Matlab '''wrfout2frame3d'''
  
 
The scripts are fairly straightforward and various options are controlled by editing the scripts in Matlab.
 
The scripts are fairly straightforward and various options are controlled by editing the scripts in Matlab.

Revision as of 20:04, 7 August 2010

Prerequistes

  • A computer for visualization with recent Matlab and memory at least 3 times the size of the wrfout file.
  • A working installation of WRF-Fire, possibly on another computer or a cluster.

Directions

  • Change in namelist.input the line with history_interval to the desired frame interval in seconds, for example history_interval_s=1. Make sure frames_per_outfile is large enough so that only one wrfout file is produced.
  • Run WRF-Fire.
  • If the visualization computer is different from the computer where you run WRF-Fire,
    • Download WRF-Fire on the visualization computer
    • Transfer the wrfout file to the visualization computer
  • Start Matlab on the visualization computer from the directory wrf-fire/WRFV3/test/em_fire. This is needed to set Matlab search path. Alternatively, cd in Matlab to this directory and run startup. You can then cd to the directory where you put the wrfout file if you want.
  • Type in Matlab wrfout2frame3d

The scripts are fairly straightforward and various options are controlled by editing the scripts in Matlab.

Gallery

Hill2-jan.png WRF-Fire-walking-ignition-matlab.png

Works with

  • WRF-Fire commit 0098ec2f615bc598f829d551169424e6fd55f1c5 and later
  • Matlab 2008b and later
  • Tested with Matlab 2010a on MacBook Pro 4GB OS X 10.6