+

Appendix 7: Creating Flat-Processed DEM Data For The VELMA Simulator and Determining Outlet and Watershed Delineation


The VELMA Simulator requires a Digital Elevation Map (DEM) for any simulation it runs. This DEM contains elevation data for the area simulated.

The area specified must contain no "sinks" or "flat spots".

When VELMA simulates surface waterflow it must be able to flow "off" the map area in some way. Water is not allowed to pool anywhere within the simulation area.

In order to ensure this "no flat spots rule", DEM data used by the VELMA Simulator is first "flat-processed" to remove any sinks or flat spots.

Use JPDEM to prepare DEM data for use by the VELMA Simulator.

NOTE

You must have Java 1.7 installed on your computer to run JPDEM.

Start JPDEM

Open a Windows Command Line and enter the command:

C:\> java -Xmx1024m -jar C:\full\path\to\JPDEM.jar

The "-Xmx1024m" tells the Java Runtime Environment (JRE) to let JPDEM have 1024 megabytes (1gigabyte) of working memory.

If your machine doesn't have that much memory, substitute a smaller value (e.g. "512" instead of"1024"). Alternately, if the .asc file of DEM data you intend to load is very large (and your machinehas the memory) you may substitute a larger value (e.g. "2048" instead of "1024").

If the full path to the JPDEM.jar file contains whitespace characters, place double-quotes around the path.

Example:

"C:\full\path\with white space\to\JPDEM.jar"

Loading DEM Data Into JPDEM

Load a "raw" DEM file into JPDEM (the file must be in standard ESRI Grid .asc format). Click the"File" menu, then select and click "Load DEM File".

The "Select DEM File to Load" dialog window opens.

Browse to the location of your DEM file, and click the name of the DEM file. The DEM file's name appears inthe "File Name:" text box.

Click "Load File" to load that file's data into JPDEM.

The file is loaded, and an image of the file appears in JPDEM's map display.

If the file is too small (has few rows and columns), click the Image Scale up-arrow button to "zoomin".

Flat Processing DEM Data In JPDEM

Click the "Tools" menu, then select and click "Flat-Process DEM Data (Standard)".

JPDEM will process the DEM, adjusting elevation data to remove flat spots or sinks within the DEM data'sarea.

If the processing takes more than a second or two, the display will periodically update, showing remaining flatspots in blue.

When the flat-processing algorithm finishes, the display shifts to a grey-scale representation, withdarker-colored pixels representing cells with higher flow-accumulation values.

Note:

There are several menu options for Flat-Processing DEM data.

The "(Standard)" menu item uses an algorithm that produces good results, but generally takes more timeto produce them. We do not, at this time, recommend using the other two flat- processing algorithms. They arestill being developed.

Saving Flat-Processed DEM Data From JPDEM To a File

After JPDEM finishes flat-processes DEM data, click the "File" menu, then click the "Save DEM As..." submenu, and finally select and click the "Ascii Grid" menu item.

The "Save DEM Grid to File" dialog window opens.

Browse to the location you wish to save the data in, then type a name for the file in the "File Name:"text box.

Finally, click the "Save File" button to save the DEM data to the specified file name and location.

Note

Flat-processed DEM data may be loaded into JDPEM just like "raw" DEM data.

Flat-processed DEM date does not need to be flat-processed again after it is loaded into JPDEM. However, to viewthe flow-accumulation grey-scale visualization of that flat-processed data, you must determine the flow datainformation for the flat-processed DEM values.

Watershed Delineation

Determining Flow Data For a Flat-Processed DEM

Load a flat-processed DEM .asc file into JPDEM, in the same way you would load a "raw" DEM file.

After loading the DEM data, click the "Tools" menu, then select and click the "Determine DEM FlowData (Standard)" menu item.

JPDEM will then compute flow data (flow direction and accumulation values) for each cell in the DEM area.

Once the flow data is computed, JPDEM will shift the display to the flow-accumulation grey- scale visualization.

Note

Loading a "raw" DEM file and then immediately trying to determine DEM flow data should not crash JPDEM,but it won't result in any meaningful information either.

Note

The difference in results between the "(Standard)" and "(Alternate)" flow data algorithmsshould be zero or very small.

You may use either algorithm. The Alternate algorithm is somewhat faster, but often not much faster than theStandard algorithm.

Determining Watershed Delineation

Flat-processed, flow-accumulated DEM data in JDEM may be used to determine the delineation relative to aspecified outlet cell (i.e. the set of cells that flow "to" a specified "outlet" cell).

In order to compute the delineation for an outlet cell, you must first specify the coordinates of the outletcell.

You can do this either by entering the zero-based x (column) and y (row) coordinates of the outlet cell in the"Outlet X=" and "Y =" number boxes, above JPDEM's map display, or by using the mouse.

To select an outlet cell using the mouse, do the following:

Move the mouse pointer over the cell you wish to select. Press down on either the right or left mouse button.

A context menu should pop-up, containing information about the cell you are pointing at. Holding the mouse button down, drag the mouse pointer onto the menu item containing cell info (the info should highlight), then release the mouse button.

The menu goes away, and the x and y coordinates for the cell you selected appear in the "Outlet X = " and "Y = " number boxes above the map display.

Note:

"Zoom in" on the map display by clicking the up-arrow button of the "Image Scale" to make selecting a specific cell easier. For example, at "Image Scale 3", for example, every cell isdisplayed by 3x3 pixels.

However, on very large maps zooming too far in can crash the display, because it may run out of memory.

Once the coordinates of an outlet cell are specified, click the "Tools" menu, then select and click the "Delineate DEM Data (Experimental)" menu item.

JPDEM will then compute the delineation (i.e. the area of cells) for the currently specified "Outlet X =" and "Y =" values.

The resulting area is displayed in a logarithmic-coloring blue-red scale, superimposed over the grey-scale of the flow-accumulation display.

If the delineation looks incorrect, change the outlet cell coordinates and re-run the delineation. When the delineation looks correct, record the "Outlet X =" and "Y =" values for future reference and use with JVELMA. (JPDEM does not "record" outlet values anywhere.)

Note

There are currently four different JPDEM delineation algorithm implementations to choose from.

We believe they all produce the same results (except possibly for cells on the edge of the DEM

area -- which is an acceptable difference). However, they vary greatly in how long they take to run. Use the "(Experimental)" algorithm for delineation: it runs significantly faster than any of the other delineation implementations. In particular, do not use the "(PDEM-2)" algorithm, which can take a very long time to run, even for small maps.