-
Notifications
You must be signed in to change notification settings - Fork 0
Utilities dem2fds
Notes on creating FDS input files from digital elevation map (dem) files (preliminary)
-
Download and install Smokeview from https://pages.nist.gov/fds-smv/downloads.html
-
Download and install Imagemagick from http://www.imagemagick.org/script/binary-releases.php. This program is used to convert terrain image files, downloaded from https://viewer.nationalmap.gov/basic/, from jpeg 2000 to jpeg format.
-
Elevation and terrain image data files dem2fds uses to create FDS input files may be obtained from the USGS National Map website, https://viewer.nationalmap.gov/basic/. This website has a map of the United States on the right and a set of data download options is on the left. Zoom in on the region of interest then select and download elevation and terrain image files using the steps described below.
Obtaining elevation data:
- Select the Elevation Products (3DEP) checkbox.
- Select 1/3 arc-second DEM checkbox
- Select the GridFloat File format option
- Click on the map and zoom in to a region of interest.
- Click on the Find Products button. You should see one or more entries listed with headings beginning with USGS NED 1/3 arc-second ...... 1 x 1 degree .
- Click on the Footprint link to verify where various files are located.
- Click on Download link to download files of interest.
- Unzip these files using a program such as Winzip. Open the directory created with the unzip operation and copy the .flt and .hdr files to a directory where you'll keep your elevation and image files.
Obtaining terrain images:
- Click on the Return to Search button and uncheck (if checked) the Elevation Products (3DEP) checkbox
- Select the Imagery - 1 meter (NAIP) checkbox
- Click on the map and zoom in to a region of interest within the elevation region selected for for elevation files.
- Click on the Find Products button. You should see one or more entries with each entry beginning with m_ and ending with .jp2 .
- Click on the _Footprint- link to verify image file locations.
- Click on Download link to download files of interest. The image files should cover the region you are using to define an FDS input file.
- Copy the downloaded files to the same directory you used to copy the .flt and .hdr elevation files.
- The .jp2 files you just downloaded are in jpeg 2000 format.
They need to be converted to jpeg format .
To do this on a PC, run the
jp2conv
command. On Linux or a Mac, run thejp2conv.sh
command. These commands are installed with the latest version of Smokeview.
Put the downloaded elevation and terrain files in a directory. This directory will be referenced by dem2fds when creating a FDS input file.
- Create a dem2fds input file named
casename.in
containing the following lines
GRID
ibar jbar kbar
LONGLATMINMAX
longmin longmax latmin latmax
The parameters ibar
and jbar
are the number of longitude and latitude divisions
and kbar
is the number of divisions along the z direction. The parameters
longmin
, longmax
, latmin
and latmax
are the minimum and maximum
longitude and latitude enclosing the region being modeled.
Two other methods for specifying a terrain region are to use the
LONGLATCENTER
or LONGLATORIG
keywords as in
GRID
ibar jbar kbar dx dy
LONGLATCENTER
longcen latcen
or
GRID
ibar jbar kbar dx dy
LONGLATORIG
longorig latorig
where dx
and dy
are the scenario width and length in meters
( ibar
, jbar
and ibar
are defined as before),
longcen
and latcen
are the longitude and
latitude at the scenario center,
i.e.
at position (dx/2
, dy/2
)
and longorig
and latorig
are the longitude and
latitude at the scenario origin,
i.e.
at position (0.0, 0.0
).
- Finally to create an FDS input file, run the command:
dem2fds -d elevation_directory casename.in
where elevation_directory
is the path of the directory containing the
elevation and image files downloaded previously and
casename.in is the file containing GRID
and LATLONG...
keywords.
- To view the resulting case, run the commands:
fds casename.fds
smokeview casename
- GRID - Specifying the simulation grid
GRID
ibar jbar kbar dx dy zmin zmax
ibar, jbar, bar - number of divisions along the x, y and z directions dx, dy - distance along the x and y axis.
Note, dx and dy are required if LATLONGCENTER or LATLONGORIG are used to specify a terrain region and optional if LATLONGMINMAX is used to specify a terrain region (dem2fds computes dx and dy for LATLONGMINMAX keywords).
zmin, zmax - minimum and maximum z elevation. These parameters are optional.
- LONGLATCENTER - specifying the longitude and latitude at the scenario center
LONGLATCENTER
longcen latcen
longcen, latcen - longitude and latitude at the center of the scenario, at position (dx/2,dy/2) .
- LONGLATORIG - specifying the longitude and latitude at the scenario origin
LONGLATORIG
longorig latorig
longorig, latorig - longitude and latitude at the origin of the scenario, at position (0,0) .
- LONGLATMINMAX - specifying longitudes and latitudes that bound the scenario
LONGLATMINMAX
longmin longmax latmin latmax
longmin, longmax - minimum and maximum longitude latmin, latmax - minimum and maximum latitude
dem2fds (SMV6.5.3-3-g4322120) Jul 5 2017
Create an FDS input file using elevation and image
data obtained from http://viewer.nationalmap.gov
Usage:
dem2fds [options] casename.in
-dir dir - directory containing map and elevation files
-elevdir dir - directory containing elevation files (if different than -dir directory)
-geom - represent terrain using using &GEOM keywords (experimental)
-obst - represent terrain using &OBST keywords
-help - display help summary
-help_all - display all help info
-version - display version information
- The
-obst
option is used by default. - The
-geom
option is experimental testing the new geometry file format. - All terrain images should contain a 300 pixel overlap buffer. However
this is not always the case. The
-nobuffer
option is used for those cases when there is no overlap between two adjacent images.
- Devils Tower
Devils tower is an extinct volcano located in north eastern Wyoming. It was chosen as a test case for dem2fds because it is easy to verify that the geomtry and the image is consistent at the tower location.
- dem2fds input file:
GRID
100 100 30
LONGLATMINMAX
-104.7256 -104.7096 44.5850 44.5945
- create an fds input file using:
dem2fds -overlap -dir terrain\tower tower.in
where terrain\tower is a directory containing elevation data and terrain images for Devils Tower.
- The image below was created by running FDS on the input file generated using dem2fds then viewing with smokeview using:
fds tower.fds
smokeview tower.fds
- Devils Tower
This example is similar to the first. It uses the -show command line option of dem2fds to label the terrain image files and to show a red rectangle for the region being simulated. This is useful for ensuring that the correct files have been downloaded.
- dem2fds input file:
The longitude/latitude region is larger than in the first example. It corresponds to the region of the data files that were downloaded rather than the region being modeled.
GRID
100 100 30
LONGLATMINMAX
-104.7256 -104.7096 44.5850 44.5945```
* create an fds input file using:
Again, the -show option is used to hilight the region being simulated and identify the files that were downloaded.
`dem2fds -overlap -show -dir terrain\tower tower.in`
where terrain\tower is a directory containing elevation data and terrain images for Devils Tower.
* create the following image using the commands:

fds tower.fds smokeview tower.fds