Thursday, June 25, 2015

Lifting Terrain in HEC-RAS 5.0

Written by Gerrit Kiers |  VIZITERV Consult Kft., Hungary
Copyright © The RAS Solution and Gerrit Kiers 2015.  All rights reserved.

Using Cross Section Data to add a levee

It is a common problem in hydraulic modeling that terrain data does not include the actual terrain underneath the water surface. With HEC-RAS 5.0 a terrain model can be improved by adding channel bathymetry to the existing terrain surface with the Cross Section Data (see Chapter 2 of the 2D Modeling User's Manual, or visit

With this procedure it is also possible to locally lift the terrain, for instance on locations where a new levee alignment is planned. I use the Cross Section Editor to define a levee as an inverse channel that will be standing out above the existing surface. Then I create a levee terrain model and add that levee model to the existing terrain surface.

For the following example, I used the Muncie 2D HEC-RAS dataset that comes with HEC-RAS 5.0.0 Beta March 2015. One of its geometries contains break lines in the 2D Flow Grid. It is important to define break lines along the levees to make sure that flow across the cell faces is blocked by the elevation of the levee along the break line. In this example it is fortunate that these break lines were already defined so I was able to use their alignment for my levee.


For the definition of the levee I created a new geometry file and in this geometry I drew a river reach (Muncie levee) just on top of the break lines.


Constructing the cross section data for the new levee is rather straightforward. In this example I created the levee on a fixed elevation of 950 ft. There is no need to extend the side-slopes so that they touch the actual surface, but they do have to be pointing downwards. I added two identical cross sections on both ends of the levee.


There are two additional aspects to be aware of at this phase. First of all, make sure that the levee is wide enough to be represented in the terrain model you create. That is strongly related to the cell size of the terrain model. In this example a levee of 20 ft width will be more than sufficient as the Muncie terrain has a cell size of 5 ft x 5 ft Secondly, one also needs to check if the levee is consistently defined above the existing surface level, since we don’t want the levee to cut into existing terrain. If the alignment runs into natural high ground, one can locally lift the levee above the terrain level by adding extra cross sections. It is also possible to split the levee into separate reaches, before and after the high ground section.

With the current Beta version it is important to generate multiple cross sections by interpolation before creating the levee model. I opted for interpolation at every 100 ft.


At this point I was able to export the levee model as a terrain model. For this I used the ‘Create Terrain GeoTIFF from XS's’ option, accessible from the data file tree on the left in RAS Mapper. Right-click on the name of the geometry file you’re working in and select Export Layer… Create terrain GeoTiff from XS’s. In my example the ‘Channel Only’ option is sufficient. I named my terrain LeveeOnly.


There is only one step left, the joining of the original terrain model with the ChannelOnly terrain and the LeveeOnly terrain to create a terrain model that includes all features we want represented in the terrain. From RAS Mapper I invoked the menu option "New terrain" and added the different terrain models to the listing, as can be seen in the next screen capture. As the channel and levee must have higher priority for this procedure, they were moved to the top of the list.


The new terrain 'TerrainWithChannelAndLevee' includes both the channel bathymetry and the aligned levee.


On closer inspection we can see that there is an issue with the levee in one of its bends. Due to the cross section spacing of 100 ft, the LeveeOnly terrain appears cut off.  Tighter cross section spacing will improve this.  Notice that there is also an issue with the grid cells at this location. There is one 2D cell whose face does not match the break line alignment. Closer cell center spacing assigned to that break line should improve this situation.


Consequently, this bend will allow for some leaking along the different cell faces. In a real world situation I would need to address both issues before I can continue with my calculations. For now I neglect these and want to see how my new terrain performs.
For that purpose we can calculate one of the defined examples with the new terrain model. In the next screenshot we see the flooding caused by the upstream river levee breach with the original terrain, as modeled in the plan ‘Unsteady Run with 2D 50ft User n Value R’.


In the next screenshot we see the same flood event with the new terrain. It is clearly visible how the new levee performs in protecting lower areas, even though some leakage is visible. This leakage is due to the abovementioned issues in the terrain at the levee bend. This leakage can be eliminated by more refinement of the levee in the terrain (i.e. closer cross section spacing) and by better alignment of the adjacent cells using breaklines with smaller cell center spacing.


With this I hope to have demonstrated that the use of the Cross Section Data in HEC-RAS 5.0 is a very efficient tool for defining levee alignments in HEC-RAS 5.0. This new concept is relatively easy and can be used to define multiple terrain models with different levee alignments, which can be used in the evaluation of different flood protection scenarios.

Disclaimer: These model runs are only generated as examples to demonstrate the new abilities of HEC-RAS 5.0.0 Beta.

Gerrit Kiers is a Dutch hydrologist, working for VIZITERV Consult Kft. in Hungary.  Thank you Mr. Kiers for sharing your idea for terrain lifting in HEC-RAS 5.0!

Mr. Kiers' data set that demonstrates this technique can be downloaded here:


  1. Thanks Gerrit! That's a very creative idea that I can see being very useful to many RAS modelers out there.

  2. first of all i apologize because i`m asking for help regarding to something non related to the topic of the post, but i`m in trouble, i tried to move a reach name and i click on a cross section, instantly all the cross sections of the reach dissapeared! what could i do to visualize them again in the geometry plot? thanks and sorry again. Diego

    1. That's strange. I would reeopen the geometry file. When RAS asks if you want to save your current geometry, say No! Then when you reopen, everything you've done prior to after your last save should be gone.

  3. Hey Chris,

    Purely out of curiosity, have you heard anything about whether 2D controls will be integrated into RASController? I ask this mostly with varying overland Manning's values in mind. I recently used RASController with VBA to vary cross section Manning's n values in a 1D model. Having also recently worked on analyzing the impacts of a new development with RAS 5.0, I wondered if this had come up at all.

    1. Unless something changes in the final release, there are no 2D-related procedures added to the HECRASController. However, you could do a lot of work with n values in 2D areas by reading/writing to the geometry file. The new version of RAS 5.0 beta allows for spatial definition of Manning's n values directly in the geometry schematic. These are presumably then stored in the geometry text file, which can be read from/written to via code (VBA or otherwise). Chapter 4 in my book talks about reading and writing to the geometry text file from a programming environment.

    2. Interesting. I just installed the most up to date beta version this week (I was previously using the October release). I haven't had to vary n in 2D yet, but I'll keep this in mind in case I do. I spent some time figuring out the RASController a couple months ago, then found the book (which may have saved me some time over tinkering with VBA environment I'm not fond of). If I have to use Controller again, I may end up getting the book to make things a little easier.

      Thanks for the response.

  4. Hello,

    How can I install the March 2015 version of RAS 5.0? The most current version that I can find online is the October 2014 release...


  5. Hello, How can I download the march 2015 release of HEC-RAS 5.0? Thanks.

    1. Here is the link to the latest version:

      This link lets you download a self extracting archive file called "HEC-RAS_5.0_Beta_2014-10-01.exe"

      Download the file to a separate directory and run the self extracting archive file. The self extracting archive file contains:

      1). The installation setup package called: " HEC-RAS_5.0_Beta_2015-03-20_Setup.exe"

      2). A updated PDF version of the User's Manual called "2D Modeling with HEC-RAS 50_Draft.pdf"

      3). Two 2D Test Data sets in a directory called "RAS_50 Test Data"

    2. Hello Chris. Thanks for the link. I followed it but received a message saying "the requested file does not exist". Has the file been removed?

    3. Mathar-please go to the main page on The RAS Solution and you'll see a post about the latest August beta release. You can download it there. Good luck."

  6. Hello, I am having trouble to interpolate as he did with the cross-sections. Using 5.0.1, I have created a river reach and created cross sections with different river stations (0,5) to use the "XS Interpolation within Reach" feature. Despite entering different river station, it keeps creating cross sections on the same point, am I wrongly understanding what the "river stations" value is?

    Can you please explain in steps what I am doing wrong or how he was able to interpolate his cross sections?

    Thank you very much

    1. Make sure you are "adding a new cross section", not copying an existing cross section. Also be sure to add reach lengths into the cross section editor for each cross section.

  7. Hi Chris and Gerrit,
    What are the advantages of using HEC-RAS to prepare the new terrain? I usually prefer doing terrain modifications like this in GIS and simply adding new data-sets. I feel that the manageability and editing options-tools of 3D shapefiles is much better for this purpose, than that of a river reach.

    1. If you have GIS and are comfortable with it, there's not much of an advantage in preparing the terrain in HEC-RAS, other than the convenience of not having to switch between software applications. ArcGIS and other GIS software applications will be able to do a lot more than HEC-RAS in terrain preparation.

  8. Hi Chris,

    I am going to model a road embankment within my 2D Flow Area. The road is about 100 m far from the river and in case of flood it works like a levee for the flow.
    At certain points, the road is crossed by 4 tunnels (square section about 3.5 x 3.5 meters) which, in case of flood, allows the water to flow under the road and reach the fields on the other side. My question is: "How can I model this tunnels? Are they like culverts?"

    Thank you so much.

    1. I suggest putting an SA/2D Connection inside your 2D area and use culverts to simulate the tunnels.

    2. If the tunnels are relatively long such that they span multiple cells, you may wish to consider using the "worm-hole technique as described here: