<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openwfm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbeezley</id>
	<title>openwfm - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openwfm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbeezley"/>
	<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/wiki/Special:Contributions/Jbeezley"/>
	<updated>2026-04-22T15:49:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2795</id>
		<title>How to convert data for Geogrid</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2795"/>
		<updated>2013-10-09T14:14:26Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Moving all documentation and code to new repository.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
&lt;br /&gt;
See the github repository for [https://github.com/jbeezley/convert_geotiff.git convert_geotiff] for the latest documentation and source code.&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF-Fire]]&lt;br /&gt;
[[Category:Howtos|Convert data for Geogrid]]&lt;br /&gt;
[[Category:Data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2741</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2741"/>
		<updated>2013-05-06T08:46:51Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin&lt;br /&gt;
&lt;br /&gt;
[http://mxcl.github.io/homebrew/ Homebrew] install commands&lt;br /&gt;
 brew install gfortran&lt;br /&gt;
 brew install netcdf --enable-fortran&lt;br /&gt;
&lt;br /&gt;
[https://www.virtualbox.org/ VirtualBox] [http://www-math.ucdenver.edu/~jbeezley/data/SFIRE_tutorial.ova virtual machine] with dependencies installed (user: sfire password: sfire).&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2740</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2740"/>
		<updated>2013-05-06T08:45:20Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin&lt;br /&gt;
&lt;br /&gt;
[http://mxcl.github.io/homebrew/ Homebrew] install commands&lt;br /&gt;
 brew install gfortran&lt;br /&gt;
 brew install netcdf --enable-fortran&lt;br /&gt;
&lt;br /&gt;
[https://www.virtualbox.org/ VirtualBox] [http://www-math.ucdenver.edu/~jbeezley/data/SFIRE_tutorial.ova virtual machine] with dependencies installed.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2737</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2737"/>
		<updated>2013-05-03T09:15:31Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin&lt;br /&gt;
&lt;br /&gt;
[http://mxcl.github.io/homebrew/ Homebrew] install commands&lt;br /&gt;
 brew install gfortran&lt;br /&gt;
 brew install netcdf --enable-fortran&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2736</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2736"/>
		<updated>2013-05-03T08:12:15Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin libcloog-ppl10&lt;br /&gt;
&lt;br /&gt;
[http://mxcl.github.io/homebrew/ Homebrew] install commands&lt;br /&gt;
 brew install gfortran&lt;br /&gt;
 brew install netcdf --enable-fortran&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2735</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2735"/>
		<updated>2013-05-03T08:11:54Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin libcloog-ppl10&lt;br /&gt;
&lt;br /&gt;
[http://mxcl.github.io/homebrew/ Homebrew] install command&lt;br /&gt;
 brew install gfortran&lt;br /&gt;
 brew install netcdf --enable-fortran&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2734</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2734"/>
		<updated>2013-05-03T07:37:22Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;br /&gt;
&lt;br /&gt;
Ubuntu install command&lt;br /&gt;
 sudo apt-get install tcsh git build-essential m4 gfortran libnetcdf-dev netcdf-bin libcloog-ppl10&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2733</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2733"/>
		<updated>2013-05-03T07:27:26Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;br /&gt;
* git&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2732</id>
		<title>Cargese 2013 tutorial session</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Cargese_2013_tutorial_session&amp;diff=2732"/>
		<updated>2013-05-03T07:20:03Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Starting cargese tutorial session setup page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of requirements:&lt;br /&gt;
* Standard build utilities&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** cshell&lt;br /&gt;
** perl&lt;br /&gt;
** gcc&lt;br /&gt;
** etc&lt;br /&gt;
* gfortran&lt;br /&gt;
* NetCDF&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_create_a_fire_portal_compute_server&amp;diff=2552</id>
		<title>How to create a fire portal compute server</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_create_a_fire_portal_compute_server&amp;diff=2552"/>
		<updated>2012-09-14T05:28:25Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Compute server setup information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The fire portal compute server is the backend of [http://wildfire.sci.utah.edu], which is responsible for &lt;br /&gt;
the computational tasks of generating the fire outputs.  This page describes how to install all the necessary&lt;br /&gt;
software on a fresh install of Ubuntu Server 12.4.  Installing on a different operating system is also possible,&lt;br /&gt;
but the user must figure out the correct package names from the package manager.  In general, the following&lt;br /&gt;
software is necessary to run the compute server:&lt;br /&gt;
* Tools to build WRF&lt;br /&gt;
** fortran compiler&lt;br /&gt;
** make&lt;br /&gt;
** m4&lt;br /&gt;
** tcsh&lt;br /&gt;
** perl&lt;br /&gt;
** netcdf development libraries&lt;br /&gt;
** Geotiff development libraries&lt;br /&gt;
** jasper development libraries&lt;br /&gt;
** png development libraries&lt;br /&gt;
* Tools for running the compute server&lt;br /&gt;
** python version 2.6 or 2.7 with development libraries&lt;br /&gt;
** git&lt;br /&gt;
** openssh server and client&lt;br /&gt;
** GDAL with python support&lt;br /&gt;
* Python modules (most can be found in the package manager or easy_install/pip)&lt;br /&gt;
** netCDF4&lt;br /&gt;
** GitPython&lt;br /&gt;
** percache&lt;br /&gt;
** mechanize&lt;br /&gt;
** BeautifulSoup&lt;br /&gt;
** simplekml&lt;br /&gt;
&lt;br /&gt;
=OS and software installation=&lt;br /&gt;
&lt;br /&gt;
For the remainder of this guide, it is assumed that you have installed Ubuntu Server 12.4 with user name wildfire.  Once you are logged in to the terminal, it is&lt;br /&gt;
recommended that you do a system update and restart.&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get dist-upgrade&lt;br /&gt;
 sudo restart&lt;br /&gt;
Now you need to install required software from the apt repository.&lt;br /&gt;
 sudo apt-get install python-pip gfortran libnetcdf-dev netcdf-bin   \&lt;br /&gt;
              libhdf5-serial-dev python-dev python-matplotlib        \&lt;br /&gt;
              python-matplotlib-data tcsh git build-essential m4     \&lt;br /&gt;
              libcloog-ppl10 openssh-server libjasper-dev libpng-dev \&lt;br /&gt;
              libgeotiff-dev gdal-bin python-gdal&lt;br /&gt;
Next, install python modules available in pip.&lt;br /&gt;
 sudo pip install netCDF4 GitPython percache mechanize BeautifulSoup simplekml&lt;br /&gt;
&lt;br /&gt;
Set the ssh server to start by default.&lt;br /&gt;
 sudo update-rc.d ssh defaults&lt;br /&gt;
&lt;br /&gt;
Add environment variables to the shell rc file.&lt;br /&gt;
 echo &#039;export NETCDF=/usr&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 echo &#039;export LIBTIFF=/usr&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 echo &#039;export GEOTIFF=/usr&#039; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Finally, reboot the computer.&lt;br /&gt;
 sudo reboot&lt;br /&gt;
&lt;br /&gt;
=WRF and server code checkout and configuration=&lt;br /&gt;
Checkout software from our git repository.&lt;br /&gt;
 git clone repo.openwfm.org:/home/git/wrf-fire.git&lt;br /&gt;
 git clone repo.openwfm.org:/home/git/WRF-GoogleEarth.git&lt;br /&gt;
&lt;br /&gt;
Now, you need to compile WRF and WPS to generate a template run directory that the &lt;br /&gt;
compute server will use to execute the simulation.&lt;br /&gt;
 cd wrf-fire/wrfv2_fire&lt;br /&gt;
 echo &#039;9&lt;br /&gt;
 1&#039; | ./configure &lt;br /&gt;
 ./compile em_real&lt;br /&gt;
 cd ../WPS&lt;br /&gt;
 echo 6 | ./configure&lt;br /&gt;
 ./compile&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Now, generate template tarball firesim.tar in ~/wrf-fire.&lt;br /&gt;
 ~/WRF-GoogleEarth/computeserver/makeTemplate.sh&lt;br /&gt;
&lt;br /&gt;
Next, you will need to create a file in the home directory called &amp;lt;tt&amp;gt;.globalConfig.txt&amp;lt;/tt&amp;gt;.  This&lt;br /&gt;
contains basic information about that the computer setup that the server will use to execute the&lt;br /&gt;
simulation.  A template of this file can be found in &amp;lt;tt&amp;gt;~/WRF-GoogleEarth/computeserver/globalConfig.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
For this setup, you can paste the following into this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;[server]&lt;br /&gt;
mainDir=/home/wildfire/run&lt;br /&gt;
repoDir=/home/wildfire/wrf-fire&lt;br /&gt;
wrfConfig=%(repoDir)s/wrfv2_fire/configure.wrf&lt;br /&gt;
wpsConfig=%(repoDir)s/WPS/configure.wps&lt;br /&gt;
netCDFpath=/usr&lt;br /&gt;
wpsData=/home/wildfire/geog&lt;br /&gt;
ldPath=&lt;br /&gt;
templateDir=/home/wildfire/wrf-fire/firesim.tar&lt;br /&gt;
&lt;br /&gt;
[cache]&lt;br /&gt;
cachefile=/home/wildfire/cache/cache.db&lt;br /&gt;
livesync=True&lt;br /&gt;
filestore=/home/wildfire/cache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, create directories that the server will use for execution.&lt;br /&gt;
 mkdir ~/cache&lt;br /&gt;
 mkdir ~/log&lt;br /&gt;
 mkdir ~/run&lt;br /&gt;
&lt;br /&gt;
=Testing the installation=&lt;br /&gt;
To make sure everything is working correctly, create a test parameter file and run the simulation code.&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir results&lt;br /&gt;
mkdir test&lt;br /&gt;
cd test&lt;br /&gt;
echo &#039;centerLat=40.07160929510595&lt;br /&gt;
centerLon=-105.9405756939366&lt;br /&gt;
ign_radius=10&lt;br /&gt;
dx=100&lt;br /&gt;
dy=100&lt;br /&gt;
nx=40&lt;br /&gt;
ny=41&lt;br /&gt;
ignLat=40.07160929510595&lt;br /&gt;
ignLon=-105.9405756939366&lt;br /&gt;
ignTime=2011-10-05_00:01:00&lt;br /&gt;
runTime=1&lt;br /&gt;
spinupTime=.001&lt;br /&gt;
map_proj=lambert&lt;br /&gt;
uploadpath=localhost:results&#039; &amp;gt; params.txt&lt;br /&gt;
 &lt;br /&gt;
python ~/WRF-GoogleEarth/computeserver/fireSim.py testsession params.txt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will run a simulation and output kmz files to ~/results.  Check logs in ~/log and the run directory in ~/run/testsession in case&lt;br /&gt;
any errors occur.&lt;br /&gt;
&lt;br /&gt;
=Connecting to a web server=&lt;br /&gt;
At this point, the compute server is fully configured.  All that remains is to ensure that there is a way to ssh into the web server without a password using the ~/.ssh/authorized_keys file.  The&lt;br /&gt;
web server must also be able to log into the compute server passwordlessly as well.  See the web server configuration guide for information on how to connect the portal to this compute server.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_ingest_heat_flux_data&amp;diff=2551</id>
		<title>How to ingest heat flux data</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_ingest_heat_flux_data&amp;diff=2551"/>
		<updated>2012-09-11T08:12:13Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When dealing with real data, it is often necessary to reproject and interpolate raw data sources onto a WRF simulation grid.  This is possible&lt;br /&gt;
using WPS in a manner similar to the method used [[How to run WRF-Fire with real data|here]].  This page illustrates this procedure on &lt;br /&gt;
MODIS heat flux data.  The source data is converted and interpolated from its native geotiff format into a WRF compatible netCDF file where it can be &lt;br /&gt;
merged into a wrfinput file or analyzed using standard netCDF tools.&lt;br /&gt;
&lt;br /&gt;
=Converting data to geotiff=&lt;br /&gt;
&lt;br /&gt;
The method outlined here requires data in a geotiff format; however, not all data comes in this form.  Most GIS utilities provide converters to save data &lt;br /&gt;
in geotiff format.  One free and cross platform utility for accomplishing this is the [http://www.gdal.org/gdal_translate.html gdal_translate] command, which&lt;br /&gt;
is part of the Geospatial Data Abstraction Library (GDAL) [http://www.gdal.org/].  Often it is sufficient to run the following command to perform the conversion:&lt;br /&gt;
 gdal_translate -of GTiff &amp;lt;source dataset&amp;gt; &amp;lt;destination dataset&amp;gt;&lt;br /&gt;
GDAL command line scripts are also capable of performing reprojection as well as simple processing of nearly any GIS file format.&lt;br /&gt;
&lt;br /&gt;
=Interpolating data onto a model grid using geogrid=&lt;br /&gt;
&lt;br /&gt;
Using the original &amp;lt;tt&amp;gt;namelist.wps&amp;lt;/tt&amp;gt; used to create the domain.  It is relatively simple to rerun geogrid with an additional dataset from&lt;br /&gt;
your source data.  In this example, we will use the namelist linked [https://gist.github.com/3696702 here] and the geotiff data at [[File:O9820-B65-P1 fire mask.tif]].&lt;br /&gt;
*Compile WPS as described [[WPS with GeoTIFF support|here]] to enable geotiff support.&lt;br /&gt;
*Edit the geogrid table at &amp;lt;tt&amp;gt;geogrid/GEOGRID.TBL&amp;lt;/tt&amp;gt; to contain the new variable.  See the list of table parameters  [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Description_of_GEOGRID.TBL here].  You can remove all of the variables present&lt;br /&gt;
with the exception of &amp;lt;tt&amp;gt;LANDUSEF&amp;lt;/tt&amp;gt; to save on computation time.  A minimal table is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;===============================&lt;br /&gt;
name=LANDUSEF&lt;br /&gt;
        priority=1&lt;br /&gt;
        dest_type=categorical&lt;br /&gt;
        z_dim_name=land_cat&lt;br /&gt;
        landmask_water =   modis_30s:17            # Calculate a landmask from this field&lt;br /&gt;
        landmask_water = modis_lakes:17,21         # Calculate a landmask from this field&lt;br /&gt;
        landmask_water =  usgs_lakes:16,28         # Calculate a landmask from this field&lt;br /&gt;
        landmask_water =     default:16            # Calculate a landmask from this field&lt;br /&gt;
        dominant=LU_INDEX&lt;br /&gt;
        interp_option =   modis_30s:nearest_neighbor&lt;br /&gt;
        interp_option =         30s:nearest_neighbor&lt;br /&gt;
        interp_option =  usgs_lakes:nearest_neighbor&lt;br /&gt;
        interp_option = modis_lakes:nearest_neighbor&lt;br /&gt;
        interp_option =          2m:four_pt&lt;br /&gt;
        interp_option =          5m:four_pt&lt;br /&gt;
        interp_option =         10m:four_pt&lt;br /&gt;
        interp_option =      default:four_pt&lt;br /&gt;
        rel_path=   modis_30s:modis_landuse_20class_30s/&lt;br /&gt;
        rel_path=         30s:landuse_30s/&lt;br /&gt;
        rel_path=  usgs_lakes:landuse_30s_with_lakes/&lt;br /&gt;
        rel_path= modis_lakes:modis_landuse_21class_30s/&lt;br /&gt;
        rel_path=          2m:landuse_2m/&lt;br /&gt;
        rel_path=          5m:landuse_5m/&lt;br /&gt;
        rel_path=         10m:landuse_10m/&lt;br /&gt;
        rel_path=     default:landuse_2m/&lt;br /&gt;
===============================&lt;br /&gt;
name=FIREMASK&lt;br /&gt;
        priority=1&lt;br /&gt;
	subgrid=yes&lt;br /&gt;
        dominant_only=FIREMASK&lt;br /&gt;
        dest_type=categorical&lt;br /&gt;
        z_dim_name=firecat&lt;br /&gt;
        fill_missing = 0.&lt;br /&gt;
        interp_option=default:nearest_neighbor&lt;br /&gt;
        abs_path=default:./firemask&lt;br /&gt;
===============================&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Create a new directory under &amp;lt;tt&amp;gt;WPS&amp;lt;/tt&amp;gt; (here we use &amp;lt;tt&amp;gt;firemask&amp;lt;/tt&amp;gt;) and copy the geotiff file into this directory.&lt;br /&gt;
*Create an index file in the directory you created.  The format of the index file is described [[WPS_with_GeoTIFF_support#Using_GeoTIFF_with_WPS|here]] and [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Description_of_index here].  In this example, our index file will contain&lt;br /&gt;
the following&lt;br /&gt;
&amp;lt;pre&amp;gt;geotiff=O9820-B65-P1_fire_mask.tif&lt;br /&gt;
type=categorical&lt;br /&gt;
category_min=1&lt;br /&gt;
category_max=9&lt;br /&gt;
tile_bdr=3&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Run &amp;lt;tt&amp;gt;geogrid.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the newly interpolated data is in the file &amp;lt;tt&amp;gt;geo_em.d01.nc&amp;lt;/tt&amp;gt; under the variable given in the table (here &amp;lt;tt&amp;gt;FIREMASK&amp;lt;/tt&amp;gt; in [[File:FIREMASK Geo em.nc.gz]]).  The data can be added to a wrfinput or wrfrst file using ncks [http://nco.sourceforge.net/] using the following command:&lt;br /&gt;
 ncks -A -v FIREMASK geo_em.d01.nc wrfinput_d01&lt;br /&gt;
[[Category:Howtos|Ingest heat flux data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:FIREMASK_Geo_em.nc.gz&amp;diff=2550</id>
		<title>File:FIREMASK Geo em.nc.gz</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:FIREMASK_Geo_em.nc.gz&amp;diff=2550"/>
		<updated>2012-09-11T08:08:57Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Geo_em.d01.nc.gz&amp;diff=2549</id>
		<title>File:Geo em.d01.nc.gz</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Geo_em.d01.nc.gz&amp;diff=2549"/>
		<updated>2012-09-11T08:08:31Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: uploaded a new version of &amp;quot;File:Geo em.d01.nc.gz&amp;quot;:&amp;amp;#32;Reverted to version as of 07:40, 31 March 2010&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Geo_em.d01.nc.gz&amp;diff=2548</id>
		<title>File:Geo em.d01.nc.gz</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Geo_em.d01.nc.gz&amp;diff=2548"/>
		<updated>2012-09-11T08:08:22Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: uploaded a new version of &amp;quot;File:Geo em.d01.nc.gz&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:O9820-B65-P1_fire_mask.tif&amp;diff=2547</id>
		<title>File:O9820-B65-P1 fire mask.tif</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:O9820-B65-P1_fire_mask.tif&amp;diff=2547"/>
		<updated>2012-09-11T07:39:44Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Example MODIS heatflux data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example MODIS heatflux data&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_ingest_heat_flux_data&amp;diff=2542</id>
		<title>How to ingest heat flux data</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_ingest_heat_flux_data&amp;diff=2542"/>
		<updated>2012-08-13T14:41:36Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: place holder&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:Howtos|Ingest heat flux data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_run_WRF-SFIRE_with_real_data&amp;diff=2507</id>
		<title>How to run WRF-SFIRE with real data</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_run_WRF-SFIRE_with_real_data&amp;diff=2507"/>
		<updated>2012-07-29T14:50:41Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Converting fuel data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
Running WRF-Fire with real data is a process very similar to running WRF with real data for weather simulations.&lt;br /&gt;
The [http://www.mmm.ucar.edu/wrf/users WRF users page] has many &lt;br /&gt;
[http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/contents.html documents] and &lt;br /&gt;
[http://www.mmm.ucar.edu/wrf/OnLineTutorial/CASES/JAN00/index.html tutorials] outlining this process.  The purpose&lt;br /&gt;
of this page is to provide a tutorial for using real data with WRF-Fire starting from scratch.  We begin with a quick outline of the&lt;br /&gt;
steps involved including links to the output of each step.  The user can use these linked files to start from any step or to verify &lt;br /&gt;
their own results.  Due to platform and compiler differences your output might differ slightly from those provided.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page refers to data sources for the USA only. For other countries, you will need to make appropriate modifications yourself.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Outline=&lt;br /&gt;
&lt;br /&gt;
# [[How_to_get_WRF-Fire|Obtain WRF-Fire source code]].&lt;br /&gt;
# [[How_to_compile_WRF-Fire|Compile target em_real]].&lt;br /&gt;
# [[#Compiling WPS|Compile WPS]].&lt;br /&gt;
# [[#Configuring_the_domain|Configure your domain]].&lt;br /&gt;
# [[#Obtaining data for geogrid|Download geogrid datasets]].&lt;br /&gt;
# [[#Converting fire data|Convert fire data to geogrid format]].&lt;br /&gt;
# [[#Running geogrid|Run the geogrid executable]].&lt;br /&gt;
# [[#Obtaining atmospheric data|Download atmospheric data]].&lt;br /&gt;
# [[#Running ungrib|Run the ungrib executable]].&lt;br /&gt;
# [[#Running metgrid|Run the metgrid executable]].&lt;br /&gt;
# [[#Running wrf|Run real.exe and wrf.exe]].&lt;br /&gt;
&lt;br /&gt;
=Compiling WPS=&lt;br /&gt;
&lt;br /&gt;
After you have compiled WRF, you then need to go into the subdirectory &amp;lt;code&amp;gt;WPS&amp;lt;/code&amp;gt; and run &lt;br /&gt;
&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;.  This will present you with a list of configuration options similar to those given by WRF.&lt;br /&gt;
You will need to chose one with the same compiler that you used to compile WRF.  Generally, it is unnecessary to compile WPS with parallel support.&lt;br /&gt;
GRIB2 support is only necessary if your atmospheric data source requires it.  Once you have chosen a configuration, you can compile with&lt;br /&gt;
&amp;lt;pre&amp;gt;./compile &amp;gt;&amp;amp; compile.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure to check for errors in the log file generated.&lt;br /&gt;
&lt;br /&gt;
=Configuring the domain=&lt;br /&gt;
&lt;br /&gt;
The physical domain is configured in the geogrid section of namelist.wps in the WPS directory.  In this section, you should define&lt;br /&gt;
the geographic projection with &amp;lt;tt&amp;gt;map_proj&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;truelat1&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;truelat2&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;stand_lon&amp;lt;/tt&amp;gt;.  Available projections&lt;br /&gt;
include &amp;lt;tt&amp;gt;&#039;lambert&#039;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&#039;polar&#039;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&#039;mercator&#039;&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;&#039;lat-lon&#039;&amp;lt;/tt&amp;gt;.  The lower left corner of the domain is located at&lt;br /&gt;
&amp;lt;tt&amp;gt;ref_lon&amp;lt;/tt&amp;gt; longitude and &amp;lt;tt&amp;gt;ref_lat&amp;lt;/tt&amp;gt; latitude.  The computational grid is defined by &amp;lt;tt&amp;gt;e_we/e_sn&amp;lt;/tt&amp;gt;, the number of (staggered) grid&lt;br /&gt;
points in the west-east/south-north direction, and the grid resolution is defined by &amp;lt;tt&amp;gt;dx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dy&amp;lt;/tt&amp;gt; in meters. &lt;br /&gt;
We also specify a path to where we will put the static dataset that geogrid will read from, and we specify the highest resolution (30 arc minutes) that this &lt;br /&gt;
data is released in.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&amp;amp;geogrid&lt;br /&gt;
 e_we              =  43,&lt;br /&gt;
 e_sn              =  43,&lt;br /&gt;
 geog_data_res     = &#039;30s&#039;,&lt;br /&gt;
 dx = 60,&lt;br /&gt;
 dy = 60,&lt;br /&gt;
 map_proj  = &#039;lambert&#039;,&lt;br /&gt;
 ref_lat   =  39.70537,&lt;br /&gt;
 ref_lon   = -107.2907,&lt;br /&gt;
 truelat1  =  39.338,&lt;br /&gt;
 truelat2  =  39.338,&lt;br /&gt;
 stand_lon = -106.807,&lt;br /&gt;
 geog_data_path = &#039;../../wrfdata/geog&#039;&lt;br /&gt;
/&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The share section of the WPS namelist defines the fire subgrid refinement in &amp;lt;tt&amp;gt;subgrid_ratio_x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;subgrid_ratio_y&amp;lt;/tt&amp;gt;.  This means &lt;br /&gt;
that the fire grid will be a 10 time refined grid at a resolution of 6 meters by 6 meters.  The &amp;lt;tt&amp;gt;start_date&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;end_data&amp;lt;/tt&amp;gt; parameters specify&lt;br /&gt;
the time window that the simulation will be run in.  Atmospheric data must be available at both temporal boundaries.  The &amp;lt;tt&amp;gt;interval_seconds&amp;lt;/tt&amp;gt; &lt;br /&gt;
parameter tells WPS the number of seconds between each atmospheric dataset.  For our example, we&lt;br /&gt;
will be using the NARR dataset which is released daily every three hours or 10,800 seconds.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&amp;amp;share&lt;br /&gt;
 wrf_core = &#039;ARW&#039;,&lt;br /&gt;
 max_dom = 1,&lt;br /&gt;
 start_date = &#039;2005-08-28_12:00:00&#039;,&lt;br /&gt;
 end_date   = &#039;2005-08-28_15:00:00&#039;,&lt;br /&gt;
 interval_seconds = 10800,&lt;br /&gt;
 io_form_geogrid = 2,&lt;br /&gt;
 subgrid_ratio_x = 10,&lt;br /&gt;
 subgrid_ratio_y = 10,&lt;br /&gt;
/&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The full namelist used can be found [http://pastebin.com/2u3YXkHS here].&lt;br /&gt;
&lt;br /&gt;
=Obtaining data for geogrid=&lt;br /&gt;
&lt;br /&gt;
First you must download and uncompress the standard [http://www.mmm.ucar.edu/wrf/src/wps_files/geog_v3.1.tar.gz geogrid input data].&lt;br /&gt;
This is a 429 MB compressed tarball that uncompresses to around 11 GB.  It contains all of the static data that geogrid needs for a standard&lt;br /&gt;
weather simulation; however, for a WRF-Fire simulation we need to fill in two additional fields that are too big to release in a single download for the&lt;br /&gt;
whole globe.  We first need to determine the approximate latitude and longitude bounds for our domain.&lt;br /&gt;
&lt;br /&gt;
We know the coordinates in the lower left corner from the &amp;lt;tt&amp;gt;ref_lon&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ref_lat&amp;lt;/tt&amp;gt; parameters of the namelist.  We can estimate the&lt;br /&gt;
coordinates of the upper right corner by the approximate ratio 9e-6 degrees per meter.  So, the upper right corner of our domain is at approximately&lt;br /&gt;
-107.2675 longitude and 39.7286 latitude.  For the purposes of downloading data, we will expand this region to the range&lt;br /&gt;
-107.35 through -107.2 longitude and 39.6 through 39.75 latitude.&lt;br /&gt;
&lt;br /&gt;
==Downloading fuel category data==&lt;br /&gt;
&lt;br /&gt;
For the United States, Anderson 13 fuel category data is available at the [http://landfire.cr.usgs.gov/viewer/ landfire] website.  Upon opening the national map, &lt;br /&gt;
you will see a menu on the right side of the screen.  Select the icon circled in blue.&lt;br /&gt;
[[File:Landfire_menu.png|center|thumb|The landfire menu.]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
This will open a window that lets you key in the the longitude and latitude range of your selection.  In this window, we will input the coordinates computed earlier.&lt;br /&gt;
[[File:landfire_selection.png|center|thumb|Domain selection.]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
In the next window, click on &amp;quot;modify data request&amp;quot;.  This window lists all of the available data products for the selected region.  You want to check the box &lt;br /&gt;
next to &amp;quot;LANDFIRE 13 Anderson Fire Behavior Fuel Models&amp;quot; and change the data format to &amp;quot;GeoTIFF&amp;quot;.  Then go to the bottom of the page and click &amp;quot;Save Changes&amp;quot;.&lt;br /&gt;
[[File:landfire_data_products.png|center|thumb|Data product selection.]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
Finally, click &amp;quot;Download&amp;quot;.  The file will be a compressed archive containing, among others, a GeoTIFF file.  The name of the file will be different for each request, &lt;br /&gt;
but in this example we have &amp;lt;tt&amp;gt;lf02588871.zip&amp;lt;/tt&amp;gt; containing the GeoTIFF file &amp;lt;tt&amp;gt;lf02588871.tif&amp;lt;/tt&amp;gt;, which can be found here, [[File:lf02588871.tif]].&lt;br /&gt;
&lt;br /&gt;
==Downloading high resolution elevation data==&lt;br /&gt;
&lt;br /&gt;
Another USGS website serves topographical data of sufficient resolution for our 6 meter resolution fire grid.  This dataset is called the National Elevation Dataset (NED) and &lt;br /&gt;
can be accessed at [http://seamless.usgs.gov/ http://seamless.usgs.gov/].  The interface is similar to that of the Landfire national map.  Click on the icon circled in blue.&lt;br /&gt;
[[File:Ned_menu.png|center|thumb|The NED menu.]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
Again, we key in the coordinates determined before and click the modify data request button.  In the data product selection page, we select &amp;quot;National Elevation Dataset (NED) 1/3 Arc Second&amp;quot; and change&lt;br /&gt;
to GeoTIFF format.  Then download the data&lt;br /&gt;
set, which can be found here, [[File:09159064.tif]].&lt;br /&gt;
[[File:Ned data product.png|center|thumb|The NED data product selection page]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Converting fuel data=&lt;br /&gt;
&lt;br /&gt;
This section describes converting data from geotiff to geogrid format.  Alternatively, you can use the version of geogrid from our repository and read the geotiff file directly.  For details see [[WPS_with_GeoTIFF_support]].&lt;br /&gt;
&lt;br /&gt;
In order for geogrid to be able to read this data, we need to convert it into an intermediate format.  We will be using a utility program&lt;br /&gt;
released with autoWPS to accomplish this.  For information on how to obtain and compile this tool, see [[How_to_convert_data_for_Geogrid]].  We will place the &amp;lt;tt&amp;gt;convert_geotiff.x&amp;lt;/tt&amp;gt; binary and the GeoTIFF&lt;br /&gt;
data files in the main WPS directory.&lt;br /&gt;
To convert the fuel category data, we will create new directories inside the WPS directory called &amp;lt;tt&amp;gt;landfire_data&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ned_data&amp;lt;/tt&amp;gt;.  Inside the &amp;lt;tt&amp;gt;landfire_data&amp;lt;/tt&amp;gt; directory, we&lt;br /&gt;
issue the following command to convert the fuel category data.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;../convert_geotiff.x -c 13 -w 1 -u &amp;quot;fuel category&amp;quot; -d &amp;quot;Anderson 13 fire behavior categories&amp;quot; ../lf02588871.tif&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The resulting &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt; file created as follows.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;projection = albers_nad83&lt;br /&gt;
truelat1 = 29.500000&lt;br /&gt;
truelat2 = 45.500000&lt;br /&gt;
stdlon = -96.000000&lt;br /&gt;
known_x = 1&lt;br /&gt;
known_y = 606&lt;br /&gt;
known_lat = 39.747818&lt;br /&gt;
known_lon = -107.373398&lt;br /&gt;
dx = 3.000000e+01&lt;br /&gt;
dy = 3.000000e+01&lt;br /&gt;
type = categorical&lt;br /&gt;
signed = yes&lt;br /&gt;
units = &amp;quot;fuel category&amp;quot;&lt;br /&gt;
description = &amp;quot;Anderson 13 fire behavior categories&amp;quot;&lt;br /&gt;
wordsize = 1&lt;br /&gt;
tile_x = 100&lt;br /&gt;
tile_y = 100&lt;br /&gt;
tile_z = 1&lt;br /&gt;
category_min = 1&lt;br /&gt;
category_max = 14&lt;br /&gt;
tile_bdr = 3&lt;br /&gt;
missing_value = 0.000000&lt;br /&gt;
scale_factor = 1.000000&lt;br /&gt;
row_order = bottom_top&lt;br /&gt;
endian = little&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
We have chosen to set the word size to 1 byte because it can represent 256 categories, plenty for&lt;br /&gt;
this purpose.&lt;br /&gt;
Notice that the program has changed the number of categories to 14 and uses the last category&lt;br /&gt;
to indicate that the source data was out of the range 1-13.  For the fuel category data, this represents&lt;br /&gt;
that there is no fuel present, due to a lake, river, road, etc.  &lt;br /&gt;
&lt;br /&gt;
We can check that the projection information entered into the index file is correct, by running the &lt;br /&gt;
&amp;lt;tt&amp;gt;listgeo&amp;lt;/tt&amp;gt; binary that is installed with libGeoTIFF.  In this case, &amp;lt;tt&amp;gt;listgeo&amp;lt;/tt&amp;gt; tells us &lt;br /&gt;
that the source file contains the following projection parameters.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Projection Method: CT_AlbersEqualArea&lt;br /&gt;
   ProjStdParallel1GeoKey: 29.500000 ( 29d30&#039; 0.00&amp;quot;N)&lt;br /&gt;
   ProjStdParallel2GeoKey: 45.500000 ( 45d30&#039; 0.00&amp;quot;N)&lt;br /&gt;
   ProjNatOriginLatGeoKey: 23.000000 ( 23d 0&#039; 0.00&amp;quot;N)&lt;br /&gt;
   ProjNatOriginLongGeoKey: -96.000000 ( 96d 0&#039; 0.00&amp;quot;W)&lt;br /&gt;
   ProjFalseEastingGeoKey: 0.000000 m&lt;br /&gt;
   ProjFalseNorthingGeoKey: 0.000000 m&lt;br /&gt;
GCS: 4269/NAD83&lt;br /&gt;
Datum: 6269/North American Datum 1983&lt;br /&gt;
Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)&lt;br /&gt;
Prime Meridian: 8901/Greenwich (0.000000/  0d 0&#039; 0.00&amp;quot;E)&lt;br /&gt;
Projection Linear Units: 9001/metre (1.000000m)&lt;br /&gt;
&lt;br /&gt;
Corner Coordinates:&lt;br /&gt;
Upper Left    ( -963525.000, 1916445.000)  (-107.3734004,39.7478163)&lt;br /&gt;
Lower Left    ( -963525.000, 1898265.000)  (-107.3478974,39.5867431)&lt;br /&gt;
Upper Right   ( -948885.000, 1916445.000)  (-107.2021990,39.7632976)&lt;br /&gt;
Lower Right   ( -948885.000, 1898265.000)  (-107.1770727,39.6021889)&lt;br /&gt;
Center        ( -956205.000, 1907355.000)  (-107.2751374,39.6750401)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see that the conversion detected the projection correctly.  The small difference in the&lt;br /&gt;
coordinates of the upper left corner reported by &amp;lt;tt&amp;gt;listgeo&amp;lt;/tt&amp;gt; and that in the index file is&lt;br /&gt;
due to floating point error and is much less than the resolution of the data. &lt;br /&gt;
&lt;br /&gt;
Finally, we go to the &amp;lt;tt&amp;gt;ned_data&amp;lt;/tt&amp;gt; directory to convert the &amp;lt;tt&amp;gt;ZSF&amp;lt;/tt&amp;gt; variable.  In this case,&lt;br /&gt;
we issue the following command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;../convert_geotiff.x -u meters -d &#039;National Elevation Dataset 1/3 arcsecond resolution&#039; ../09159064.tif&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This produces the following &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;projection = regular_ll&lt;br /&gt;
known_x = 1&lt;br /&gt;
known_y = 1621&lt;br /&gt;
known_lat = 39.750092&lt;br /&gt;
known_lon = -107.350090&lt;br /&gt;
dx = 9.259259e-05&lt;br /&gt;
dy = 9.259259e-05&lt;br /&gt;
type = continuous&lt;br /&gt;
signed = yes&lt;br /&gt;
units = &amp;quot;meters&amp;quot;&lt;br /&gt;
description = &amp;quot;National Elevation Dataset 1/3 arcsecond resolution&amp;quot;&lt;br /&gt;
wordsize = 2&lt;br /&gt;
tile_x = 100&lt;br /&gt;
tile_y = 100&lt;br /&gt;
tile_z = 1&lt;br /&gt;
tile_bdr = 3&lt;br /&gt;
missing_value = 0.000000&lt;br /&gt;
scale_factor = 1.000000&lt;br /&gt;
row_order = bottom_top&lt;br /&gt;
endian = little&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Here we have used the default word size of 2 bytes and a scale factor of 1.0, &lt;br /&gt;
which can represent any elevation in the world&lt;br /&gt;
with 1 meter accuracy, which is approximately the accuracy of the source data.&lt;br /&gt;
&lt;br /&gt;
Again, we compare the projection parameters in the index file with that reported by &amp;lt;tt&amp;gt;listgeo&amp;lt;/tt&amp;gt;&lt;br /&gt;
and find that the conversion was correct.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;      Keyed_Information:&lt;br /&gt;
      GTModelTypeGeoKey (Short,1): ModelTypeGeographic&lt;br /&gt;
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea&lt;br /&gt;
      GeographicTypeGeoKey (Short,1): GCS_NAD83&lt;br /&gt;
      GeogCitationGeoKey (Ascii,6): &amp;quot;NAD83&amp;quot;&lt;br /&gt;
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree&lt;br /&gt;
      End_Of_Keys.&lt;br /&gt;
   End_Of_Geotiff.&lt;br /&gt;
&lt;br /&gt;
GCS: 4269/NAD83&lt;br /&gt;
Datum: 6269/North American Datum 1983&lt;br /&gt;
Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)&lt;br /&gt;
Prime Meridian: 8901/Greenwich (0.000000/  0d 0&#039; 0.00&amp;quot;E)&lt;br /&gt;
&lt;br /&gt;
Corner Coordinates:&lt;br /&gt;
Upper Left    (-107.3500926,39.7500926)&lt;br /&gt;
Lower Left    (-107.3500926,39.6000000)&lt;br /&gt;
Upper Right   (-107.2000000,39.7500926)&lt;br /&gt;
Lower Right   (-107.2000000,39.6000000)&lt;br /&gt;
Center        (-107.2750463,39.6750463)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the converted data can be found here, [[File:Landfire_data.tgz]], and here, [[File:Ned_data.tgz]].&lt;br /&gt;
&lt;br /&gt;
=Running geogrid=&lt;br /&gt;
&lt;br /&gt;
The geogrid binary will create a netcdf file called &amp;lt;tt&amp;gt;geo_em.d01.nc&amp;lt;/tt&amp;gt;.  This file will contain all&lt;br /&gt;
of the static data necessary to run your simulation.  Before we can run the binary, however, we must tell&lt;br /&gt;
geogrid what data needs to be in these files, where it can find them, and what kind of preprocessing we wnat done.  This information is contained in a run-time configuration file called &amp;lt;tt&amp;gt;GEOGRID.TBL&amp;lt;/tt&amp;gt;, which is&lt;br /&gt;
located in the &amp;lt;tt&amp;gt;geogrid&amp;lt;/tt&amp;gt; subdirectory.  The file that is released with WPS contains reasonable defaults&lt;br /&gt;
for the variables defined on the atmospheric grid, but we need to add two additional sections for the two fire&lt;br /&gt;
grid data sets that we have just created.  We will append the following sections to the file &lt;br /&gt;
&amp;lt;tt&amp;gt;geogrid/GEOGRID.TBL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;===============================&lt;br /&gt;
name=NFUEL_CAT&lt;br /&gt;
        priority=1&lt;br /&gt;
	dest_type=categorical&lt;br /&gt;
	dominant_only=NFUEL_CAT&lt;br /&gt;
	z_dim_name=fuel_cat&lt;br /&gt;
	halt_on_missing=yes&lt;br /&gt;
	interp_option=default:nearest_neighbor&lt;br /&gt;
	abs_path=./landfire_data&lt;br /&gt;
	subgrid=yes&lt;br /&gt;
==============================&lt;br /&gt;
name=ZSF&lt;br /&gt;
        priority = 1&lt;br /&gt;
        dest_type = continuous&lt;br /&gt;
        df_dx=DZDXF&lt;br /&gt;
        df_dy=DZDYF&lt;br /&gt;
        smooth_option = smth-desmth_special; smooth_passes=1&lt;br /&gt;
	halt_on_missing=yes&lt;br /&gt;
        interp_option = default:average_gcell(4.0)+four_pt+average_4pt&lt;br /&gt;
	abs_path=./ned_data&lt;br /&gt;
	subgrid=yes&lt;br /&gt;
==============================&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For &amp;lt;tt&amp;gt;NFUEL_CAT&amp;lt;/tt&amp;gt;, we will use simple nearest neighbor interpolation, while for &amp;lt;tt&amp;gt;ZSF&amp;lt;/tt&amp;gt;, we will&lt;br /&gt;
use bilinear interpolation with smoothing.  Other configurations are possible.  See the [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Description_of_GEOGRID.TBL WPS users guide] for further information.  The full table used can be found [http://pastebin.com/kdymq5ff here].&lt;br /&gt;
&lt;br /&gt;
Once we make these changes to the &amp;lt;tt&amp;gt;GEOGRID.TBL&amp;lt;/tt&amp;gt; file, and ensure that all of the directories are in the correct place (including the default geogrid dataset at &amp;lt;tt&amp;gt;../../wrfdata&amp;lt;/tt&amp;gt;), we can execute the geogrid binary.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./geogrid.exe&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This will create a file called &amp;lt;tt&amp;gt;geo_em.d01.nc&amp;lt;/tt&amp;gt; in the current directory, which can be found here,&lt;br /&gt;
[[File:geo_em.d01.nc.gz]].  The contents of this file can be viewed using your favorite NetCDF viewer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;geo_em.d01.nc&amp;quot; widths=&amp;quot;225px&amp;quot; heights=&amp;quot;225px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
File:nfuel_cat.png|The fuel category data interpolated to the model grid.The&lt;br /&gt;
File:zsf.png|The high resolution elevation (1/3&amp;quot;) data interpolated to the model grid.&lt;br /&gt;
File:hgt_m.png|The low resolution elevation data (30&amp;quot;) data interpolated to the atmospheric grid&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Here, we have visualized the fire grid variables, &amp;lt;tt&amp;gt;NFUEL_CAT&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ZSF&amp;lt;/tt&amp;gt;, as well as the &lt;br /&gt;
variable &amp;lt;tt&amp;gt;HGT_M&amp;lt;/tt&amp;gt;, which is the elevation data used by the atmospheric model.  We can compare&lt;br /&gt;
&amp;lt;tt&amp;gt;ZSF&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;HGT_M&amp;lt;/tt&amp;gt; to verify that our data conversion process worked.  The colormaps of these&lt;br /&gt;
two pictures have been aligned, so that we can make a quick visual check.  As we see, the two images do&lt;br /&gt;
have a similar structure and magnitude, but they do seem to suffer some misalignment.  Given that &lt;br /&gt;
the data came from two different sources, in two different projections, the error is relatively minor.  &lt;br /&gt;
Because WPS converts between projections in single precision, by default, there is likely a significant &lt;br /&gt;
issue with floating point error.  We may, in the future, consider making some changes so that this conversion is done in double precision.&lt;br /&gt;
&lt;br /&gt;
=Obtaining atmospheric data=&lt;br /&gt;
&lt;br /&gt;
There are a number of datasets available to initialize a WRF real run.  The &lt;br /&gt;
[http://www.mmm.ucar.edu/wrf/users/download/free_data.html WRF users page] lists&lt;br /&gt;
a few.  One challenge in running a fire simulation is finding a dataset of &lt;br /&gt;
sufficient resolution.  One (relatively) high resolution data source is the&lt;br /&gt;
North American Regional Reanalysis (NARR).  This is still only 32km resolution, so&lt;br /&gt;
no small scale weather patterns will appear in our simulation.  In general, we &lt;br /&gt;
will want to run a series of nested domains in order to catch some small scale weather&lt;br /&gt;
features; however, we will proceed with a single domain example.&lt;br /&gt;
&lt;br /&gt;
The NARR datasets are available after 3 months at the following website, &lt;br /&gt;
[http://nomads.ncdc.noaa.gov/data/narr/ http://nomads.ncdc.noaa.gov/data/narr/].&lt;br /&gt;
We will browse to the [http://nomads.ncdc.noaa.gov/data/narr/200508/20050828/ directory] &lt;br /&gt;
containing the data for August 28, 2005. Our simulation runs from the hours 12-15 on this &lt;br /&gt;
day, so we will download the grib files for hours &lt;br /&gt;
[http://nomads.ncdc.noaa.gov/data/narr/200508/20050828/narr-a_221_20050828_1200_000.grb 12] and &lt;br /&gt;
[http://nomads.ncdc.noaa.gov/data/narr/200508/20050828/narr-a_221_20050828_1500_000.grb 15].&lt;br /&gt;
You can get these files also from here, [[File:narr-a_221_20050828_12-15.tgz]]. &lt;br /&gt;
&lt;br /&gt;
=Running ungrib=&lt;br /&gt;
&lt;br /&gt;
With the grib files downloaded, we need to link them into the WPS directory using the script&lt;br /&gt;
&amp;lt;tt&amp;gt;link_grib.csh&amp;lt;/tt&amp;gt;.  This script takes as arguments all of the grib files that are needed &lt;br /&gt;
for the simulation.  In this case, we can run the following command in the WPS directory.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./link_grib.csh &amp;lt;path to&amp;gt;/*.grb&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Substitute &amp;lt;path to&amp;gt; with the directory in which you have saved the grib files.  This command&lt;br /&gt;
creates a series of symbolic links with a predetermined naming sequence to all of the grib files&lt;br /&gt;
you pass as arguments.  You should now have two new soft links named &amp;lt;tt&amp;gt;GRIBFILE.AAA&amp;lt;/tt&amp;gt; and &lt;br /&gt;
&amp;lt;tt&amp;gt;GRIBFILE.AAB&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
With the proper links in place, we need to tell ungrib what they contain.  This is done by copying a variable table into the main WPS directory.  Several variable tables are distributed with WPS which &lt;br /&gt;
describe common datasets.  You can find these in the directory &amp;lt;tt&amp;gt;WPS/ungrib/Variable_Tables&amp;lt;/tt&amp;gt;.&lt;br /&gt;
In particular, the file which corresponds to the NARR grib files is called &amp;lt;tt&amp;gt;Vtable.NARR&amp;lt;/tt&amp;gt;, so &lt;br /&gt;
we issue the following command to copy it into the current directory.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;cp ungrib/Variable_Tables/Vtable.NARR Vtable&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
We are now ready to run the ungrib executable.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./ungrib.exe&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This will create two files in the current directory named &amp;lt;tt&amp;gt;FILE:2005-08-28_12&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;FILE:2005-08-28_15&amp;lt;/tt&amp;gt;.  You can download these files here, [[File:ungrib_output.tgz]].&lt;br /&gt;
&lt;br /&gt;
=Running metgrid=&lt;br /&gt;
&lt;br /&gt;
Metgrid will take the files created by ungrib and geogrid and combine them into a set of files.  At this point, all we need to do is run it.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./metgrid.exe&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This creates two files named &amp;lt;tt&amp;gt;met_em.d01.2005-08-28_12:00:00.nc&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;met_em.d01.2005-08-28_15:00:00.nc&amp;lt;/tt&amp;gt;, which you can download here, [[File:metgrid_output.tgz]].&lt;br /&gt;
&lt;br /&gt;
=Running wrf=&lt;br /&gt;
&lt;br /&gt;
We are now finished with all steps involving WPS.  All we need to do is copy over the metgrid output&lt;br /&gt;
files over to our WRF real run directory at &amp;lt;tt&amp;gt;WRFV3/test/em_real&amp;lt;/tt&amp;gt; and configure our WRF namelist.&lt;br /&gt;
We will need to be sure that the domain description in &amp;lt;tt&amp;gt;namelist.input&amp;lt;/tt&amp;gt; matches that of &lt;br /&gt;
the &amp;lt;tt&amp;gt;namelist.wps&amp;lt;/tt&amp;gt; we created previously, otherwise WRF will refuse to run.  Pay particular attention&lt;br /&gt;
to the start/stop times and the grid sizes.  The fire ignition parameters are configured&lt;br /&gt;
in the same way as for the ideal case.  Relevant portion of the namelist we will use are given below.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt; &amp;amp;time_control&lt;br /&gt;
 run_days                            = 0,&lt;br /&gt;
 run_hours                           = 0,&lt;br /&gt;
 run_minutes                         = 2,&lt;br /&gt;
 run_seconds                         = 0,&lt;br /&gt;
 start_year                          = 2005,&lt;br /&gt;
 start_month                         = 08,&lt;br /&gt;
 start_day                           = 28,&lt;br /&gt;
 start_hour                          = 12,&lt;br /&gt;
 start_minute                        = 00,&lt;br /&gt;
 start_second                        = 00,&lt;br /&gt;
 end_year                            = 2005,&lt;br /&gt;
 end_month                           = 08,&lt;br /&gt;
 end_day                             = 28,&lt;br /&gt;
 end_hour                            = 15,&lt;br /&gt;
 end_minute                          = 00,&lt;br /&gt;
 end_second                          = 00,&lt;br /&gt;
 interval_seconds                    = 10800&lt;br /&gt;
 input_from_file                     = .true.,&lt;br /&gt;
 history_interval_s                  = 30,&lt;br /&gt;
 frames_per_outfile                  = 1000,&lt;br /&gt;
 restart                             = .false.,&lt;br /&gt;
 restart_interval                    = 1,&lt;br /&gt;
 io_form_history                     = 2&lt;br /&gt;
 io_form_restart                     = 2&lt;br /&gt;
 io_form_input                       = 2&lt;br /&gt;
 io_form_boundary                    = 2&lt;br /&gt;
 /&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;domains&lt;br /&gt;
 time_step                           = 0,&lt;br /&gt;
 time_step_fract_num                 = 5,&lt;br /&gt;
 time_step_fract_den                 = 10,&lt;br /&gt;
 max_dom                             = 1,&lt;br /&gt;
 s_we                                = 1,&lt;br /&gt;
 e_we                                = 43,&lt;br /&gt;
 s_sn                                = 1,&lt;br /&gt;
 e_sn                                = 43,&lt;br /&gt;
 s_vert                              = 1,&lt;br /&gt;
 e_vert                              = 41,&lt;br /&gt;
 num_metgrid_levels                  = 30&lt;br /&gt;
 dx                                  = 60,&lt;br /&gt;
 dy                                  = 60,&lt;br /&gt;
 grid_id                             = 1,&lt;br /&gt;
 parent_id                           = 0,&lt;br /&gt;
 i_parent_start                      = 0,&lt;br /&gt;
 j_parent_start                      = 0,&lt;br /&gt;
 parent_grid_ratio                   = 1,&lt;br /&gt;
 parent_time_step_ratio              = 1,&lt;br /&gt;
 feedback                            = 1,&lt;br /&gt;
 smooth_option                       = 0&lt;br /&gt;
 sr_x                                = 10,&lt;br /&gt;
 sr_y                                = 10,&lt;br /&gt;
 sfcp_to_sfcp                        = .true.,&lt;br /&gt;
 p_top_requested                     = 10000&lt;br /&gt;
 /&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;bdy_control&lt;br /&gt;
 spec_bdy_width                      = 5,&lt;br /&gt;
 spec_zone                           = 1,&lt;br /&gt;
 relax_zone                          = 4,&lt;br /&gt;
 specified                           = .true.,&lt;br /&gt;
 periodic_x                          = .false.,&lt;br /&gt;
 symmetric_xs                        = .false.,&lt;br /&gt;
 symmetric_xe                        = .false.,&lt;br /&gt;
 open_xs                             = .false.,&lt;br /&gt;
 open_xe                             = .false.,&lt;br /&gt;
 periodic_y                          = .false.,&lt;br /&gt;
 symmetric_ys                        = .false.,&lt;br /&gt;
 symmetric_ye                        = .false.,&lt;br /&gt;
 open_ys                             = .false.,&lt;br /&gt;
 open_ye                             = .false.,&lt;br /&gt;
 nested                              = .false.,&lt;br /&gt;
 /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The full namelist used can be found [http://pastebin.com/thu8KDZF here].&lt;br /&gt;
&lt;br /&gt;
Once the namelist is properly configured we run the WRF real preprocessor.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./real.exe&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This creates the initial and boundary files for the WRF simulation and fills all missing fields&lt;br /&gt;
from the grib data with reasonable defaults.  The files that it produces are &amp;lt;tt&amp;gt;wrfbdy_d01&amp;lt;/tt&amp;gt;&lt;br /&gt;
and &amp;lt;tt&amp;gt;wrfinput_d01&amp;lt;/tt&amp;gt;, which can be downloaded here [[File:wrf_real_output.tgz]].&lt;br /&gt;
&lt;br /&gt;
Finally, we run the simulation.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;./wrf.exe&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The history file for this example can be downloaded here, [[File:wrf_real_history.tgz]].&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF-Fire]]&lt;br /&gt;
[[Category:Data]]&lt;br /&gt;
[[Category:Howtos|Run WRF-Fire with real data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=WRF-Fire_development_notes&amp;diff=2473</id>
		<title>WRF-Fire development notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=WRF-Fire_development_notes&amp;diff=2473"/>
		<updated>2012-04-22T00:46:17Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Wish list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:&#039;&#039;Main article: [[WRF-Fire]]. To get the software, see [[How to get WRF-Fire]].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page tracks activity in the [[WRF-Fire]] and related software development. All members of the community are welcome to [[Open Wildland Fire Modeling E community Wiki#How to get an account|get an account]] and [http://www.openwfm.org/w/index.php5?title=WRF-Fire_development_notes&amp;amp;action=edit edit]. &lt;br /&gt;
&lt;br /&gt;
==Wish list==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Add your suggestions or plans here. If you want to comment on any of the items, please start a new section of the [[Talk:WRF-Fire development notes|talk page]] and link to it here.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Add relative humidity to moisture tester output&lt;br /&gt;
* Flank spread rate as a function of base rate and TKE/turbulent fluxes&lt;br /&gt;
* Turn off artificial diffusion for good&lt;br /&gt;
* Connection of emissions products with [http://ruc.noaa.gov/wrf/WG11/Users_guide.pdf WRF-Chem].  Started, see [[Coupling with WRF-Chem]].&lt;br /&gt;
* Implement full [http://www.forestencyclopedia.net/p/p662/c/c2490/quick_citation_view BURNUP] algorithm instead of the simplification.&lt;br /&gt;
* Keep standalone model working.&lt;br /&gt;
* Add a canopy fire model for passive (colocated with surface fire) canopy fire.&lt;br /&gt;
* Parametrize ignition startup. See [[Talk:WRF-Fire development notes#Parametrized_ignition|discussion]].&lt;br /&gt;
* Input fuel moisture from the WRF surface model. See [[Talk:WRF-Fire_development_notes#Moisture_model|discussion]].&lt;br /&gt;
* Better level set method: High-order ENO and [http://www.math.ucla.edu/~yanovsky/LS.htm WENO], [http://ccm.ucdenver.edu/wiki/Jan_Mandel/Blog/2011_Feb_Mar#February_14:_CCM_Colloquium:_Olivier_Desjardins discontinuous Galerkin].&lt;br /&gt;
* Rewrite the level set method so that the level set function is ignition time minus current time and get rid of the separate &#039;&#039;&#039;tign&#039;&#039;&#039; array.&lt;br /&gt;
* Use the [http://www.fire.org/index.php?option=com_content&amp;amp;task=category&amp;amp;sectionid=2&amp;amp;id=31&amp;amp;Itemid=295 Fire SDK] to compute ROS.&lt;br /&gt;
* ROS model from [http://dx.doi.org/10.1016/j.combustflame.2009.07.010 Balbi et al 2009].&lt;br /&gt;
* Force the fire to a given location from a file read on restart. This will require fire history replay and atmosphere spin-up.  &lt;br /&gt;
* Modify fuel from a file on restart to reflect suppression efforts.&lt;br /&gt;
* Ignition &amp;amp; fire modification from MODIS fire detection.&lt;br /&gt;
* Add fractional fuel volume to fuel categories and generate random fuel coverage.&lt;br /&gt;
* Add other variables in the [[wikipedia:http://en.wikipedia.org/wiki/National_Fire_Danger_Rating_System|National Fire Danger Rating System]] as diagnostics to WRF output.&lt;br /&gt;
&lt;br /&gt;
==In progress==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;When you start on an item from the wish list, please move the item here and add a link to the branch where you work on it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Ignition from a given fire perimeter, with atmosphere and fuel consumption spin-up, by specifying ignition times. See [[Talk:WRF-Fire development notes#Fire spin-up|discussion]].&lt;br /&gt;
* Generate KML files for visualization in {{wp|Google Earth}}. See [[Talk:WRF-Fire development notes#Google_Earth|discussion]]&lt;br /&gt;
* Real test problem with real fire data at both fine and coarse resolution.&lt;br /&gt;
* Better quadrature for fuel left: The current scheme is second order accurate when all 4 corners of a fire mesh cell are on fire, and exact when all 4 corners are not on fire. In the case when only some of the 4 corners are on fire, the only requirements are that the transition when nodes ignite is continuous and monotonous. In that case, the scheme may not be very accurate. A better scheme would be accurate in more cases and have natural invariance properties. {{WRF-Fire-branch|jm2/mkim}} {{WRF-Fire-commit|4cf71f8d9e4309281321ad7d38e4f028a005fa8a|last commit}} {{WRF-Fire-branch|vk/test}}&lt;br /&gt;
:This affects the amount of heat output from the cell in the timesteps when the fireline crosses the cell.&lt;br /&gt;
* Set up fireflux test case: {{WRF-Fire-branch|fireflux}}, [http://ccm.ucdenver.edu/wiki/images/a/a8/Agu2010-kochanski.pdf submitted abstract]&lt;br /&gt;
* {{ccm|Data_assimilation_seminar|Data assimilation}}&lt;br /&gt;
* Dynamically determine midflame height and interpolate the wind there. See [[Talk:WRF-Fire development notes#Fuel height|discussion]].&lt;br /&gt;
* Conversion of atmosphere state to use outputs of unmodified WRF to drive the standalone model. See [[Talk:WRF-Fire development notes#Standalone_driver|discussion]].&lt;br /&gt;
&lt;br /&gt;
==Done==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Move the item here when done and add a link to the contributor&#039;s last commit before the merge into master. Links to major milestone events can be also added to the timeline.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===2004===&lt;br /&gt;
&lt;br /&gt;
* Ned Patton and Janice Coen propose WRF-Fire in a [http://www.mmm.ucar.edu/mm5/workshop/ws04/Session9/Patton_Edward.pdf workshop paper]  and formulate the fundamental principles of how to combine WRF with the fire spread model from [[CAWFE]].&lt;br /&gt;
&lt;br /&gt;
===2005===&lt;br /&gt;
&lt;br /&gt;
* Standalone fire model from CAWFE rewritten in F90 by Ned Patton received Mar 31 2005&lt;br /&gt;
&lt;br /&gt;
===2006===&lt;br /&gt;
&lt;br /&gt;
* John Michalakes writes specs for support of fire grids in WRF Feb 6 2006&lt;br /&gt;
&lt;br /&gt;
===2007===&lt;br /&gt;
&lt;br /&gt;
* Alternative implementation of fire grid in nested domains in WRF by Jon Beezley Feb 29 2007&lt;br /&gt;
* WRF-Fire development started from the WRF+CAWFE tracers code received from Ned Patton, Jon set up the git repository {{WRF-Fire-commit|b7ed4f2e4cd729c659d086efb86ecaca74919ff8|Jun 6 2007}}&lt;br /&gt;
* Matlab prototype of level set method working Aug 30, 2007&lt;br /&gt;
* Imported a modular rewrite with a new standalone level set code, called SFIRE {{WRF-Fire-commit|7b72b87820be21e0febba943f7325e66839016e5|Sep 5 2007}}&lt;br /&gt;
* WRF+spread by level set coupled code working {{WRF-Fire-commit|c073b70ef91f4458092cf0a7ecf9163aed5860ea|Nov 2 2007}}&lt;br /&gt;
* Paper with description of WRF-Fire and data assimilation [http://arxiv.org/abs/0712.3965 posted on arXiv Dec 24 2007]&lt;br /&gt;
* Ignition controlled from namelist {{WRF-Fire-commit|2439f24ff443ec18c5ff5812af456de30fb24636|Dec 24 2007}}&lt;br /&gt;
&lt;br /&gt;
===2008===&lt;br /&gt;
* Change nodes on the fire mesh from corners to centers {{WRF-Fire-commit|af413df0557a49ca56db20ff3436b14c7bccee21|Feb 10 2008}}&lt;br /&gt;
* WPS support {{WRF-Fire-commit|94a84b5b0170d8771102ff7fe25040a716268caf|3 Aug 2008}}&lt;br /&gt;
* MPI support {{WRF-Fire-commit|0509e9b746cf671922f1db96667d7f52ab947563|Oct 23 2008}}&lt;br /&gt;
* Cleanup, delete standalone driver and the CAWFE tracer code {{WRF-Fire-commit|a3f839e50ebcf7e068c8aa0266401220bc09f2ec|Nov 18 2008}}&lt;br /&gt;
* Landfire data conversion {{WRF-Fire-commit|932a2d8b3e926bb193b2af07c1ba6410aa0e7e01|Dec 15 2008}}&lt;br /&gt;
&lt;br /&gt;
===2009===&lt;br /&gt;
* Distributed memory (halos) {{WRF-Fire-commit|0b5a20e6d0c88a1771a781c57307df252a213a7b|Jan 7 2009}}&lt;br /&gt;
* Approved by UCD and NCAR for public release {{WRF-Fire-commit|76fac8823d0a81920de150a1061b95cd7717b0a9|Mar 17 2009}}&lt;br /&gt;
* Set up nested ideal case {{WRF-Fire-commit|aed943498d9ed9c2745151d1f4a63561ed7b5b22|May 4 2009}}&lt;br /&gt;
* WPS support for fire grid and nesting {{WRF-Fire-commit|4c86cf15408046b28a4c725fea80a9fc15ca1a7e|7 May 2009}}&lt;br /&gt;
* Paper with a description of the WRF-Fire and data assimilation [http://dx.doi.org/10.1109/MCS.2009.932224 published in June 2009]&lt;br /&gt;
* Add namelist.fire to define fuel categories {{WRF-Fire-commit|c978b4ad2e83788d21c72dd93b8ec7eaea5a8c90|20 Sep 2009}}&lt;br /&gt;
* Interpolate in the computation of fuel_left locally to save stack memory {{WRF-Fire-commit|2ac779ca139bd84e5da858a155d1efc2559b238d|Oct 10 2009}}&lt;br /&gt;
* [[How to visualize WRF-Fire output in Matlab|3D visualization in Matlab]] {{WRF-Fire-commit|9237c5529ee03a53d14c448a5fabefc13704819a|Nov 3 2009}}&lt;br /&gt;
* [[How to visualize WRF-Fire output in VisTrails|Visualization in VisTrails]] and [[Supercomputing 2009 Demo]], Nov 15 2009&lt;br /&gt;
&lt;br /&gt;
===2010===&lt;br /&gt;
* Support for WRF restart {{WRF-Fire-commit|fd0219bce87b332b8abb55558c6323f2fc6dc2be|16 Jan 2010}}&lt;br /&gt;
* Control in namelist the initial atmosphere perturbation (bubble) in ideal run, off by default. {{WRF-Fire-commit|993cd88d2e2ec6ed84ada027bf5a483ac686c163|27 Feb 2010}} See  [[Talk:WRF-Fire development notes#Bubble|discussion]].&lt;br /&gt;
* Version {{WRF-Fire-commit|b6fe89aeb71d941e91530aafcf2f5b183a44fc37|19 Feb 2010}} [[Fire code in WRF release#3.2|released with WRF 3.2]] on [http://www.mmm.ucar.edu/wrf/users/wrfv3.2/updates-3.2.html Apr 2 2010]&lt;br /&gt;
* Hyperbolic vertical mesh grading in ideal run not only exponential. {{WRF-Fire-commit|580450739d07b57467f2ce50e1d898029fa47fca|Mar 9 2010}}  &lt;br /&gt;
* Fetch high-resolution geogrid data automatically {{WRF-Fire-commit|3bebc4f46f72de3cbfcebd902879098de1122c23|Apr 27 2010}}&lt;br /&gt;
* Walking line ignition (as the fireman walks igniting the fire) {{WRF-Fire-commit|acf57d48e09c66826dd8defc87a6dc800627a2e5|23 May 2010}}&lt;br /&gt;
* Basic [[How to visualize WRF-Fire output in VAPOR|visualization in VAPOR]]. {{WRF-Fire-commit|1e710fc81479ea71ed74dd9903da9917fc9dcd93|May 26 2010}}&lt;br /&gt;
* Merge git repository with WRF and WPS 3.2  {{WRF-Fire-commit|0c084a8e4efeda74c67f62e79393dcec3b21e2d5|Jun 12 2010}} [http://mailman.ucar.edu/pipermail/wrf-fire/2010-June/000046.html announcement]&lt;br /&gt;
* Interpolate the terrain gradient to the fire mesh instead of differencing an interpolated terrain height. {{WRF-Fire-commit|80d70fb74bea0e09ef0f635bd90fbe657582a79d|Jun 14 2010}} See [[Talk:WRF-Fire development notes#Proposed computation of smooth terrain gradient|discussion]].&lt;br /&gt;
* Replace includes for fire parameter arrays by a derived type. {{WRF-Fire-commit|38007163901e413a8952abd3d600fc8eba24d103|Jun 14 2010}}. See [[Talk:WRF-Fire development notes#Ugly includes|discussion]].&lt;br /&gt;
* Resurrected a standalone driver for the fire code that is independent of WRF for diagnostics. {{WRF-Fire-commit|6464357566b780c12d1d71dc2a144a27ed23217b|20 Jun 2010}} See [[Talk:WRF-Fire development notes#Standalone driver|discussion]].&lt;br /&gt;
* Surface initialization in ideal runs allows for defining surface properties like roughness, ground temperature, albedo etc., required by soil models and radiation codes. See [[Talk:WRF-Fire wish list#Surface Initialization|discussion]]. {{WRF-Fire-commit|5eb128225f87b727f30ce11f9cb07b637fb62786|Jul 6 2010}}&lt;br /&gt;
* Reading from a file in an ideal run: {{WRF-Fire-commit|d15ece139d3dbd69badfbb5d1c8f1cb857c53132|land use}}, {{WRF-Fire-commit|8d204c4348509cb2efd185cadc4073971ea95ecc|fuel categories}}, {{WRF-Fire-commit|45415cbb515cd4d7dbe0828b11b51b91bf993ae4|topography}} Jul 22 2010&lt;br /&gt;
* Vertical wind profiles in Matlab for diagnostics {{WRF-Fire-commit|bee953f99cdcd5260389fa3ab5ef5a7529770e2e|Sun Jul 25 2010}}&lt;br /&gt;
* Interpolate wind to a given height (the same  for all fuels) from log profile, and set the height as fire_wind_height in the namelist. [http://github.com/jbeezley/wrf-fire/blob/76d3724e5ce9a69ba51ed650667058e9e583ae21/wrfv2_fire/phys/module_fr_sfire_driver.F#L1023 Sep 11 2010], added wind reduction factor with defaults per Behave {{WRF-Fire-commit|dce06344012c38151fef29b2924b9fc2de6a71cb|16 Sep 2010}}&lt;br /&gt;
* [[How to diagnose fuel properties in WRF-Fire|Rate of spread diagnostics]] {{WRF-Fire-commit|334bf9417b5397ed3692b8f469a4914ed433e051|16 Sep 2010}}.&lt;br /&gt;
* Support for NetCDF 4 output files based on HDF5 {{WRF-Fire-commit|06c276f324873bc4c6f82c27298430435989ab97|16 Oct 2010}}.&lt;br /&gt;
* Subscale ignition with zero initial radius. See [[Talk:WRF-Fire development notes#Gradual_ignition|discussion]]. {{WRF-Fire-commit|c28da1ac95eda7cda822df60e8051e7500873b19|Nov 2, 2010}}&lt;br /&gt;
&lt;br /&gt;
===2011===&lt;br /&gt;
* [[Vertical wind interpolation|Vertical log interpolation of the wind to different heights for different fuels]]. See [[Talk:WRF-Fire_development_notes#Wind_interpolation_to_different_heights_for_different_fuels|discussion]]. {{WRF-Fire-commit|72219b996f0dbe6af16cd7afdcc39e036c751156|24 Feb 2011}}&lt;br /&gt;
* Ignition time interpolation for better quadrature of fuel left {{WRF-Fire-commit|d9cfc6e0988ed90cc96146a23d65a35bb5bad8d8|March 16, 2011}}. See [[WRF-Fire development notes#Better quadrature for fuel left|discussion]].&lt;br /&gt;
* Added independent adjustment factors of base spread rate, wind correction, and slope correction to fuel description {{WRF-Fire-commit|43a7425b36dd7fdc4b3784c6827cb7c44605d748|Mar 23, 2011}}&lt;br /&gt;
* Perimeter ignition from specified ignition times on the whole domain, allowing for atmosphere and fuel consumption spin-up. {{WRF-Fire-commit|716cf59c2313e3bb483a57db02211d17b8d095f7|Mar 24, 2011}} in ideal run. See [[Talk:WRF-Fire development notes#Fire spin-up|discussion]].&lt;br /&gt;
* WRF-Fire [http://mailman.ucar.edu/pipermail/wrf-fire/2011-April/000052.html released with WRF 3.3 Apr 6, 2011]. The release code is based on the {{WRF-Fire-commit|fa26d08d8154124ac51514b11bc671eb312e20f8|Nov 20, 2010}} version with bug fix {{WRF-Fire-commit|b964224219585ab198d58510c8f7a0cf129b1990|Jan 17, 2011}}, with [[Changes in WRF-Fire 3.3 release|further changes made at NCAR]].&lt;br /&gt;
* Started using the name [[SFIRE]] instead of [[WRF-Fire]], June 2011.&lt;br /&gt;
* Reference paper [http://dx.doi.org/10.5194/gmd-4-591-2011 published] in [http://www.geoscientific-model-development.net GMD] July 7, 2011.&lt;br /&gt;
* Timing from [http://www.cesm.ucar.edu/ ESMF] [http://www.mmm.ucar.edu/wrf/users/docs/user_guide/users_guide_chap7.html#_Toc75337319 structures] to support variable time step and ignition in a restart run. {{WRF-Fire-commit|e062dbf62b7591e71a486a7c512efd75e48ed9a1|Jul 24, 2011}} See [[Talk:WRF-Fire development notes#Ignition_Time|discussion]].&lt;br /&gt;
* [[Users guide]] moved to the wiki, including existing [[List of howtos|howtos]] as chapters. August 6, 2011&lt;br /&gt;
* Spread vector and [http://www.forestencyclopedia.net/p/p486 Byram&#039;s fire intensity]  to estimate the severity of a potential fire for a fire danger rating map {{WRF-Fire-commit|52c4e1595e08a98059ae33c0592bee3d3c0f2bb4|Aug 26, 2011}}&lt;br /&gt;
* Restart from wrfout (cycling=.true.) {{WRF-Fire-commit|2b7c8f19382d5d3269e604bf6ba180a0ed8aec44|Sep 16, 2011}} See [[Talk:WRF-Fire development notes#Restart_from_wrfout|discussion]].&lt;br /&gt;
* Spatially variable moisture as a part of WRF input {{WRF-Fire-commit|5a6c4b8c06a0aef126ee60a1541744aaaf62c2e5|Sep 27, 2011}}&lt;br /&gt;
* Standalone model running from WRF atmospheric state. {{WRF-Fire-commit|168fbfaa8a62061b51999001dc55162e2ac3a798|Oct 28 2011}} See [[Talk:WRF-Fire development notes#Standalone_driver|discussion]].&lt;br /&gt;
===2012===&lt;br /&gt;
* Integrated fuel moisture model with input from WRF variables, based on the Canadian fire danger rating system {{WRF-Fire-commit|763044cd62eaaec5b92c14462f6e25bdddf4d643|Mar 10, 2012}}, See [[Talk:WRF-Fire_development_notes#Moisture_model|discussion]].&lt;br /&gt;
* Multiple fire time steps in a single atmospheric step, for stability with highly heterogenous fuels {{WRF-Fire-commit|773cacd01f4401f69d5ab4a0877e3a0a5a32abad|Mar 30, 2012}}&lt;br /&gt;
&lt;br /&gt;
==Back burner==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Items from the wish list that are around for a long time or may never be done should be moved here.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Merge [http://mailman.ucar.edu/pipermail/wrf-fire/2011-April/000053.html additional changes] [[Fire_code_in_WRF_release#WRF_3.3|made independently in the WRF 3.3 release]].&lt;br /&gt;
* Convert ignition namelist variables into arrays for multiple ignitions.&lt;br /&gt;
* Add running (not colocated with surface fire) canopy fire.&lt;br /&gt;
* Support [http://www.dtcenter.org/wrf-nmm/users/ WRF-NMM] in addition to [http://www.mmm.ucar.edu/wrf/users/ WRF-ARW]&lt;br /&gt;
* Take the winds from a given distance behind the fireline, and set the distance in the namelist.&lt;br /&gt;
* Output of emissions products into WRF for visualization of smoke transport and dispersion.&lt;br /&gt;
* Add fuel models &amp;amp; fuel modeling schemes, esp. Scott-Burgan categories. Input the same fuel description files as [[BehavePlus]] and [[FARSITE]]. &lt;br /&gt;
* Generate input data for [[WFDS]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[How to get WRF-Fire]]&lt;br /&gt;
* [[List of WRF-Fire pages]]&lt;br /&gt;
* [[Users guide]]&lt;br /&gt;
* [[Fire code in WRF release]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* {{ccm|Data_assimilation_seminar_to_do_list|Data assimilation seminar to do list}}&lt;br /&gt;
* {{ccm|Jan_Mandel/Blog|Jan Mandel&#039;s blog}}&lt;br /&gt;
* [http://repo.or.cz/git-browser/by-commit.html?r=wrffire.git Commit graph]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/WRF_conventions.html WRF Coding Conventions]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/users/tutorial/200807/WRF%20Registry%20and%20Examples.pdf WRF Registry and Examples]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/software_v2/ WRF v2 Software Tools and Documentation]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/software_2.0/registry_schaffer.pdf Description of WRF Registry]&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF-Fire|Development notes]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2472</id>
		<title>Smoke and coupling with WRF-Chem</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2472"/>
		<updated>2012-04-22T00:43:48Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Development notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of WRF 3.4, WRF-Chem is now included in the SFire repository.  Work into coupling SFire with&lt;br /&gt;
WRF-Chem is ongoing.  See {{WRF-Fire-branch|chem}}.  As of {{WRF-Fire-commit|e7b52ab1baef2565ae1743a25bc1ed7f7f2fc109|April 21, 2012}}, a working template&lt;br /&gt;
has been implemented to inject a tracer into the atmosphere.  This implementation seems to work as expected.&lt;br /&gt;
[[File:Sfire smoke.png|thumb|SFire smoke tracer in action.  See [[File:Smoke small.avi|animation]].]]&lt;br /&gt;
&lt;br /&gt;
==Compiling with chem support==&lt;br /&gt;
Compiling the code with support for WRF-Chem is similar to the [[How to compile WRF-Fire|standard procedure]].&lt;br /&gt;
You must set an environment variable &amp;lt;tt&amp;gt;WRF_CHEM&amp;lt;/tt&amp;gt; and configure with the argument &amp;lt;tt&amp;gt;chem&amp;lt;/tt&amp;gt; as follows.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export WRF_CHEM=1&lt;br /&gt;
./configure chem&lt;br /&gt;
./compile em_fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running an idealized example==&lt;br /&gt;
An idealized example based on the hill case has been created in &amp;lt;tt&amp;gt;test/em_fire/chem&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This example doesn&#039;t quite work out of the box because WRF-Chem requires USGS landuse &lt;br /&gt;
data that the ideal case doesn&#039;t initialize.  To get this example working, you have to trick&lt;br /&gt;
WRF into thinking that the input file contains USGS landuse data.  (I&#039;m not sure if this data is even used when just&lt;br /&gt;
using passive tracers anyway.)  To do this, you can just change the global attribute &amp;lt;tt&amp;gt;MMINLU&amp;lt;/tt&amp;gt; in&lt;br /&gt;
&amp;lt;tt&amp;gt;wrfinput_d01&amp;lt;/tt&amp;gt; to the string &amp;quot;&amp;lt;tt&amp;gt;USGS&amp;lt;/tt&amp;gt;&amp;quot;.  A python script (&amp;lt;tt&amp;gt;make_usgs.py&amp;lt;/tt&amp;gt;)&lt;br /&gt;
that does this is included in the &amp;lt;tt&amp;gt;test/em_fire/chem&amp;lt;/tt&amp;gt; directory, but it requires &lt;br /&gt;
[http://code.google.com/p/netcdf4-python/ netcdf4-python] to run.  Assuming you have this module, the&lt;br /&gt;
following will execute the example.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./ideal.exe&lt;br /&gt;
./make_usgs.py&lt;br /&gt;
./wrf.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tracer will appear as an atmospheric variable in the output file with the name &amp;lt;tt&amp;gt;smoke&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Development notes==&lt;br /&gt;
As of {{WRF-Fire-commit|e7b52ab1baef2565ae1743a25bc1ed7f7f2fc109|April 21, 2012}},&lt;br /&gt;
the tracer is simply copied from the heat flux at the surface on the atmospheric mesh (&amp;lt;tt&amp;gt;GRNHFX&amp;lt;/tt&amp;gt;).&lt;br /&gt;
A call to &amp;lt;tt&amp;gt;fire_emission&amp;lt;/tt&amp;gt; has been added to &amp;lt;tt&amp;gt;module_fr_sfire_driver_wrf.F&amp;lt;/tt&amp;gt; just after&lt;br /&gt;
calculation of heat flux tendencies.  This subroutine has been added to the fire atmospheric module&lt;br /&gt;
and is preprocessed out of the source when WRF-Chem is not being compiled.&lt;br /&gt;
&lt;br /&gt;
WRF-Chem contains a multitude of arrays representing concentrations of chemical species. The typical&lt;br /&gt;
method of injecting data into the simulation involves generating emission input data files from standard&lt;br /&gt;
sources.  These sources are read into the code using auxiliary input streams and interpolated into&lt;br /&gt;
the species arrays in the &amp;lt;tt&amp;gt;emissions&amp;lt;/tt&amp;gt; module.  For the coupling with SFire, turning off file&lt;br /&gt;
input in the namelist seems to initialize the emission arrays to zero.  This eliminates the need to generate&lt;br /&gt;
useless emission files.&lt;br /&gt;
&lt;br /&gt;
WRF-Chem stores its state in several large arrays called &amp;lt;tt&amp;gt;*_emis&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;chem&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;tracer&amp;lt;/tt&amp;gt;.  These arrays are four dimensional indexed like (x,z,y,s), where s is the chemical&lt;br /&gt;
species. The &amp;lt;tt&amp;gt;chem&amp;lt;/tt&amp;gt;&lt;br /&gt;
and &amp;lt;tt&amp;gt;tracer&amp;lt;/tt&amp;gt; arrays are located on the standard atmospheric grid, while the &amp;lt;tt&amp;gt;*_emis&amp;lt;/tt&amp;gt; arrays&lt;br /&gt;
have an alternate vertical grid indexed to &amp;lt;tt&amp;gt;config%kemit&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
An internal table keeps track of where each species is stored in these arrays.  The domain structure&lt;br /&gt;
contains scalars such as &amp;lt;tt&amp;gt;p_smoke&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;p_e_so4&amp;lt;/tt&amp;gt; that give the species index for&lt;br /&gt;
each type.  The species quantities are specific to different chemistry options (&amp;lt;tt&amp;gt;chem_opt&amp;lt;/tt&amp;gt;) &lt;br /&gt;
from the registry.  We should eventually test that a compatible namelist option has been chosen to &lt;br /&gt;
avoid errors.  The dynamics section of the namelist has an option for &amp;lt;tt&amp;gt;tracer_opt&amp;lt;/tt&amp;gt;.  This&lt;br /&gt;
controls what tracers are generated for Chem.  For example, &amp;lt;tt&amp;gt;trace_opt = 1&amp;lt;/tt&amp;gt; creates a single&lt;br /&gt;
tracer called &amp;lt;tt&amp;gt;smoke&amp;lt;/tt&amp;gt;, see the registry for package definitions.  &lt;br /&gt;
&lt;br /&gt;
For the passive tracer scheme (&amp;lt;tt&amp;gt;chem_opt = 14&amp;lt;/tt&amp;gt;), it appears to be sufficient just to add&lt;br /&gt;
the fire emission directly into the tracer array.  If we want to fully utilize WRF-Chem in the future,&lt;br /&gt;
we may need to do something more complicated.  The [http://ruc.noaa.gov/wrf/WG11/Users_guide.pdf User&#039;s guide] mentions that there is code to handle wildfire emissions data from MODIS satellites. This may be&lt;br /&gt;
helpful either directly or as a guide in how to inject the chemical species from the SFire model.&lt;br /&gt;
&lt;br /&gt;
According to some comments in Registry.EM, basic tracer support exists in WRF without Chem.  It is possible&lt;br /&gt;
we may be able to add smoke the WRF even without compile for Chem.  I have not explored this yet, though.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2471</id>
		<title>Smoke and coupling with WRF-Chem</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2471"/>
		<updated>2012-04-21T23:54:57Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Running an idealized example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of WRF 3.4, WRF-Chem is now included in the SFire repository.  Work into coupling SFire with&lt;br /&gt;
WRF-Chem is ongoing.  See {{WRF-Fire-branch|chem}}.  As of {{WRF-Fire-commit|e7b52ab1baef2565ae1743a25bc1ed7f7f2fc109|April 21, 2012}}, a working template&lt;br /&gt;
has been implemented to inject a tracer into the atmosphere.  This implementation seems to work as expected.&lt;br /&gt;
[[File:Sfire smoke.png|thumb|SFire smoke tracer in action.  See [[File:Smoke small.avi|animation]].]]&lt;br /&gt;
&lt;br /&gt;
==Compiling with chem support==&lt;br /&gt;
Compiling the code with support for WRF-Chem is similar to the [[How to compile WRF-Fire|standard procedure]].&lt;br /&gt;
You must set an environment variable &amp;lt;tt&amp;gt;WRF_CHEM&amp;lt;/tt&amp;gt; and configure with the argument &amp;lt;tt&amp;gt;chem&amp;lt;/tt&amp;gt; as follows.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export WRF_CHEM=1&lt;br /&gt;
./configure chem&lt;br /&gt;
./compile em_fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running an idealized example==&lt;br /&gt;
An idealized example based on the hill case has been created in &amp;lt;tt&amp;gt;test/em_fire/chem&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This example doesn&#039;t quite work out of the box because WRF-Chem requires USGS landuse &lt;br /&gt;
data that the ideal case doesn&#039;t initialize.  To get this example working, you have to trick&lt;br /&gt;
WRF into thinking that the input file contains USGS landuse data.  (I&#039;m not sure if this data is even used when just&lt;br /&gt;
using passive tracers anyway.)  To do this, you can just change the global attribute &amp;lt;tt&amp;gt;MMINLU&amp;lt;/tt&amp;gt; in&lt;br /&gt;
&amp;lt;tt&amp;gt;wrfinput_d01&amp;lt;/tt&amp;gt; to the string &amp;quot;&amp;lt;tt&amp;gt;USGS&amp;lt;/tt&amp;gt;&amp;quot;.  A python script (&amp;lt;tt&amp;gt;make_usgs.py&amp;lt;/tt&amp;gt;)&lt;br /&gt;
that does this is included in the &amp;lt;tt&amp;gt;test/em_fire/chem&amp;lt;/tt&amp;gt; directory, but it requires &lt;br /&gt;
[http://code.google.com/p/netcdf4-python/ netcdf4-python] to run.  Assuming you have this module, the&lt;br /&gt;
following will execute the example.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./ideal.exe&lt;br /&gt;
./make_usgs.py&lt;br /&gt;
./wrf.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tracer will appear as an atmospheric variable in the output file with the name &amp;lt;tt&amp;gt;smoke&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Development notes==&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2470</id>
		<title>Smoke and coupling with WRF-Chem</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2470"/>
		<updated>2012-04-21T23:37:53Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Compiling with chem support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of WRF 3.4, WRF-Chem is now included in the SFire repository.  Work into coupling SFire with&lt;br /&gt;
WRF-Chem is ongoing.  See {{WRF-Fire-branch|chem}}.  As of {{WRF-Fire-commit|e7b52ab1baef2565ae1743a25bc1ed7f7f2fc109|April 21, 2012}}, a working template&lt;br /&gt;
has been implemented to inject a tracer into the atmosphere.  This implementation seems to work as expected.&lt;br /&gt;
[[File:Sfire smoke.png|thumb|SFire smoke tracer in action.  See [[File:Smoke small.avi|animation]].]]&lt;br /&gt;
&lt;br /&gt;
==Compiling with chem support==&lt;br /&gt;
Compiling the code with support for WRF-Chem is similar to the [[How to compile WRF-Fire|standard procedure]].&lt;br /&gt;
You must set an environment variable &amp;lt;tt&amp;gt;WRF_CHEM&amp;lt;/tt&amp;gt; and configure with the argument &amp;lt;tt&amp;gt;chem&amp;lt;/tt&amp;gt; as follows.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export WRF_CHEM=1&lt;br /&gt;
./configure chem&lt;br /&gt;
./compile em_fire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running an idealized example==&lt;br /&gt;
&lt;br /&gt;
==Development notes==&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2469</id>
		<title>Smoke and coupling with WRF-Chem</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Smoke_and_coupling_with_WRF-Chem&amp;diff=2469"/>
		<updated>2012-04-21T23:25:12Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Describing chem support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of WRF 3.4, WRF-Chem is now included in the SFire repository.  Work into coupling SFire with&lt;br /&gt;
WRF-Chem is ongoing.  See {{WRF-Fire-branch|chem}}.  As of {{WRF-Fire-commit|e7b52ab1baef2565ae1743a25bc1ed7f7f2fc109|April 21, 2012}}, a working template&lt;br /&gt;
has been implemented to inject a tracer into the atmosphere.  This implementation seems to work as expected.&lt;br /&gt;
[[File:Sfire smoke.png|thumb|SFire smoke tracer in action.  See [[File:Smoke small.avi|animation]].]]&lt;br /&gt;
&lt;br /&gt;
==Compiling with chem support==&lt;br /&gt;
&lt;br /&gt;
==Running an idealized example==&lt;br /&gt;
&lt;br /&gt;
==Development notes==&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Smoke_small.avi&amp;diff=2468</id>
		<title>File:Smoke small.avi</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Smoke_small.avi&amp;diff=2468"/>
		<updated>2012-04-21T23:20:58Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Animation of smoke tracer injected into WRF-Chem.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Animation of smoke tracer injected into WRF-Chem.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Sfire_smoke.png&amp;diff=2467</id>
		<title>File:Sfire smoke.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Sfire_smoke.png&amp;diff=2467"/>
		<updated>2012-04-21T23:19:10Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Initial implementation of SFire/WRF-Chem coupling injecting
a tracer into the atmosphere.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Initial implementation of SFire/WRF-Chem coupling injecting&lt;br /&gt;
a tracer into the atmosphere.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2426</id>
		<title>How to convert data for Geogrid</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2426"/>
		<updated>2012-03-25T17:46:35Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Adding information on proj.4 support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
Running WRF-Fire using real data requires additional datasets not included in the standard&lt;br /&gt;
WPS input data [http://www.mmm.ucar.edu/wrf/src/wps_files/geog_v3.1.tar.gz tarball].  For these,&lt;br /&gt;
it is necessary to convert your source data into the &lt;br /&gt;
[http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Writing_Static_Data geogrid data format]. &lt;br /&gt;
The geogrid data format consists of a directory of tiled binary files with names indicating the index range contained in each tile.&lt;br /&gt;
For instance, a file name of &amp;lt;tt&amp;gt;00101-00200.00051-00100&amp;lt;/tt&amp;gt; would consist of columns 101 through 200 and rows 51 through 100.&lt;br /&gt;
The files themselves contain only an array integers, with no associated metadata.&lt;br /&gt;
The metadata for the dataset is contained in a file called &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt;, which contains a series &#039;&#039;keyword=value&#039;&#039; statements&lt;br /&gt;
telling geogrid the details of the data tiles, such as width, height, the number of bytes per integer, etc.  The index file also contains metadata &lt;br /&gt;
for the data set itself, such as the projection information and physical units.&lt;br /&gt;
&lt;br /&gt;
We have made available a series of scripts and utilities ([http://github.com/jbeezley/autoWPS autoWPS]) intended to automate many of the steps &lt;br /&gt;
required to create a dataset for a WRF real run.  A utility program included in this repository, WPSGeoTiff, is a simple command line utility that &lt;br /&gt;
takes a GeoTiff file and writes converts the data into geogrid binary format.  The GeoTiff format was chosen because it is a highly ubiquitous format&lt;br /&gt;
for geotagged data and it has a cross-platform and open source c library called [http://trac.osgeo.org/geotiff/ libGeoTIFF].  Most, if not all, GIS application&lt;br /&gt;
software is capable of converting or exporting a dataset as a GeoTiff file.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
The WPSGeoTiff utility requires two external libraries in order to compile.  You should pick a location to install the libraries, for instance &amp;lt;tt&amp;gt;PREFIX=${HOME}/opt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Optional: [http://trac.osgeo.org/proj/ Proj.4]  This library is required in order to process projected GeoTIFF files.  It must be installed before GeoTIFF for the projection support to be added.&lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
* [http://www.libtiff.org/ libTIFF] The following commands are sufficient to install libTIFF for most systems.&lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
* [http://trac.osgeo.org/geotiff/ libGeoTIFF] A similar set of commands install libGeoTIFF, but we must tell the configure script were we put libTIFF.&lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX --with-libtiff=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
If you are compiling in Proj.4 support it may be necessary to tell GeoTIFF where that library is installed.  You can do this by adding the flag &amp;lt;tt&amp;gt;--with-proj=$PREFIX&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX --with-libtiff=$PREFIX --with-proj=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
After doing this, the configuration summary that prints after running configure will have a line saying &amp;lt;tt&amp;gt;PROJ support......: yes&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Obtaining the WPSGeoTiff source=&lt;br /&gt;
&lt;br /&gt;
The autoWPS package is available as a git repository hosted at [http://github.com/jbeezley/autoWPS github].  The repository can be cloned with the &lt;br /&gt;
[http://git-scm.com/ git] command: &lt;br /&gt;
 &amp;lt;code&amp;gt;git clone git://github.com/jbeezley/autoWPS.git&amp;lt;/code&amp;gt; &lt;br /&gt;
A tarball of the latest release can also be obtained&lt;br /&gt;
at [http://github.com/jbeezley/autoWPS/tarball/master http://github.com/jbeezley/autoWPS/tarball/master].&lt;br /&gt;
&lt;br /&gt;
=Compiling WPSGeoTiff=&lt;br /&gt;
&lt;br /&gt;
Inside the main directory of the autoWPS release is a subdirectory called WPSGeoTiff.  This utility is written in pure c and creates a standalone binary.&lt;br /&gt;
In most cases it can be compiled by issuing the following command.&lt;br /&gt;
 &amp;lt;code&amp;gt;LIBTIFF=$PREFIX GEOTIFF=$PREFIX make&amp;lt;/code&amp;gt;&lt;br /&gt;
The main binary &amp;lt;tt&amp;gt;convert_geotiff.x&amp;lt;/tt&amp;gt;, should now reside in the current directory.&lt;br /&gt;
&lt;br /&gt;
=Running WPSGeoTiff=&lt;br /&gt;
&lt;br /&gt;
Running &amp;lt;tt&amp;gt;convert_geotiff.x&amp;lt;/tt&amp;gt; with no arguments will produce a usage description.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Usage: ./convert_geotiff.x [OPTIONS] FileName&lt;br /&gt;
&lt;br /&gt;
Converts geotiff file `FileName&#039; into geogrid binary format&lt;br /&gt;
into the current directory.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
-h         : Show this help message and exit&lt;br /&gt;
-c NUM     : Indicates categorical data (NUM = number of categories)&lt;br /&gt;
-b NUM     : Tile border width (default 3)&lt;br /&gt;
-w [1,2,4] : Word size in output in bytes (default 2)&lt;br /&gt;
-z         : Indicates unsigned data (default FALSE)&lt;br /&gt;
-t NUM     : Output tile size (default 100)&lt;br /&gt;
-s SCALE   : Scale factor in output (default 1.)&lt;br /&gt;
-m MISSING : Missing value in output (default 0., ignored for categorical data)&lt;br /&gt;
-u UNITS   : Units of the data (default &amp;quot;NO UNITS&amp;quot;)&lt;br /&gt;
-d DESC    : Description of data set (default &amp;quot;NO DESCRIPTION&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
All of the files will be created in the current directory, so it is best to run the program from an empty directory.  A more detailed description of the &lt;br /&gt;
arguments to this program follows.&lt;br /&gt;
*; &amp;lt;tt&amp;gt;-b&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The data tiles in the geogrid binary format are allowed to overlap by a fixed number of grid points.  The extra border around the tile is called the halo, and this argument sets the width of the halo.  For instance with a halo of size three, the file named &amp;lt;tt&amp;gt;00101-00200.00051-00100&amp;lt;/tt&amp;gt; would actually contain columns 98-203 and rows 48-103 of the full dataset.  This halo is necessary for the interpolation scheme inside of WPS.  The default should be acceptable for most situations.&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The number of bytes to represent each data point as an integer.  These integers are scaled by the scaling parameter before being truncated to an integer. scaledA lower value will make the output data smaller, at the cost of accuracy or the dynamic range of the input.&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt; -m&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;Any grid point that is missing data, such as the outer border of the edge tiles, or grid points that the GeoTIFF file indicates as missing will be set to this value.  This argument is currently ignored when the categorical flag is set, instead missing data will be set to the maximum category + 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
*;&amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;Because the data is always stored as an integer, a scaling parameter is needed to represent fractional numbers or large values.  The data set will be divided by this number prior to being truncated to an integer.  If the data set has an accuracy of 2 decimal places, a reasonable scale to use would be 0.01.&amp;lt;/p&amp;gt;&lt;br /&gt;
*;&amp;lt;tt&amp;gt;-u, -d&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The units and a small description of the data set should be included as arguments.  Multi-word arguments should be quoted as follows. &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;-u meters -d &amp;quot;elevation above sea level&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt;FileName&amp;lt;/tt&amp;gt; &lt;br /&gt;
:&amp;lt;p&amp;gt;The final argument must always be present.  This is the (absolute or relative) path to the GeoTIFF file to be converted.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get an error that says something like &amp;quot;&amp;lt;tt&amp;gt;error while loading shared libraries: libgeotiff.so&amp;lt;/tt&amp;gt;...&amp;quot;, this means that GeoTIFF was compiled in as a shared library.  You just need to tell the system where to find this library.  This can be done by adding the path to the GeoTIFF library to the environment variable &amp;lt;tt&amp;gt;LD_LIBRARY_PATH&amp;lt;/tt&amp;gt;.  For example, &lt;br /&gt;
&amp;lt;code&amp;gt;export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib&amp;lt;/code&amp;gt;&lt;br /&gt;
where $PREFIX is the location where you installed GeoTIFF.&lt;br /&gt;
&lt;br /&gt;
=Limitations=&lt;br /&gt;
&lt;br /&gt;
The current code has several limitations which are listed here.&lt;br /&gt;
* Datasets must not contain more than 99,999 grid points in each axis.  This is a limitation of the geogrid format itself, due to the naming convention of the tiles.  However, it is possible (but inefficient) to split a single dataset into multiple directories for this purpose.  A better solution would be to resample the data to a lower spatial resolution prior to converting.&lt;br /&gt;
* This program cannot convert between geographic projections, so the input data must be in a projection supported by WPS.  All of the projections [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Description_of_index supported by WPS] should work for this conversion program; however, only UTM, Albers equal area, and lat-lon have been tested.  In addition, data sources may not conform to [http://www.spatialreference.org/ EPSG standards] in their projection tags; the output should always be checked before use.&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF-Fire]]&lt;br /&gt;
[[Category:Howtos|Convert data for Geogrid]]&lt;br /&gt;
[[Category:Data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2423</id>
		<title>How to convert data for Geogrid</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_convert_data_for_Geogrid&amp;diff=2423"/>
		<updated>2012-03-25T00:27:46Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Adding a note about LD_LIBRARY_PATH&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
Running WRF-Fire using real data requires additional datasets not included in the standard&lt;br /&gt;
WPS input data [http://www.mmm.ucar.edu/wrf/src/wps_files/geog_v3.1.tar.gz tarball].  For these,&lt;br /&gt;
it is necessary to convert your source data into the &lt;br /&gt;
[http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Writing_Static_Data geogrid data format]. &lt;br /&gt;
The geogrid data format consists of a directory of tiled binary files with names indicating the index range contained in each tile.&lt;br /&gt;
For instance, a file name of &amp;lt;tt&amp;gt;00101-00200.00051-00100&amp;lt;/tt&amp;gt; would consist of columns 101 through 200 and rows 51 through 100.&lt;br /&gt;
The files themselves contain only an array integers, with no associated metadata.&lt;br /&gt;
The metadata for the dataset is contained in a file called &amp;lt;tt&amp;gt;index&amp;lt;/tt&amp;gt;, which contains a series &#039;&#039;keyword=value&#039;&#039; statements&lt;br /&gt;
telling geogrid the details of the data tiles, such as width, height, the number of bytes per integer, etc.  The index file also contains metadata &lt;br /&gt;
for the data set itself, such as the projection information and physical units.&lt;br /&gt;
&lt;br /&gt;
We have made available a series of scripts and utilities ([http://github.com/jbeezley/autoWPS autoWPS]) intended to automate many of the steps &lt;br /&gt;
required to create a dataset for a WRF real run.  A utility program included in this repository, WPSGeoTiff, is a simple command line utility that &lt;br /&gt;
takes a GeoTiff file and writes converts the data into geogrid binary format.  The GeoTiff format was chosen because it is a highly ubiquitous format&lt;br /&gt;
for geotagged data and it has a cross-platform and open source c library called [http://trac.osgeo.org/geotiff/ libGeoTIFF].  Most, if not all, GIS application&lt;br /&gt;
software is capable of converting or exporting a dataset as a GeoTiff file.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
The WPSGeoTiff utility requires two external libraries in order to compile.  You should pick a location to install the libraries, for instance &amp;lt;tt&amp;gt;PREFIX=${HOME}/opt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* [http://www.libtiff.org/ libTIFF] The following commands are sufficient to install libTIFF for most systems.&lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
* [http://trac.osgeo.org/geotiff/ libGeoTIFF] A similar set of commands install libGeoTIFF, but we must tell the configure script were we put libTIFF.&lt;br /&gt;
 &amp;lt;code&amp;gt;./configure --prefix=$PREFIX --with-libtiff=$PREFIX&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Obtaining the WPSGeoTiff source=&lt;br /&gt;
&lt;br /&gt;
The autoWPS package is available as a git repository hosted at [http://github.com/jbeezley/autoWPS github].  The repository can be cloned with the &lt;br /&gt;
[http://git-scm.com/ git] command: &lt;br /&gt;
 &amp;lt;code&amp;gt;git clone git://github.com/jbeezley/autoWPS.git&amp;lt;/code&amp;gt; &lt;br /&gt;
A tarball of the latest release can also be obtained&lt;br /&gt;
at [http://github.com/jbeezley/autoWPS/tarball/master http://github.com/jbeezley/autoWPS/tarball/master].&lt;br /&gt;
&lt;br /&gt;
=Compiling WPSGeoTiff=&lt;br /&gt;
&lt;br /&gt;
Inside the main directory of the autoWPS release is a subdirectory called WPSGeoTiff.  This utility is written in pure c and creates a standalone binary.&lt;br /&gt;
In most cases it can be compiled by issuing the following command.&lt;br /&gt;
 &amp;lt;code&amp;gt;LIBTIFF=$PREFIX GEOTIFF=$PREFIX make&amp;lt;/code&amp;gt;&lt;br /&gt;
The main binary &amp;lt;tt&amp;gt;convert_geotiff.x&amp;lt;/tt&amp;gt;, should now reside in the current directory.&lt;br /&gt;
&lt;br /&gt;
=Running WPSGeoTiff=&lt;br /&gt;
&lt;br /&gt;
Running &amp;lt;tt&amp;gt;convert_geotiff.x&amp;lt;/tt&amp;gt; with no arguments will produce a usage description.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Usage: ./convert_geotiff.x [OPTIONS] FileName&lt;br /&gt;
&lt;br /&gt;
Converts geotiff file `FileName&#039; into geogrid binary format&lt;br /&gt;
into the current directory.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
-h         : Show this help message and exit&lt;br /&gt;
-c NUM     : Indicates categorical data (NUM = number of categories)&lt;br /&gt;
-b NUM     : Tile border width (default 3)&lt;br /&gt;
-w [1,2,4] : Word size in output in bytes (default 2)&lt;br /&gt;
-z         : Indicates unsigned data (default FALSE)&lt;br /&gt;
-t NUM     : Output tile size (default 100)&lt;br /&gt;
-s SCALE   : Scale factor in output (default 1.)&lt;br /&gt;
-m MISSING : Missing value in output (default 0., ignored for categorical data)&lt;br /&gt;
-u UNITS   : Units of the data (default &amp;quot;NO UNITS&amp;quot;)&lt;br /&gt;
-d DESC    : Description of data set (default &amp;quot;NO DESCRIPTION&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
All of the files will be created in the current directory, so it is best to run the program from an empty directory.  A more detailed description of the &lt;br /&gt;
arguments to this program follows.&lt;br /&gt;
*; &amp;lt;tt&amp;gt;-b&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The data tiles in the geogrid binary format are allowed to overlap by a fixed number of grid points.  The extra border around the tile is called the halo, and this argument sets the width of the halo.  For instance with a halo of size three, the file named &amp;lt;tt&amp;gt;00101-00200.00051-00100&amp;lt;/tt&amp;gt; would actually contain columns 98-203 and rows 48-103 of the full dataset.  This halo is necessary for the interpolation scheme inside of WPS.  The default should be acceptable for most situations.&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The number of bytes to represent each data point as an integer.  These integers are scaled by the scaling parameter before being truncated to an integer. scaledA lower value will make the output data smaller, at the cost of accuracy or the dynamic range of the input.&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt; -m&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;Any grid point that is missing data, such as the outer border of the edge tiles, or grid points that the GeoTIFF file indicates as missing will be set to this value.  This argument is currently ignored when the categorical flag is set, instead missing data will be set to the maximum category + 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
*;&amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;Because the data is always stored as an integer, a scaling parameter is needed to represent fractional numbers or large values.  The data set will be divided by this number prior to being truncated to an integer.  If the data set has an accuracy of 2 decimal places, a reasonable scale to use would be 0.01.&amp;lt;/p&amp;gt;&lt;br /&gt;
*;&amp;lt;tt&amp;gt;-u, -d&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;p&amp;gt;The units and a small description of the data set should be included as arguments.  Multi-word arguments should be quoted as follows. &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;-u meters -d &amp;quot;elevation above sea level&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
*; &amp;lt;tt&amp;gt;FileName&amp;lt;/tt&amp;gt; &lt;br /&gt;
:&amp;lt;p&amp;gt;The final argument must always be present.  This is the (absolute or relative) path to the GeoTIFF file to be converted.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get an error that says something like &amp;quot;&amp;lt;tt&amp;gt;error while loading shared libraries: libgeotiff.so&amp;lt;/tt&amp;gt;...&amp;quot;, this means that GeoTIFF was compiled in as a shared library.  You just need to tell the system where to find this library.  This can be done by adding the path to the GeoTIFF library to the environment variable &amp;lt;tt&amp;gt;LD_LIBRARY_PATH&amp;lt;/tt&amp;gt;.  For example, &lt;br /&gt;
&amp;lt;code&amp;gt;export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib&amp;lt;/code&amp;gt;&lt;br /&gt;
where $PREFIX is the location where you installed GeoTIFF.&lt;br /&gt;
&lt;br /&gt;
=Limitations=&lt;br /&gt;
&lt;br /&gt;
The current code has several limitations which are listed here.&lt;br /&gt;
* Datasets must not contain more than 99,999 grid points in each axis.  This is a limitation of the geogrid format itself, due to the naming convention of the tiles.  However, it is possible (but inefficient) to split a single dataset into multiple directories for this purpose.  A better solution would be to resample the data to a lower spatial resolution prior to converting.&lt;br /&gt;
* This program cannot convert between geographic projections, so the input data must be in a projection supported by WPS.  All of the projections [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3.1/users_guide_chap3.htm#_Description_of_index supported by WPS] should work for this conversion program; however, only UTM, Albers equal area, and lat-lon have been tested.  In addition, data sources may not conform to [http://www.spatialreference.org/ EPSG standards] in their projection tags; the output should always be checked before use.&lt;br /&gt;
&lt;br /&gt;
[[Category:WRF-Fire]]&lt;br /&gt;
[[Category:Howtos|Convert data for Geogrid]]&lt;br /&gt;
[[Category:Data]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_center.png&amp;diff=2338</id>
		<title>File:Hurricane center.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_center.png&amp;diff=2338"/>
		<updated>2011-10-31T08:58:24Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: uploaded a new version of &amp;quot;File:Hurricane center.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2337</id>
		<title>Jbeezley/hurricane</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2337"/>
		<updated>2011-10-31T08:30:02Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane [http://www-math.ucdenver.edu/~jbeezley/data/u_v_t_q_slp_all_50mems_2009080600.tar.gz data] received from Fuqing Zhang.  The tarball received contains 50 randomly perturbed ensemble members for an operational hurricane simulation in the Gulf of Mexico.  Each NetCDF file contained in this tarball contains only the surface layer of variables U, V, SLP, T, and QVAPOR.  Nine of the ensemble members given in the tarball are visualized in the gallary below along with some basic statistical analysis of the ensemble.&lt;br /&gt;
&lt;br /&gt;
[[File:Hurricane center.png|left|frame|The centers of each hurricane calculated as the location of minimum &lt;br /&gt;
surface pressure displayed as an asterisk.  The color of the asterisks show the value of the minimum pressure.  &lt;br /&gt;
The black oval shows the range of 1 standard deviation from the mean position.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
File:Hurricane SLP 001.png&lt;br /&gt;
File:Hurricane T 001.png&lt;br /&gt;
File:Hurricane QVAPOR 001.png&lt;br /&gt;
File:Hurricane wind 001.png&lt;br /&gt;
File:Hurricane SLP 002.png&lt;br /&gt;
File:Hurricane T 002.png&lt;br /&gt;
File:Hurricane QVAPOR 002.png&lt;br /&gt;
File:Hurricane wind 002.png&lt;br /&gt;
File:Hurricane SLP 003.png&lt;br /&gt;
File:Hurricane T 003.png&lt;br /&gt;
File:Hurricane QVAPOR 003.png&lt;br /&gt;
File:Hurricane wind 003.png&lt;br /&gt;
File:Hurricane SLP 004.png&lt;br /&gt;
File:Hurricane T 004.png&lt;br /&gt;
File:Hurricane QVAPOR 004.png&lt;br /&gt;
File:Hurricane wind 004.png&lt;br /&gt;
File:Hurricane SLP 005.png&lt;br /&gt;
File:Hurricane T 005.png&lt;br /&gt;
File:Hurricane QVAPOR 005.png&lt;br /&gt;
File:Hurricane wind 005.png&lt;br /&gt;
File:Hurricane SLP 006.png&lt;br /&gt;
File:Hurricane T 006.png&lt;br /&gt;
File:Hurricane QVAPOR 006.png&lt;br /&gt;
File:Hurricane wind 006.png&lt;br /&gt;
File:Hurricane SLP 007.png&lt;br /&gt;
File:Hurricane T 007.png&lt;br /&gt;
File:Hurricane QVAPOR 007.png&lt;br /&gt;
File:Hurricane wind 007.png&lt;br /&gt;
File:Hurricane SLP 008.png&lt;br /&gt;
File:Hurricane T 008.png&lt;br /&gt;
File:Hurricane QVAPOR 008.png&lt;br /&gt;
File:Hurricane wind 008.png&lt;br /&gt;
File:Hurricane SLP 009.png&lt;br /&gt;
File:Hurricane T 009.png&lt;br /&gt;
File:Hurricane QVAPOR 009.png&lt;br /&gt;
File:Hurricane wind 009.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4 caption=&amp;quot;The sample mean of each variable given in the ensemble.&amp;quot;&amp;gt;&lt;br /&gt;
File:Hurricane mean p.png&lt;br /&gt;
File:Hurricane Mean t.png&lt;br /&gt;
File:Hurricane Mean q.png&lt;br /&gt;
File:Hurricane mean wind.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=4 caption=&amp;quot;The sample standard deviation of each variable given in the ensemble.&amp;quot;&amp;gt;&lt;br /&gt;
File:Hurricane P stdev.png&lt;br /&gt;
File:Hurricane T stdev.png&lt;br /&gt;
File:Hurricane Q stdev.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_T_stdev.png&amp;diff=2336</id>
		<title>File:Hurricane T stdev.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_T_stdev.png&amp;diff=2336"/>
		<updated>2011-10-31T08:27:31Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_Q_stdev.png&amp;diff=2335</id>
		<title>File:Hurricane Q stdev.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_Q_stdev.png&amp;diff=2335"/>
		<updated>2011-10-31T08:26:52Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_P_stdev.png&amp;diff=2334</id>
		<title>File:Hurricane P stdev.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_P_stdev.png&amp;diff=2334"/>
		<updated>2011-10-31T08:26:07Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_mean_p.png&amp;diff=2333</id>
		<title>File:Hurricane mean p.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_mean_p.png&amp;diff=2333"/>
		<updated>2011-10-31T08:24:53Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_Mean_q.png&amp;diff=2332</id>
		<title>File:Hurricane Mean q.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_Mean_q.png&amp;diff=2332"/>
		<updated>2011-10-31T08:24:09Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_Mean_t.png&amp;diff=2331</id>
		<title>File:Hurricane Mean t.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_Mean_t.png&amp;diff=2331"/>
		<updated>2011-10-31T08:23:32Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_mean_wind.png&amp;diff=2330</id>
		<title>File:Hurricane mean wind.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_mean_wind.png&amp;diff=2330"/>
		<updated>2011-10-31T08:20:44Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_center.png&amp;diff=2329</id>
		<title>File:Hurricane center.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_center.png&amp;diff=2329"/>
		<updated>2011-10-31T08:13:07Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=User_talk:Jbeezley&amp;diff=2328</id>
		<title>User talk:Jbeezley</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=User_talk:Jbeezley&amp;diff=2328"/>
		<updated>2011-10-31T08:00:23Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: moved User talk:Jbeezley to Jbeezley/hurricane&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Jbeezley/hurricane]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2327</id>
		<title>Jbeezley/hurricane</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2327"/>
		<updated>2011-10-31T08:00:23Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: moved User talk:Jbeezley to Jbeezley/hurricane&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
File:Hurricane SLP 001.png&lt;br /&gt;
File:Hurricane T 001.png&lt;br /&gt;
File:Hurricane QVAPOR 001.png&lt;br /&gt;
File:Hurricane wind 001.png&lt;br /&gt;
File:Hurricane SLP 002.png&lt;br /&gt;
File:Hurricane T 002.png&lt;br /&gt;
File:Hurricane QVAPOR 002.png&lt;br /&gt;
File:Hurricane wind 002.png&lt;br /&gt;
File:Hurricane SLP 003.png&lt;br /&gt;
File:Hurricane T 003.png&lt;br /&gt;
File:Hurricane QVAPOR 003.png&lt;br /&gt;
File:Hurricane wind 003.png&lt;br /&gt;
File:Hurricane SLP 004.png&lt;br /&gt;
File:Hurricane T 004.png&lt;br /&gt;
File:Hurricane QVAPOR 004.png&lt;br /&gt;
File:Hurricane wind 004.png&lt;br /&gt;
File:Hurricane SLP 005.png&lt;br /&gt;
File:Hurricane T 005.png&lt;br /&gt;
File:Hurricane QVAPOR 005.png&lt;br /&gt;
File:Hurricane wind 005.png&lt;br /&gt;
File:Hurricane SLP 006.png&lt;br /&gt;
File:Hurricane T 006.png&lt;br /&gt;
File:Hurricane QVAPOR 006.png&lt;br /&gt;
File:Hurricane wind 006.png&lt;br /&gt;
File:Hurricane SLP 007.png&lt;br /&gt;
File:Hurricane T 007.png&lt;br /&gt;
File:Hurricane QVAPOR 007.png&lt;br /&gt;
File:Hurricane wind 007.png&lt;br /&gt;
File:Hurricane SLP 008.png&lt;br /&gt;
File:Hurricane T 008.png&lt;br /&gt;
File:Hurricane QVAPOR 008.png&lt;br /&gt;
File:Hurricane wind 008.png&lt;br /&gt;
File:Hurricane SLP 009.png&lt;br /&gt;
File:Hurricane T 009.png&lt;br /&gt;
File:Hurricane QVAPOR 009.png&lt;br /&gt;
File:Hurricane wind 009.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2284</id>
		<title>Visualization in Google Earth</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2284"/>
		<updated>2011-10-08T02:02:38Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: updating dependencies&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
[http://www.google.com/earth/index.html Google Earth] is proprietary software from Google allowing the user to explore 3D imagery of the earth&#039;s surface.  Using its native support for [http://code.google.com/apis/kml/documentation/ kml files], it is possible to overlay images from numerical simulations onto the surface of the earth.  However, Google Earth is not designed to be a visualization suite for numerical models.  It can&#039;t, for example, create a pseudo color image from raw data.  One must generate a bitmap image (jpg or png) of the data first before it can be used in Google Earth.  Once that is done, it is a simple matter of creating a kml file which tells google where to display the image on the ground.  &lt;br /&gt;
&lt;br /&gt;
The code described on this page is maintained in a repository at &lt;br /&gt;
[https://github.com/jbeezley/WRF-GoogleEarth].  Contained within it is a simple script &lt;br /&gt;
for generating KMZ files for visualizing the heat flux from a fire simulation for users&lt;br /&gt;
that do not wish to customize the output.  The&lt;br /&gt;
script requires python modules, [http://matplotlib.sourceforge.net/ matplotlib], [http://www.scipy.org/ scipy], and &lt;br /&gt;
[http://code.google.com/p/netcdf4-python/ netCDF4].  The script takes a single &lt;br /&gt;
argument, the WRF output file, &lt;br /&gt;
&amp;lt;code&amp;gt;python nc2kmz.py &amp;lt;wrfout file&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Generating an image from raw data=&lt;br /&gt;
When one generates a pseudocolor image from raw data, for example in Matlab using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command, the image will usually contain a border with titles and axis labels.  In order to align the image properly in Google Earth, we want just the image itself without any borders whatsoever.  The easiest way to do this would be to open the image in Gimp and crop it manually; however, this is not suitable for generating a large number of visualizations or for an automated system.  &lt;br /&gt;
&lt;br /&gt;
==Using python and matplotlib==&lt;br /&gt;
The  [http://www.python.org/ python] programming language contains a large number of packages useful for scientific computing and visualization.  In particular, [http://matplotlib.sourceforge.net/ matplotlib] combines the numerical processing capabilities of [http://numpy.scipy.org/ numpy] with a full-featured 2D plotting package, which is very similar to Matlab&#039;s 2D plotting capabilities.  In this example, we will use the function [http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow imshow] to generate a psuedo color image from some data in an [[EpiSim]] output file.  In order to run this example yourself, you must have python with the [http://matplotlib.sourceforge.net/ matplotlib] and [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] (for reading the output [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files) packages installed.&lt;br /&gt;
&lt;br /&gt;
When we run EpiSim, we are left with a series of [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files as output.  These files contain the raw data from the model for a single time step.  We want to create an image of the &amp;lt;code&amp;gt;Infected&amp;lt;/code&amp;gt; variable from file &amp;lt;code&amp;gt;episim_0100.nc&amp;lt;/code&amp;gt; to overlay onto Google Earth.  We start by reading the file using the [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
infected=file.variables[&#039;Infected&#039;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we load the [http://matplotlib.sourceforge.net/ matplotlib] package, and create a new figure window.  Ordinarily, doing this is unnecessary.  Because we want the image to contain no borders, we must initialize the figure window to contain only the figure axis.  Note that the figure must be created with the correct aspect ratio, or the image will contain borders.  We will use a constant width of 5 inches and find the correct height by multiplying the aspect ratio of the input data (the number of rows divided by the number of columns of the variable).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pylab&lt;br /&gt;
&lt;br /&gt;
width=5&lt;br /&gt;
height=width*float(infected.shape[0])/float(infected.shape[1])&lt;br /&gt;
&lt;br /&gt;
fig=pylab.figure(figsize=(width,height))&lt;br /&gt;
fig.add_axes([0,0,1,1])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should have created an empty figure window.  We are now able to generate image using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command.  Note that &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; draws the figure from top to bottom (like an image) so we must flip the data vertically (using &amp;lt;code&amp;gt;flipud&amp;lt;/code&amp;gt;) prior to displaying.  Also, we want to visualize the data on a log color scale, so we will take the logarithm of the data (&amp;lt;code&amp;gt;log 0&amp;lt;/code&amp;gt; will show up as white in the figure).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data=pylab.flipud(infected)&lt;br /&gt;
data=pylab.log(data)&lt;br /&gt;
&lt;br /&gt;
pylab.imshow(data)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we will turn off the axis to remove any remnants of tick marks from the display axis, and save the file to a png image named &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pylab.axis(&#039;off&#039;)&lt;br /&gt;
pylab.savefig(&#039;Infected.png&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have an image that is ready to use as an overlay in Google Earth.&lt;br /&gt;
&lt;br /&gt;
=Creating a kml file=&lt;br /&gt;
External images can be included into Google Earth in a number of different ways.  What we are interested in is displaying our image over the ground.  This is what is known as a [http://code.google.com/apis/kml/documentation/kmlreference.html#groundoverlay GroundOverlay].  A minimal kml file which will do this with the &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt; image we generated above is as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;GroundOverlay&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Infected&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;Icon&amp;gt;&lt;br /&gt;
    &amp;lt;href&amp;gt;Infected.png&amp;lt;/href&amp;gt;&lt;br /&gt;
  &amp;lt;/Icon&amp;gt;&lt;br /&gt;
  &amp;lt;altitude&amp;gt;0.0&amp;lt;/altitude&amp;gt;&lt;br /&gt;
  &amp;lt;altitudeMode&amp;gt;clampToGround&amp;lt;/altitudeMode&amp;gt;&lt;br /&gt;
  &amp;lt;LatLonBox&amp;gt;&lt;br /&gt;
    &amp;lt;north&amp;gt;14.958334&amp;lt;/north&amp;gt;&lt;br /&gt;
    &amp;lt;south&amp;gt;-10.000000&amp;lt;/south&amp;gt;&lt;br /&gt;
    &amp;lt;east&amp;gt;40.958336&amp;lt;/east&amp;gt;&lt;br /&gt;
    &amp;lt;west&amp;gt;16.000000&amp;lt;/west&amp;gt;&lt;br /&gt;
    &amp;lt;rotation&amp;gt;0.0&amp;lt;/rotation&amp;gt;&lt;br /&gt;
  &amp;lt;/LatLonBox&amp;gt;&lt;br /&gt;
&amp;lt;/GroundOverlay&amp;gt;&lt;br /&gt;
&amp;lt;/kml&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary components of this file are the name of image as it is displayed in the Google Earth menu, the &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; key which tells where to find the image, the &amp;lt;code&amp;gt;altitudeMode&amp;lt;/code&amp;gt; key tells it to stretch the image of the ground.  Finally, the &amp;lt;code&amp;gt;LatLonBox&amp;lt;/code&amp;gt; tells Google Earth where to put the image.  The image is assumed to be defined on a regular latitude/longitude grid (not projected).  The keys give the lines of latitude and longitude where the edges of the image should be placed.  For the EpiSim output files, this can be found by looking beginning and end of the variables &amp;lt;code&amp;gt;latitude&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;longitude&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In [1]: from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
In [2]: file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
&lt;br /&gt;
In [3]: lat=file.variables[&#039;latitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [4]: lon=file.variables[&#039;longitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [5]: lat[-1],lat[0],lon[-1],lon[0]&lt;br /&gt;
Out[5]: (14.958334, -10.0, 40.958336, 16.0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many more features for displaying overlays are available in the kml standard.  See the [http://code.google.com/apis/kml/documentation/kmlreference.html documentation] for further details.&lt;br /&gt;
&lt;br /&gt;
=Creating preloaded WRF-Fire animations=&lt;br /&gt;
&#039;&#039;&#039;This is only for users who have older versions of Google Earth. If you have Google Earth 6, loading multiple images from KMZ files is no longer an issue.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have older versions of Google Earth, either download and update to [http://www.google.com/earth/download/ge/ Google Earth 6] or use [https://github.com/zhlin/WRF-GoogleEarth/blob/movScript/nc2kmz_GE5.py this script] for preloading multiple images, and use as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python nc2kmz_GE5.py &amp;lt;wrfout_filename&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preloading functionality is an extension of the ncEarth module that accomplishes preloading the set of images that is in KMZ files by adding a static copy of the [http://code.google.com/apis/kml/documentation/time.html#example2 animated GroundOverlays]. The static copy of GroundOverlays is without the [http://code.google.com/apis/kml/documentation/kmlreference.html#timespan TimeSpan] element. When opening preloaded animation KMZ files, Google Earth automatically loads all the static GroundOverlays which caches the images that are needed in the animation, and when it finishes loading the static GroundOverlays, the timeline slider will appear on the left top corner of the screen for playing the animation.  Loading time depends on the number of GroundOverlays in the animation, and if the animation is very large in size, Google Earth may appear frozen while loading. Unfortunately, Google Earth does not provide a way to display a message to the users while loading.&lt;br /&gt;
&lt;br /&gt;
=Creating WRF-Fire animation legend =&lt;br /&gt;
For conveying information, we will need a legend for the animation. First of all, get the script [https://github.com/zhlin/WRF-GoogleEarth/blob/master/colorbarImg.py here] to generate the image for the legend. Use it as the following example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import colorbarImg&lt;br /&gt;
colorbarImg.getImages(&#039;wrfout.nc&#039;,&#039;FGRNHFX&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Passing the name of a dataset and the variable name, and the resulting images will be stored in a subfolder called “colorbarImages”. &lt;br /&gt;
After selecting a colorbar image, we can use [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay ScreenOverlay] to display the legend in a fixed position on the screen.  &lt;br /&gt;
Here are some examples of ScreenOverlay.&lt;br /&gt;
&lt;br /&gt;
Refers to an image at given URL: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;http://server.com/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refers to an image in the KMZ file folder: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;files/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;-1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;Icon&amp;gt;&amp;lt;/code&amp;gt; element points to the image to be used. This image file can be located on a file system or on a web server.  To position the overlay, change the x and y values of the &amp;lt;code&amp;gt;&amp;lt;overlayXY&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;screenXY&amp;gt;&amp;lt;/code&amp;gt; elements, &amp;lt;code&amp;gt;overlayXY&amp;lt;/code&amp;gt; maps a point in the image to a point on the screen specified by &amp;lt;code&amp;gt;screenXY&amp;lt;/code&amp;gt;, the unit for x and y values can be one of three units: pixels, fraction, and insetPixels. Also the values can be specified in different ways, for example x can be in fraction and y can be in pixels. The &amp;lt;code&amp;gt;&amp;lt;size&amp;gt;&amp;lt;/code&amp;gt; element determines the size of the ScreenOverlay, vaule of -1 indicates to use the images’ original dimension.&lt;br /&gt;
For more detailed explanation of ScreenOverlay’ elements, see [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay  KML reference document]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
https://github.com/jbeezley/WRF-GoogleEarth&lt;br /&gt;
[[Category:Visualization]]&lt;br /&gt;
[[Category:WRF-Fire]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2211</id>
		<title>Visualization in Google Earth</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2211"/>
		<updated>2011-08-08T10:18:35Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
[http://www.google.com/earth/index.html Google Earth] is proprietary software from Google allowing the user to explore 3D imagery of the earth&#039;s surface.  Using its native support for [http://code.google.com/apis/kml/documentation/ kml files], it is possible to overlay images from numerical simulations onto the surface of the earth.  However, Google Earth is not designed to be a visualization suite for numerical models.  It can&#039;t, for example, create a pseudo color image from raw data.  One must generate a bitmap image (jpg or png) of the data first before it can be used in Google Earth.  Once that is done, it is a simple matter of creating a kml file which tells google where to display the image on the ground.  &lt;br /&gt;
&lt;br /&gt;
The code described on this page is maintained in a repository at &lt;br /&gt;
[https://github.com/jbeezley/WRF-GoogleEarth].  Contained within it is a simple script &lt;br /&gt;
for generating KMZ files for visualizing the heat flux from a fire simulation for users&lt;br /&gt;
that do not wish to customize the output.  The&lt;br /&gt;
script requires python modules, [http://matplotlib.sourceforge.net/ matplotlib] and &lt;br /&gt;
either [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] or&lt;br /&gt;
[http://code.google.com/p/netcdf4-python/ netCDF4].  The script takes a single &lt;br /&gt;
argument, the WRF output file, &lt;br /&gt;
&amp;lt;code&amp;gt;python nc2kmz.py &amp;lt;wrfout file&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Generating an image from raw data=&lt;br /&gt;
When one generates a pseudocolor image from raw data, for example in Matlab using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command, the image will usually contain a border with titles and axis labels.  In order to align the image properly in Google Earth, we want just the image itself without any borders whatsoever.  The easiest way to do this would be to open the image in Gimp and crop it manually; however, this is not suitable for generating a large number of visualizations or for an automated system.  &lt;br /&gt;
&lt;br /&gt;
==Using python and matplotlib==&lt;br /&gt;
The  [http://www.python.org/ python] programming language contains a large number of packages useful for scientific computing and visualization.  In particular, [http://matplotlib.sourceforge.net/ matplotlib] combines the numerical processing capabilities of [http://numpy.scipy.org/ numpy] with a full-featured 2D plotting package, which is very similar to Matlab&#039;s 2D plotting capabilities.  In this example, we will use the function [http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow imshow] to generate a psuedo color image from some data in an [[EpiSim]] output file.  In order to run this example yourself, you must have python with the [http://matplotlib.sourceforge.net/ matplotlib] and [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] (for reading the output [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files) packages installed.&lt;br /&gt;
&lt;br /&gt;
When we run EpiSim, we are left with a series of [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files as output.  These files contain the raw data from the model for a single time step.  We want to create an image of the &amp;lt;code&amp;gt;Infected&amp;lt;/code&amp;gt; variable from file &amp;lt;code&amp;gt;episim_0100.nc&amp;lt;/code&amp;gt; to overlay onto Google Earth.  We start by reading the file using the [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
infected=file.variables[&#039;Infected&#039;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we load the [http://matplotlib.sourceforge.net/ matplotlib] package, and create a new figure window.  Ordinarily, doing this is unnecessary.  Because we want the image to contain no borders, we must initialize the figure window to contain only the figure axis.  Note that the figure must be created with the correct aspect ratio, or the image will contain borders.  We will use a constant width of 5 inches and find the correct height by multiplying the aspect ratio of the input data (the number of rows divided by the number of columns of the variable).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pylab&lt;br /&gt;
&lt;br /&gt;
width=5&lt;br /&gt;
height=width*float(infected.shape[0])/float(infected.shape[1])&lt;br /&gt;
&lt;br /&gt;
fig=pylab.figure(figsize=(width,height))&lt;br /&gt;
fig.add_axes([0,0,1,1])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should have created an empty figure window.  We are now able to generate image using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command.  Note that &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; draws the figure from top to bottom (like an image) so we must flip the data vertically (using &amp;lt;code&amp;gt;flipud&amp;lt;/code&amp;gt;) prior to displaying.  Also, we want to visualize the data on a log color scale, so we will take the logarithm of the data (&amp;lt;code&amp;gt;log 0&amp;lt;/code&amp;gt; will show up as white in the figure).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data=pylab.flipud(infected)&lt;br /&gt;
data=pylab.log(data)&lt;br /&gt;
&lt;br /&gt;
pylab.imshow(data)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we will turn off the axis to remove any remnants of tick marks from the display axis, and save the file to a png image named &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pylab.axis(&#039;off&#039;)&lt;br /&gt;
pylab.savefig(&#039;Infected.png&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have an image that is ready to use as an overlay in Google Earth.&lt;br /&gt;
&lt;br /&gt;
=Creating a kml file=&lt;br /&gt;
External images can be included into Google Earth in a number of different ways.  What we are interested in is displaying our image over the ground.  This is what is known as a [http://code.google.com/apis/kml/documentation/kmlreference.html#groundoverlay GroundOverlay].  A minimal kml file which will do this with the &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt; image we generated above is as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;GroundOverlay&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Infected&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;Icon&amp;gt;&lt;br /&gt;
    &amp;lt;href&amp;gt;Infected.png&amp;lt;/href&amp;gt;&lt;br /&gt;
  &amp;lt;/Icon&amp;gt;&lt;br /&gt;
  &amp;lt;altitude&amp;gt;0.0&amp;lt;/altitude&amp;gt;&lt;br /&gt;
  &amp;lt;altitudeMode&amp;gt;clampToGround&amp;lt;/altitudeMode&amp;gt;&lt;br /&gt;
  &amp;lt;LatLonBox&amp;gt;&lt;br /&gt;
    &amp;lt;north&amp;gt;14.958334&amp;lt;/north&amp;gt;&lt;br /&gt;
    &amp;lt;south&amp;gt;-10.000000&amp;lt;/south&amp;gt;&lt;br /&gt;
    &amp;lt;east&amp;gt;40.958336&amp;lt;/east&amp;gt;&lt;br /&gt;
    &amp;lt;west&amp;gt;16.000000&amp;lt;/west&amp;gt;&lt;br /&gt;
    &amp;lt;rotation&amp;gt;0.0&amp;lt;/rotation&amp;gt;&lt;br /&gt;
  &amp;lt;/LatLonBox&amp;gt;&lt;br /&gt;
&amp;lt;/GroundOverlay&amp;gt;&lt;br /&gt;
&amp;lt;/kml&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary components of this file are the name of image as it is displayed in the Google Earth menu, the &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; key which tells where to find the image, the &amp;lt;code&amp;gt;altitudeMode&amp;lt;/code&amp;gt; key tells it to stretch the image of the ground.  Finally, the &amp;lt;code&amp;gt;LatLonBox&amp;lt;/code&amp;gt; tells Google Earth where to put the image.  The image is assumed to be defined on a regular latitude/longitude grid (not projected).  The keys give the lines of latitude and longitude where the edges of the image should be placed.  For the EpiSim output files, this can be found by looking beginning and end of the variables &amp;lt;code&amp;gt;latitude&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;longitude&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In [1]: from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
In [2]: file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
&lt;br /&gt;
In [3]: lat=file.variables[&#039;latitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [4]: lon=file.variables[&#039;longitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [5]: lat[-1],lat[0],lon[-1],lon[0]&lt;br /&gt;
Out[5]: (14.958334, -10.0, 40.958336, 16.0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many more features for displaying overlays are available in the kml standard.  See the [http://code.google.com/apis/kml/documentation/kmlreference.html documentation] for further details.&lt;br /&gt;
&lt;br /&gt;
=Creating preloaded WRF-Fire animations=&lt;br /&gt;
&#039;&#039;&#039;This is only for users who have older versions of Google Earth. If you have Google Earth 6, loading multiple images from KMZ files is no longer an issue.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have older versions of Google Earth, either download and update to [http://www.google.com/earth/download/ge/ Google Earth 6] or use [https://github.com/zhlin/WRF-GoogleEarth/blob/movScript/nc2kmz_GE5.py this script] for preloading multiple images, and use as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python nc2kmz_GE5.py &amp;lt;wrfout_filename&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preloading functionality is an extension of the ncEarth module that accomplishes preloading the set of images that is in KMZ files by adding a static copy of the [http://code.google.com/apis/kml/documentation/time.html#example2 animated GroundOverlays]. The static copy of GroundOverlays is without the [http://code.google.com/apis/kml/documentation/kmlreference.html#timespan TimeSpan] element. When opening preloaded animation KMZ files, Google Earth automatically loads all the static GroundOverlays which caches the images that are needed in the animation, and when it finishes loading the static GroundOverlays, the timeline slider will appear on the left top corner of the screen for playing the animation.  Loading time depends on the number of GroundOverlays in the animation, and if the animation is very large in size, Google Earth may appear frozen while loading. Unfortunately, Google Earth does not provide a way to display a message to the users while loading.&lt;br /&gt;
&lt;br /&gt;
=Creating WRF-Fire animation legend =&lt;br /&gt;
For conveying information, we will need a legend for the animation. First of all, get the script [https://github.com/zhlin/WRF-GoogleEarth/blob/master/colorbarImg.py here] to generate the image for the legend. Use it as the following example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import colorbarImg&lt;br /&gt;
colorbarImg.getImages(&#039;wrfout.nc&#039;,&#039;FGRNHFX&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Passing the name of a dataset and the variable name, and the resulting images will be stored in a subfolder called “colorbarImages”. &lt;br /&gt;
After selecting a colorbar image, we can use [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay ScreenOverlay] to display the legend in a fixed position on the screen.  &lt;br /&gt;
Here are some examples of ScreenOverlay.&lt;br /&gt;
&lt;br /&gt;
Refers to an image at given URL: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;http://server.com/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refers to an image in the KMZ file folder: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;files/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;-1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;Icon&amp;gt;&amp;lt;/code&amp;gt; element points to the image to be used. This image file can be located on a file system or on a web server.  To position the overlay, change the x and y values of the &amp;lt;code&amp;gt;&amp;lt;overlayXY&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;screenXY&amp;gt;&amp;lt;/code&amp;gt; elements, &amp;lt;code&amp;gt;overlayXY&amp;lt;/code&amp;gt; maps a point in the image to a point on the screen specified by &amp;lt;code&amp;gt;screenXY&amp;lt;/code&amp;gt;, the unit for x and y values can be one of three units: pixels, fraction, and insetPixels. Also the values can be specified in different ways, for example x can be in fraction and y can be in pixels. The &amp;lt;code&amp;gt;&amp;lt;size&amp;gt;&amp;lt;/code&amp;gt; element determines the size of the ScreenOverlay, vaule of -1 indicates to use the images’ original dimension.&lt;br /&gt;
For more detailed explanation of ScreenOverlay’ elements, see [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay  KML reference document]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
https://github.com/jbeezley/WRF-GoogleEarth&lt;br /&gt;
[[Category:Visualization]]&lt;br /&gt;
[[Category:WRF-Fire]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2208</id>
		<title>Visualization in Google Earth</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Visualization_in_Google_Earth&amp;diff=2208"/>
		<updated>2011-08-08T04:36:01Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Python Class for creating WRF-Fire animations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{users guide}}&lt;br /&gt;
[http://www.google.com/earth/index.html Google Earth] is proprietary software from Google allowing the user to explore 3D imagery of the earth&#039;s surface.  Using its native support for [http://code.google.com/apis/kml/documentation/ kml files], it is possible to overlay images from numerical simulations onto the surface of the earth.  However, Google Earth is not designed to be a visualization suite for numerical models.  It can&#039;t, for example, create a pseudo color image from raw data.  One must generate a bitmap image (jpg or png) of the data first before it can be used in Google Earth.  Once that is done, it is a simple matter of creating a kml file which tells google where to display the image on the ground.&lt;br /&gt;
&lt;br /&gt;
=Generating an image from raw data=&lt;br /&gt;
When one generates a pseudocolor image from raw data, for example in Matlab using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command, the image will usually contain a border with titles and axis labels.  In order to align the image properly in Google Earth, we want just the image itself without any borders whatsoever.  The easiest way to do this would be to open the image in Gimp and crop it manually; however, this is not suitable for generating a large number of visualizations or for an automated system.  &lt;br /&gt;
&lt;br /&gt;
==Using python and matplotlib==&lt;br /&gt;
The  [http://www.python.org/ python] programming language contains a large number of packages useful for scientific computing and visualization.  In particular, [http://matplotlib.sourceforge.net/ matplotlib] combines the numerical processing capabilities of [http://numpy.scipy.org/ numpy] with a full-featured 2D plotting package, which is very similar to Matlab&#039;s 2D plotting capabilities.  In this example, we will use the function [http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow imshow] to generate a psuedo color image from some data in an [[EpiSim]] output file.  In order to run this example yourself, you must have python with the [http://matplotlib.sourceforge.net/ matplotlib] and [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] (for reading the output [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files) packages installed.&lt;br /&gt;
&lt;br /&gt;
When we run EpiSim, we are left with a series of [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] files as output.  These files contain the raw data from the model for a single time step.  We want to create an image of the &amp;lt;code&amp;gt;Infected&amp;lt;/code&amp;gt; variable from file &amp;lt;code&amp;gt;episim_0100.nc&amp;lt;/code&amp;gt; to overlay onto Google Earth.  We start by reading the file using the [http://sourcesup.cru.fr/projects/scientific-py/ Scientific Python] package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
infected=file.variables[&#039;Infected&#039;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we load the [http://matplotlib.sourceforge.net/ matplotlib] package, and create a new figure window.  Ordinarily, doing this is unnecessary.  Because we want the image to contain no borders, we must initialize the figure window to contain only the figure axis.  Note that the figure must be created with the correct aspect ratio, or the image will contain borders.  We will use a constant width of 5 inches and find the correct height by multiplying the aspect ratio of the input data (the number of rows divided by the number of columns of the variable).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import pylab&lt;br /&gt;
&lt;br /&gt;
width=5&lt;br /&gt;
height=width*float(infected.shape[0])/float(infected.shape[1])&lt;br /&gt;
&lt;br /&gt;
fig=pylab.figure(figsize=(width,height))&lt;br /&gt;
fig.add_axes([0,0,1,1])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should have created an empty figure window.  We are now able to generate image using the &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; command.  Note that &amp;lt;code&amp;gt;imshow&amp;lt;/code&amp;gt; draws the figure from top to bottom (like an image) so we must flip the data vertically (using &amp;lt;code&amp;gt;flipud&amp;lt;/code&amp;gt;) prior to displaying.  Also, we want to visualize the data on a log color scale, so we will take the logarithm of the data (&amp;lt;code&amp;gt;log 0&amp;lt;/code&amp;gt; will show up as white in the figure).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
data=pylab.flipud(infected)&lt;br /&gt;
data=pylab.log(data)&lt;br /&gt;
&lt;br /&gt;
pylab.imshow(data)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we will turn off the axis to remove any remnants of tick marks from the display axis, and save the file to a png image named &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pylab.axis(&#039;off&#039;)&lt;br /&gt;
pylab.savefig(&#039;Infected.png&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have an image that is ready to use as an overlay in Google Earth.&lt;br /&gt;
&lt;br /&gt;
=Creating a kml file=&lt;br /&gt;
External images can be included into Google Earth in a number of different ways.  What we are interested in is displaying our image over the ground.  This is what is known as a [http://code.google.com/apis/kml/documentation/kmlreference.html#groundoverlay GroundOverlay].  A minimal kml file which will do this with the &amp;lt;code&amp;gt;Infected.png&amp;lt;/code&amp;gt; image we generated above is as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;GroundOverlay&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Infected&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;Icon&amp;gt;&lt;br /&gt;
    &amp;lt;href&amp;gt;Infected.png&amp;lt;/href&amp;gt;&lt;br /&gt;
  &amp;lt;/Icon&amp;gt;&lt;br /&gt;
  &amp;lt;altitude&amp;gt;0.0&amp;lt;/altitude&amp;gt;&lt;br /&gt;
  &amp;lt;altitudeMode&amp;gt;clampToGround&amp;lt;/altitudeMode&amp;gt;&lt;br /&gt;
  &amp;lt;LatLonBox&amp;gt;&lt;br /&gt;
    &amp;lt;north&amp;gt;14.958334&amp;lt;/north&amp;gt;&lt;br /&gt;
    &amp;lt;south&amp;gt;-10.000000&amp;lt;/south&amp;gt;&lt;br /&gt;
    &amp;lt;east&amp;gt;40.958336&amp;lt;/east&amp;gt;&lt;br /&gt;
    &amp;lt;west&amp;gt;16.000000&amp;lt;/west&amp;gt;&lt;br /&gt;
    &amp;lt;rotation&amp;gt;0.0&amp;lt;/rotation&amp;gt;&lt;br /&gt;
  &amp;lt;/LatLonBox&amp;gt;&lt;br /&gt;
&amp;lt;/GroundOverlay&amp;gt;&lt;br /&gt;
&amp;lt;/kml&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary components of this file are the name of image as it is displayed in the Google Earth menu, the &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt; key which tells where to find the image, the &amp;lt;code&amp;gt;altitudeMode&amp;lt;/code&amp;gt; key tells it to stretch the image of the ground.  Finally, the &amp;lt;code&amp;gt;LatLonBox&amp;lt;/code&amp;gt; tells Google Earth where to put the image.  The image is assumed to be defined on a regular latitude/longitude grid (not projected).  The keys give the lines of latitude and longitude where the edges of the image should be placed.  For the EpiSim output files, this can be found by looking beginning and end of the variables &amp;lt;code&amp;gt;latitude&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;longitude&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
In [1]: from Scientific.IO import NetCDF&lt;br /&gt;
&lt;br /&gt;
In [2]: file=NetCDF.NetCDFFile(&#039;episim_0100.nc&#039;,&#039;r&#039;)&lt;br /&gt;
&lt;br /&gt;
In [3]: lat=file.variables[&#039;latitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [4]: lon=file.variables[&#039;longitude&#039;]&lt;br /&gt;
&lt;br /&gt;
In [5]: lat[-1],lat[0],lon[-1],lon[0]&lt;br /&gt;
Out[5]: (14.958334, -10.0, 40.958336, 16.0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many more features for displaying overlays are available in the kml standard.  See the [http://code.google.com/apis/kml/documentation/kmlreference.html documentation] for further details.&lt;br /&gt;
&lt;br /&gt;
=Creating preloaded WRF-Fire animations=&lt;br /&gt;
&#039;&#039;&#039;This is only for users who have older versions of Google Earth. If you have Google Earth 6, loading multiple images from KMZ files is no longer an issue.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have older versions of Google Earth, either download and update to [http://www.google.com/earth/download/ge/ Google Earth 6] or use [https://github.com/zhlin/WRF-GoogleEarth/blob/movScript/nc2kmz_GE5.py this script] for preloading multiple images, and use as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python nc2kmz_GE5.py &amp;lt;wrfout_filename&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preloading functionality is an extension of the ncEarth module that accomplishes preloading the set of images that is in KMZ files by adding a static copy of the [http://code.google.com/apis/kml/documentation/time.html#example2 animated GroundOverlays]. The static copy of GroundOverlays is without the [http://code.google.com/apis/kml/documentation/kmlreference.html#timespan TimeSpan] element. When opening preloaded animation KMZ files, Google Earth automatically loads all the static GroundOverlays which caches the images that are needed in the animation, and when it finishes loading the static GroundOverlays, the timeline slider will appear on the left top corner of the screen for playing the animation.  Loading time depends on the number of GroundOverlays in the animation, and if the animation is very large in size, Google Earth may appear frozen while loading. Unfortunately, Google Earth does not provide a way to display a message to the users while loading.&lt;br /&gt;
&lt;br /&gt;
=Creating WRF-Fire animation legend =&lt;br /&gt;
For conveying information, we will need a legend for the animation. First of all, get the script [https://github.com/zhlin/WRF-GoogleEarth/blob/master/colorbarImg.py here] to generate the image for the legend. Use it as the following example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import colorbarImg&lt;br /&gt;
colorbarImg.getImages(&#039;wrfout.nc&#039;,&#039;FGRNHFX&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Passing the name of a dataset and the variable name, and the resulting images will be stored in a subfolder called “colorbarImages”. &lt;br /&gt;
After selecting a colorbar image, we can use [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay ScreenOverlay] to display the legend in a fixed position on the screen.  &lt;br /&gt;
Here are some examples of ScreenOverlay.&lt;br /&gt;
&lt;br /&gt;
Refers to an image at given URL: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;http://server.com/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refers to an image in the KMZ file folder: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;kml xmlns=&amp;quot;http://www.opengis.net/kml/2.2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScreenOverlay&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Legend name&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;color&amp;gt;ffffffff&amp;lt;/color&amp;gt;&lt;br /&gt;
   &amp;lt;Icon&amp;gt;&lt;br /&gt;
      &amp;lt;href&amp;gt;files/legend.png&amp;lt;/href&amp;gt;&lt;br /&gt;
   &amp;lt;/Icon&amp;gt;&lt;br /&gt;
   &amp;lt;overlayXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;screenXY x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;rotationXY x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;size x=&amp;quot;-1&amp;quot; y=&amp;quot;-1&amp;quot; xunits=&amp;quot;fraction&amp;quot; yunits=&amp;quot;fraction&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/ScreenOverlay&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;Icon&amp;gt;&amp;lt;/code&amp;gt; element points to the image to be used. This image file can be located on a file system or on a web server.  To position the overlay, change the x and y values of the &amp;lt;code&amp;gt;&amp;lt;overlayXY&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;screenXY&amp;gt;&amp;lt;/code&amp;gt; elements, &amp;lt;code&amp;gt;overlayXY&amp;lt;/code&amp;gt; maps a point in the image to a point on the screen specified by &amp;lt;code&amp;gt;screenXY&amp;lt;/code&amp;gt;, the unit for x and y values can be one of three units: pixels, fraction, and insetPixels. Also the values can be specified in different ways, for example x can be in fraction and y can be in pixels. The &amp;lt;code&amp;gt;&amp;lt;size&amp;gt;&amp;lt;/code&amp;gt; element determines the size of the ScreenOverlay, vaule of -1 indicates to use the images’ original dimension.&lt;br /&gt;
For more detailed explanation of ScreenOverlay’ elements, see [http://code.google.com/apis/kml/documentation/kmlreference.html#screenoverlay  KML reference document]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
https://github.com/jbeezley/WRF-GoogleEarth&lt;br /&gt;
[[Category:Visualization]]&lt;br /&gt;
[[Category:WRF-Fire]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=How_to_interpret_WRF_variables&amp;diff=2014</id>
		<title>How to interpret WRF variables</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=How_to_interpret_WRF_variables&amp;diff=2014"/>
		<updated>2011-05-11T16:38:10Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: /* Fire */ extra information about fire grid variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Grid==&lt;br /&gt;
&lt;br /&gt;
[[File:Wrfgrid.png|250px]][[File:WRF_staggered_grid.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
Grids in WRF are logically rectilinear. Variables for WRF cell indexed &#039;&#039;&#039;(i,j,k)&#039;&#039;&#039; can be located at one of 4 possible points. You can tell where by looking at the WRF registry or the attributes of [[NetCDF]] files, which WRF uses as I/O format. You can also tell by the fact that staggered variables have the staggered dimension larger by one, since there needs to be variable at the last boundary face.&lt;br /&gt;
* at the center of the cell - theta points, not staggered&lt;br /&gt;
* at the center of the left face - U point, staggered in X&lt;br /&gt;
* at the center of the front face - V point, staggered in Y&lt;br /&gt;
* at the center of the bottom face - W point, staggered in Z&lt;br /&gt;
Scalar variables (such as thermodynamical variables, hence the theta: temperature, pressure,...) generally live at theta-points. One exception is the geopotential, which lives at W-points. &lt;br /&gt;
The documentation, some variable names, and comments in the WRF code also associate theta with the vertical position of the mid-plane of the cell and at W with the vertical position of the bottom of the cell.&lt;br /&gt;
&lt;br /&gt;
The orientation of the axes in the real world, such as &amp;quot;east-west&amp;quot;,  in the order of increasing index, such as &#039;&#039;&#039;i&#039;&#039;&#039;, are defined in the registry. For postprocessing, they can be found at runtime as attributes in the NetCDF files.&lt;br /&gt;
&lt;br /&gt;
==Arrays==&lt;br /&gt;
&lt;br /&gt;
Arrays are stored in files and in memory. All arrays are described in the Registry, which is a collection of text files in &#039;&#039;&#039;WRFV3/Registry&#039;&#039;&#039;. The variable names in memory and in files are sometimes different.&lt;br /&gt;
&lt;br /&gt;
Files are (by default) in [[NetCDF]] format. The values associated with the cell &#039;&#039;&#039;(i,j,k)&#039;&#039;&#039; at time step &#039;&#039;&#039;n&#039;&#039;&#039; are stored in the files as the array entry &#039;&#039;&#039;u(i,j,k,n)&#039;&#039;&#039;, e.t.c. The value of the time at the step &#039;&#039;&#039;n&#039;&#039;&#039; is stored in character array &#039;&#039;&#039;Times(:,n)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
While arrays in files are indexed as &#039;&#039;&#039;(i,j,k,n)&#039;&#039;&#039;, arrays in memory are indexed as &#039;&#039;&#039;(i,k,j)&#039;&#039;&#039; by [http://www.mmm.ucar.edu/wrf/WG2/WRF_conventions.html WRF coding conventions]. Of course, there is no 4th index for the time step in arrays in memory, and in some arrays there is no vertical &#039;&#039;&#039;k&#039;&#039;&#039; dimension.&lt;br /&gt;
&lt;br /&gt;
==Wind==&lt;br /&gt;
&lt;br /&gt;
Components of the wind velocity vector &#039;&#039;&#039;U&#039;&#039;&#039;, &#039;&#039;&#039;V&#039;&#039;&#039;, &#039;&#039;&#039;W&#039;&#039;&#039; live at the corresponding points, hence the point names. These are in the geometrically horizontal and vertical directions. On flat ground, &#039;&#039;&#039;W&#039;&#039;&#039; on the first level &#039;&#039;k=1&#039;&#039; is zero. However, when the ground has nonzero slope, the vertical velocity components &#039;&#039;&#039;W&#039;&#039;&#039; is generally not zero, because the normal vector to the ground is not vertical.&lt;br /&gt;
&lt;br /&gt;
Note that the picture above center and right (from [http://www.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf WRF documentation]) use half integer indexing. &lt;br /&gt;
* The horizontal wind component &#039;&#039;&#039;U&amp;lt;sub&amp;gt;i-1/2,j,k&amp;lt;/sub&amp;gt;&#039;&#039;&#039; in the X direction is stored in the array entry &#039;&#039;&#039;u(i,j,k)&#039;&#039;&#039;&lt;br /&gt;
* The horizontal wind component &#039;&#039;&#039;V&amp;lt;sub&amp;gt;i,j-1/2,k&amp;lt;/sub&amp;gt;&#039;&#039;&#039; in the Y is stored in the array entry &#039;&#039;&#039;v(i,j,k)&#039;&#039;&#039;&lt;br /&gt;
* The vertical wind component &#039;&#039;&#039;W&amp;lt;sub&amp;gt;i,j,k-1/2&amp;lt;/sub&amp;gt;&#039;&#039;&#039; is stored in the array entry &#039;&#039;&#039;w(i,j,k)&#039;&#039;&#039;&lt;br /&gt;
In particular, the lowest layer  in WRF is &#039;&#039;&#039;k=1&#039;&#039;&#039;, and, on flat ground, &#039;&#039;&#039;w(:,:,1)=0&#039;&#039;&#039;, since the ground is impermeable in the normal direction. On a ground with nonzero slope, &#039;&#039;&#039;w(:,:,1)=0&#039;&#039;&#039; is generally nonzero. The winds at the middle of the first layer, at the height &#039;&#039;&#039;eta&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&#039;&#039;&#039;, are &#039;&#039;&#039;u(:,:,1)&#039;&#039;&#039;, &#039;&#039;&#039;v(:,:,1)&#039;&#039;&#039;, and they are generally nonzero. &lt;br /&gt;
&lt;br /&gt;
Because the components of the wind velocity vector are on different staggered grids, and visualization software usually expects all three components of the velocity vector based at the same point, they need to be interpolated to theta-points (cell centers) for display:&lt;br /&gt;
: &#039;&#039;&#039;U_THETA(i,j,k) = 0.5*(U(i,j,k) + U(i+1,j,k))&#039;&#039;&#039;&lt;br /&gt;
: &#039;&#039;&#039;V_THETA(i,j,k) = 0.5*(V(i,j,k) + V(i,j+1,k))&#039;&#039;&#039;&lt;br /&gt;
: &#039;&#039;&#039;W_THETA(i,j,k) = 0.5*(W(i,j,k) + W(i,j,k+1))&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
&lt;br /&gt;
The longitude and latitude of the theta and U nodes are given by arrays &#039;&#039;&#039;XLONG&#039;&#039;&#039; and &#039;&#039;&#039;XLAT&#039;&#039;&#039;, which are set at initialization and then do not change. However the elevation has to be computed from the flow solution as [[wikipedia:Geopotential height|geopotential height]] by &lt;br /&gt;
: &#039;&#039;&#039;ELEVATION_W(i,j,k) = (PHB(i,j,k) + PH(i,j,k))/9.81&lt;br /&gt;
where &#039;&#039;&#039;PHB + PH&#039;&#039;&#039; is the [[wikipedia:geopotential|geopotential]]. &#039;&#039;&#039;PHB&#039;&#039;&#039; is constant, set at initialization, and &#039;&#039;&#039;PH&#039;&#039;&#039;, called perturbation geopotential, starts as zero and varies with time.&lt;br /&gt;
&lt;br /&gt;
PH and PHB live at the W-points, thus the geopotential height at the lowest level is the same as terrain height&lt;br /&gt;
: &#039;&#039;&#039;HGT(i,j) = PHB(i,j,1)/9.81&lt;br /&gt;
up to rounding error.&lt;br /&gt;
&lt;br /&gt;
To find the elevation of the cell theta-points (the cell midplane), you need to interpolate between the elevation of the top and the bottom:&lt;br /&gt;
:&#039;&#039;&#039;ELEVATION_THETA(i,j,k) =0.5*(PHB(i,j,k) + PH(i,j,k) + PHB(i,j,k+1) + PH(i,j,k+1))/9.81&lt;br /&gt;
&lt;br /&gt;
==Temperature==&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:Potential temperature|Potential temperature]] in K is 300+&#039;&#039;&#039;T&#039;&#039;&#039;. The potential temperature is most suitable for visualization. However, the temperature as measured by instruments is sometimes needed for comparison. The potential temperature is converted by...  &#039;&#039;coming soon&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Pressure==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;coming soon&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Fire==&lt;br /&gt;
&lt;br /&gt;
[[File:firemesh.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The fire mesh is 2D. Every atmosphere cell is divided into &#039;&#039;&#039;sr_x&#039;&#039;&#039; by &#039;&#039;&#039;sr_y&#039;&#039;&#039; fire cells. The submesh ratios &#039;&#039;&#039;sr_x&#039;&#039;&#039; and &#039;&#039;&#039;sr_y&#039;&#039;&#039; are specified in the file &#039;&#039;&#039;namelist.input&#039;&#039;&#039;. These values are not stored in the NetCDF files, but can be computed from the dimension sizes.  &lt;br /&gt;
&lt;br /&gt;
 sr_x=west_east_subgrid/west_east_stag = west_east_subgrid/(west_east + 1)&lt;br /&gt;
 sr_y=south_north_subgrid/south_north_stag = south_north_subgrid/(south_north + 1)&lt;br /&gt;
&lt;br /&gt;
For historical reasons, the fire grid dimensions in the output files are larger than what is actually used by the code internally.  The extra space is at the end of the variables of size &amp;lt;code&amp;gt;sr_x&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sr_y&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;.  The following is an example of python code for correctly reading &amp;lt;code&amp;gt;FGRNHFX&amp;lt;/code&amp;gt; from the file &amp;lt;code&amp;gt;wrfout&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 from netCDF4 import Dataset&lt;br /&gt;
 f=Dataset(&#039;wrfout&#039;,&#039;r&#039;)&lt;br /&gt;
 sr_x=len(f.dimensions[&#039;west_east_subgrid&#039;])/(len(f.dimensions[&#039;west_east&#039;])+1)&lt;br /&gt;
 sr_y=len(f.dimensions[&#039;south_north_subgrid&#039;])/(len(f.dimensions[&#039;south_north&#039;])+1)&lt;br /&gt;
 fgrnhfx=f.variables[&#039;FGRNHFX&#039;]&lt;br /&gt;
 fgrnhfx=fgrnhfx[...,:-sr_y,:-sr_x]&lt;br /&gt;
&lt;br /&gt;
Variables on the fire mesh are located at the centers of the fire mesh cells of a 2D fire mesh. The position of the centers is stored in the arrays &#039;&#039;&#039;FXLONG&#039;&#039;&#039; and &#039;&#039;&#039;FXLAT&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Fire variables important for visualization:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;FGRNHFX&#039;&#039;&#039; - heat flux from the ground fire. Higher value means a more intense fire, so it should be brighter.&lt;br /&gt;
* &#039;&#039;&#039;FUEL_FRAC&#039;&#039;&#039; - the fuel fraction remaning. 1 means no fire yet, so one can display the original ground colors. 0 or small means burned, so the ground can have a different color, e.g. it could be blackened.&lt;br /&gt;
&lt;br /&gt;
See the [[Media:Users guide chap-wrf-fire.pdf|WRF-Fire user&#039;s guide]] for the description of all fire model variables.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[WRF-Fire documentation]]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap5.htm#fields WRF output fields from the WRF-ARW user&#039;s guide]&lt;br /&gt;
* Grid: [http://www.mmm.ucar.edu/wrf/users/docs/arw_v3.pdf A Description of the Advanced Research WRF Version 3 (June 2008)] Fig 7.3 page 59&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/WRF_conventions.html WRF Coding Conventions]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/users/tutorial/200807/WRF%20Registry%20and%20Examples.pdf WRF Registry and Examples]&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/software_v2/ WRF v2 Software Tools and Documentation] (there does not seem to be a document for V3?)&lt;br /&gt;
* [http://www.mmm.ucar.edu/wrf/WG2/software_2.0/registry_schaffer.pdf Description of WRF Registry]&lt;br /&gt;
* [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=2&amp;amp;ved=0CBsQFjAB&amp;amp;url=http%3A%2F%2Fyosemite.epa.gov%2FR10%2Fairpage.nsf%2Fc36cf12146018ddc882569e5005f1951%2F75f93e40b30302fc88257408008069e9%2F%24FILE%2FBowman.pdf&amp;amp;ei=Xt5hTJH6MseNnQf9rd3NAQ&amp;amp;usg=AFQjCNHsnOPC4nuQjHikOMx4sm40IJMquw&amp;amp;sig2=_4BrV5z1fh0ahYC5s9_t0Q Moving from MM5 to WRF]&lt;br /&gt;
 &lt;br /&gt;
[[Category:WRF-Fire]]&lt;br /&gt;
[[Category:Howtos|Interpret WRF-Fire variables]]&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2010</id>
		<title>Jbeezley/hurricane</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2010"/>
		<updated>2011-04-20T18:41:04Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;gallery perrow=4&amp;gt;&lt;br /&gt;
File:Hurricane SLP 001.png&lt;br /&gt;
File:Hurricane T 001.png&lt;br /&gt;
File:Hurricane QVAPOR 001.png&lt;br /&gt;
File:Hurricane wind 001.png&lt;br /&gt;
File:Hurricane SLP 002.png&lt;br /&gt;
File:Hurricane T 002.png&lt;br /&gt;
File:Hurricane QVAPOR 002.png&lt;br /&gt;
File:Hurricane wind 002.png&lt;br /&gt;
File:Hurricane SLP 003.png&lt;br /&gt;
File:Hurricane T 003.png&lt;br /&gt;
File:Hurricane QVAPOR 003.png&lt;br /&gt;
File:Hurricane wind 003.png&lt;br /&gt;
File:Hurricane SLP 004.png&lt;br /&gt;
File:Hurricane T 004.png&lt;br /&gt;
File:Hurricane QVAPOR 004.png&lt;br /&gt;
File:Hurricane wind 004.png&lt;br /&gt;
File:Hurricane SLP 005.png&lt;br /&gt;
File:Hurricane T 005.png&lt;br /&gt;
File:Hurricane QVAPOR 005.png&lt;br /&gt;
File:Hurricane wind 005.png&lt;br /&gt;
File:Hurricane SLP 006.png&lt;br /&gt;
File:Hurricane T 006.png&lt;br /&gt;
File:Hurricane QVAPOR 006.png&lt;br /&gt;
File:Hurricane wind 006.png&lt;br /&gt;
File:Hurricane SLP 007.png&lt;br /&gt;
File:Hurricane T 007.png&lt;br /&gt;
File:Hurricane QVAPOR 007.png&lt;br /&gt;
File:Hurricane wind 007.png&lt;br /&gt;
File:Hurricane SLP 008.png&lt;br /&gt;
File:Hurricane T 008.png&lt;br /&gt;
File:Hurricane QVAPOR 008.png&lt;br /&gt;
File:Hurricane wind 008.png&lt;br /&gt;
File:Hurricane SLP 009.png&lt;br /&gt;
File:Hurricane T 009.png&lt;br /&gt;
File:Hurricane QVAPOR 009.png&lt;br /&gt;
File:Hurricane wind 009.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2003</id>
		<title>Jbeezley/hurricane</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=Jbeezley/hurricane&amp;diff=2003"/>
		<updated>2011-04-19T23:48:11Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;gallery perrow=3&amp;gt;&lt;br /&gt;
File:Hurricane SLP 001.png&lt;br /&gt;
File:Hurricane T 001.png&lt;br /&gt;
File:Hurricane wind 001.png&lt;br /&gt;
File:Hurricane SLP 002.png&lt;br /&gt;
File:Hurricane T 002.png&lt;br /&gt;
File:Hurricane wind 002.png&lt;br /&gt;
File:Hurricane SLP 003.png&lt;br /&gt;
File:Hurricane T 003.png&lt;br /&gt;
File:Hurricane wind 003.png&lt;br /&gt;
File:Hurricane SLP 004.png&lt;br /&gt;
File:Hurricane T 004.png&lt;br /&gt;
File:Hurricane wind 004.png&lt;br /&gt;
File:Hurricane SLP 005.png&lt;br /&gt;
File:Hurricane T 005.png&lt;br /&gt;
File:Hurricane wind 005.png&lt;br /&gt;
File:Hurricane SLP 006.png&lt;br /&gt;
File:Hurricane T 006.png&lt;br /&gt;
File:Hurricane wind 006.png&lt;br /&gt;
File:Hurricane SLP 007.png&lt;br /&gt;
File:Hurricane T 007.png&lt;br /&gt;
File:Hurricane wind 007.png&lt;br /&gt;
File:Hurricane SLP 008.png&lt;br /&gt;
File:Hurricane T 008.png&lt;br /&gt;
File:Hurricane wind 008.png&lt;br /&gt;
File:Hurricane SLP 009.png&lt;br /&gt;
File:Hurricane T 009.png&lt;br /&gt;
File:Hurricane wind 009.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_009.png&amp;diff=2002</id>
		<title>File:Hurricane wind 009.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_009.png&amp;diff=2002"/>
		<updated>2011-04-19T22:06:26Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_008.png&amp;diff=2001</id>
		<title>File:Hurricane wind 008.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_008.png&amp;diff=2001"/>
		<updated>2011-04-19T22:06:18Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_007.png&amp;diff=2000</id>
		<title>File:Hurricane wind 007.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_007.png&amp;diff=2000"/>
		<updated>2011-04-19T22:06:11Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_006.png&amp;diff=1999</id>
		<title>File:Hurricane wind 006.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_006.png&amp;diff=1999"/>
		<updated>2011-04-19T22:06:02Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_005.png&amp;diff=1998</id>
		<title>File:Hurricane wind 005.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_005.png&amp;diff=1998"/>
		<updated>2011-04-19T22:05:55Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
	<entry>
		<id>https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_004.png&amp;diff=1997</id>
		<title>File:Hurricane wind 004.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.openwfm.org/index.php?title=File:Hurricane_wind_004.png&amp;diff=1997"/>
		<updated>2011-04-19T22:05:46Z</updated>

		<summary type="html">&lt;p&gt;Jbeezley: Hurricane ensemble data provided by Fuqing Zhang.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hurricane ensemble data provided by Fuqing Zhang.&lt;/div&gt;</summary>
		<author><name>Jbeezley</name></author>
	</entry>
</feed>