How to visualize WRF-Fire output in VAPOR

From openwfm
Revision as of 00:06, 3 September 2010 by Sousedik (talk | contribs)
Jump to navigation Jump to search

Prerequistes

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. The pictures below are from the "hill" ideal run in WRF-Fire.
  • If the visualization computer is different from the computer where you run WRF-Fire, transfer the wrfout file to the visualization computer
  • Convert the wrfout file for use with VAPOR: run from the command line
    • wrfvdfcreate yourwrfoutfile yourwdffile.vdf
    • wrf2vdf yourwdffile.vdf yourwrfoutfile
  • Start VAPOR by clicking on its icon or vaporgui from the command line
  • In the GUI, click "Data" on the top menu bar, then "load dataset in the current session", and navigate to the yourwdffile.vdf you have just created. In the black right panel, you should see an empty wireframe box from the top.
  • Click the "Flow" tab, check the box "Instance 1", click "OK" on a warning about flow lines below zero. Select "Refinement" 2. You should see a picture like this (the starting points of the flow lines are picked randomly so they are different in every session):

Vapor-flowlines-window.png

  • Click the "Animation" tab and move the "Frame position" slider to the middle (in the ideal "hill" example), or to a time when you know that the fire has already well developed. The flowlines should move a little.
  • Click the "2D" tab, check "Instance 1", select "Refinement" 2, and 2D variable GRNHFX, check "Apply color and opacity to terrain surface", and push the "Fit data" button at the bottom.
  • Rotate the image with a mouse to see something like this:

Vapor-fire-window.png

  • Click on the "Animation" tab, click on the rewind and play VCR controls, and watch the movie. If the movie is too slow, go back to the "Flow" tab and reduce the "Refinement" value.
  • To capture the movie, use "Capture", "Begin image capture sequence in visualizer 0", select directory, then run the movie, when done "Capture" "End image capture sequence". You get the movie frames as jpg files.
  • Use the DVR tab and other VAPOR features for a more advanced visualization as desired.

More advanced visualization

  • Optional: If you plan to work with large files (over 2GB), recompile NetCDF as: first export WRFIO_NCD_LARGE_FILE_SUPPORT=1 and then run
./configure  --disable-netcdf4 --disable-dap  --enable-large-file-tests --prefix=the contents of your NETCDF variable 

Note the "--enable-large-file-tests" switch and remeber that nco should also reflect this. On a Mac install nco simply as

sudo port update nco
  • If the wrfout file contains all WRF variables, we need to select the desired variables: U,V,W for wind streamlines, GRNHFX for fire, QVAPOR for smoke and AVG_FUEL_FRAC for the burned area.

The selection of variables (if wrfout contains more variables than needed) can be done in two ways:

  • create new NetCDF file with this variables by ("-O" switch overrides the file and if Times is not available, do not use it)
ncks -v U,V,W,QVAPOR,GRNHFX,AVG_FUEL_FRAC,PH,PHB,Times wrfout -O file
wrfvdfcreate file file.vdf
wrf2vdf file.vdf file

The wrfvdfcreate command creates a vdf metafile with a description of the data for Vapor and wrf2vdf created a directory file_data with the actual data.

  • the other option is to specify the variables in the wrfvdfcreate call, i.e., run
wrfvdfcreate -vars3d U:V:W:QVAPOR -vars2d GRNHFX:AVG_FUEL_FRAC  wrfout file.vdf
wrf2vdf file.vdf wrfout

This would create a directory wrfout_data with the same content as the directory file_data above.

  • Start VAPOR by clicking on its icon or vaporgui from the command line.
  • If you are provided a "Vapor saved session file" *.vss click "File" in the top menu bar and load this file by "Open session" dialogue. In either case, click "Data" in the top menu bar, then "load dataset in the current session", and navigate to the file.vdf (you might have just created). In the black right panel, you should see an empty wireframe box.
  • If you have a tiff image of the terrain click on the "Image" tab. If the the Image is not a geotiff (or you are not sure) uncheck "Georeference", then "Select Image File" and navigate to your file. Finally check "Apply image to terrain" and "Instance: 1". After the image is displayed you may also check "Crop to bounds" if needed.
  • Click the "Animation" tab and move the "Frame position" slider to a time when you know that the fire has already well developed.
  • Click the "2D" tab, select 2D variable GRNHFX, check "Refinement" 2, "Apply color and opacity to terrain surface", At the bottom click "Load TF" and select and push the "Fit data" button at the bottom. Finally, check "Instance 1". You should see the fire on the terrain.
  • Click the "Flow" tab, check the box "Instance 1", click "OK" on a warning about flow lines below zero. Select "Refinement" 2. You should see a picture like this (the starting points of the flow lines are picked randomly so they are different in every session): i

Works with

  • WRF-Fire May 26 2010 and hopefully later
  • VAPOR 1.5.2 and hopefully later
  • Tested on MacBook Pro 4GB OS X 10.6 GeForce 8600M GT 512MB