Tuesday, March 8, 2016

Post-Processing with RAS Mapper: Exporting a Large Number of Results Maps

Written by Shaina Sabatine  |  Watershed Science & Engineering, Seattle, WA
Copyright © The RAS Solution 2016.  All rights reserved.

The new and improved RAS Mapper interface in HEC-RAS 5.0 makes managing and exporting model results like an inundation extents shapefile or a depth grid for use outside of HEC-RAS/RAS Mapper easy.  The process (which is described in detail in Chapter 5 of the HEC-RAS 5.0 2D Modeling User’s Manual) requires the user to add desired results maps one by one using the ‘Add New Map’ button in the ‘Manage Results Maps’ window shown in Figure 1 below.

Figure 1: Manage Results Maps window for the results of a completed simulation.  Two results layers have been exported: an inundation boundary shapefile and a depth grid.

Imagine you have a large number of outputs from a simulation that need to be exported.  Because only one new results map can be added to the list in the ‘Manage Results Maps’ window at a time using the ‘Add New Map’ button, the process can become tedious.  One way to make the process
faster is to directly edit the file that is created in your project directory with the extension “.rasmap”.  This is a text file in XML format that RAS Mapper uses to identify the Geometries, Results, Map Layers, and Terrains that it will load into the interface along with some other settings (see Figure 2).

Figure 2: XML document tree showing the elements in a “.rasmap” file.

Each executed plan in a RAS project is listed as a <Layer> sub-element under the <Results> element, and each results layer that RAS Mapper will display is described in another <Layer> sub-element underneath that (see Figure 3).  Note: the saved results of a HEC-RAS 5.0 simulation are stored in the file with the extension “.p##.hdf” where ## denotes the plan number. The “.rasmap” file stores information about outputs from the “.p##.hdf” file that will be displayed in the RAS Mapper interface.


Figure 3: XML document tree for the “.rasmap” file associated with the results in the window shown in Figure 1.  The tree has been expanded to show plan <Layer> sub-elements and result <Layer> sub-elements which are under the <Results> element.

Figure 3 shows that 6 results layers will be loaded into RAS Mapper for the plan named “RampFlows2DArea” including an inundation polygon for January 02 at 00:00:00 and a depth grid for January 02 at 00:00:00.  Say you would like to export inundation polygons and depth grids for multiple more profiles in this plan.  Because the “.rasmap” file is simply a text file, it can be opened in a text editor and manipulated.  In this example, one inundation polygon and one depth grid have already been created for the “RampFlows2DArea” plan.  Rather than adding each additional desired results map layer using the ‘Add New Map’ button in the RAS Mapper interface (Figure 1), the “.rasmap” file can be directly edited.  Additional desired results maps can be added by copying the associated block(s) of text, pasting a block in the correct location for each desired results map, and editing as needed.  At a minimum, both the name of the layer and the date/time of the profile being exported will need to be edited (see Figures 3 and 4).  **IMPORTANT- do not have HEC-RAS open while editing the “.rasmap” file.** 

Figure 4: Example of the edited “.rasmap” file.  Blocks of text were inserted for profiles for January 03 through January 07 at time 00:00:00.  The red boxes highlight where edits were made.

Figure 4 shows a portion of what was edited in the “.rasmap” file.  The red boxes in Figure 4 highlight where edits were made.  In this example, it was desired to have an inundation boundary and a depth grid exported for every simulated day at time 00:00:00.    After editing the “.rasmap” file, save it and open your HEC-RAS project and then RAS Mapper.  The results maps will be listed under their plan name under Results in RAS Mapper as shown in Figure 5.

Figure 5: Inundation boundary and depth grid results maps loaded into RAS Mapper after editing the “.rasmap” file.

Inundation boundaries and depth grid results maps have been loaded into RAS Mapper for every day from January 02 through January 20 at time 00:00:00.  Note that a red asterisk means a map has not been created or exported yet.  To create/export maps, select all of the maps and click ‘Compute/Update Stored Maps’ in the ‘Manage Results Maps’ window as shown in Figure 6.

Figure 6: Selecting and creating/exporting the results maps.

Now, all you have to do is wait.  Exporting this many layers could take a while.  Note: This model run was set up so that all the profiles that needed to be exported were at time 00:00:00.  This is why the time stamp was not edited in the “.rasmap” file.


4 comments:

  1. You can also do the same for Profile Lines as there is not a way to import in a shapefile for them.

    ReplyDelete
  2. Thanks, Chris. The issue I'm having is the Shapefile for the maximum water surface elevation for a dam break looks like a series of disconnected sausage links. We've tried interpolating cross-sections down to 100' spacings, decreasing the time step from 10 seconds to 5 seconds, even adding a deeper secondary pilot channel, and still no success. In cross-section view, it shows the high water line. The only thing I haven't tried is re-importing the GRID file on a much tighter grid spacing.

    Any thoughts on how to cure this scenario?

    Many thanks in advance.

    Paul Currier, P.E.
    Water Resource Consultants, LLC

    ReplyDelete