1. Flood Risk Analysis:
scripts connecting OpenGIS with Hec-RAS
Ing. Davide Sponchiado 1
, Ing. Enrico Gallo 1
, Ing. Daniele Ganora 1,2
1
CINID – Consorzio Interuniversitario per l'Idrologia
2
DIATI – Politecnico di Torino
Abstract
A series of scripts are presented to use Grass GIS capabilities to support
hydraulic simulations with the Hec-RAS model version 4.1.0. Scripts are
intended to provide an open source alternative to the Hec-GEORAS plugin,
which runs only on proprietary GIS. This approach allows to process high
resolutions DEM to extract the necessary geometrical information required by
the model directly within the GIS environment; geometrical data is then
exported to the hydraulic model and simulated water levels can be returned to
the GIS to facilitate flood risk analysis (or any other water-related study).
Exchange of information is performed through a standard text file, which can
contain both geometrical and hydraulic data.
The code has been developed starting from a set of scripts already available
from the open source community and is still under development. Script, written
in Python, have been used on GRASS GIS 6.4.3, but they can be easily
integrated in the QGIS toolbox.
The case study is Belbo creek near Canelli district in the province of Asti.
Keywords
GRASS GIS, Hec-RAS, QGIS, Hydraulic Simulations, Flood Mapping
1 Introduction
Hydrologic and hydraulic analysis of a river reach is a fundamental step for
modern land and environmental management. One of the most important
activities is the flood risk mapping which is strictly related to people safety and
urban development. This kind of analysis is, for instance, strictly related to the
D.Lgs 49/2010 on the assessment and management of flood risks
(transposition Directive 2007/60/EC, which requires Member States to assess if
all watercourses are at risk of flooding, mapping them and reducing possible
risk for assets and humans).
A widely used model, able to perform such kind of analyses, is the Hec-RAS
model developed by the Hydrologic Engineering Center of the US Army Corp of
Engineers. Hec-RAS is freely available and it is well recognised to be a powerful
and reliable model; the source code is not promptly available, but it can
obtained upon request (see the Distribution Policy of the software for details).
Hec-Ras binaries runs only on Windows OSs. Currently version 4.1 is the most
1
2. up-to-date release that support 1D modelling only, although a 2D
implementation is already available as a beta version (release 5.0).
Hec-RAS itself has no GIS features to manage the necessary input data and the
results of simulations; however, an extension named Hec-GeoRAS has been
released as an ArcGIS plugin to allow the use GIS tools.
2 Hec-RAS features
Hec-RAS 4.1.0 is a widely used 1D hydraulic model (although a 2D version is
under testing). To perform standard hydraulic simulations, Hec-RAS requires
geometric data (section shape, distance between sections), hydrologic data
(flow values, roughness), and boundary conditions. Bridges, levees, storage
areas, etc. can be included as well, to create a more realistic model. Further
analyses can be performed, such as water quality or sediment transport; the
interested reader is referred to the official (and unofficial) documentation.
For any Hec-RAS project, geometric data can be introduced fundamentally in
two ways: the first is by manually input the data in the GUI geometry editor;
the second is to act on a particular file of the project, which is a text file with
g** extension (** stands for a progressive number as multiple geometries are
allowed). This latter can be modified by manually or automatically put the
desired information. A particular structure of the file is required.
A better solution to import/export model features is through the interchange
files .sdf. It is a plain text file in which there are all the information about the
geometry of all the elements (first of all, the riverbed and the sections and
their elevation). The same file can store (but it is an optional information)
hydraulic input data (like streamflow values, roughness) and the results of
simulations (such as the water levels, flow velocity). Working with the .sdf file is
thus preferable than directly operate on project files as one file.
3 GRASS to Hec-RAS script
To extract cross-sections, a high-resolution Digital Elevation Model (DEM) is
needed as the topographical base. Two additional vectorial layers are required
as well:
• a vector layer of lines or polylines representing the cut lines along with
to "cut" the DEM
• a vector layer with one polyline representing the riverbed.
The scripts uses the GRASS command r.profile to extract cross-sections along
the cut lines and properly writes the information in the .sdf file. Note that, to
fulfil the Hec-RAS rules, cut lines must be drawn from the left bank to the right
bank, otherwise manual editing is required to fix the polylines directions.
The riverbed layer should be oriented along the flow direction, but in this case,
the script automatically detects and corrects possible wrong direction.
Both vectors cannot have elements out of the DEM extents. Moreover, the
riverbed must intersect all the cut lines once, and cut lines must not intersect
themselves.
Hec-RAS requires unique section names; names must be numeric (although a
string label is also supported in addition to the number), sorted according the
2
3. location of the section along the stream, with increasing numbers moving from
the outlet towards the river source. The script automatically enumerates the
sections according to their distance from the river outlet.
Finally, distances between sections are required as input. For each section,
three distance values are necessary: along the main channel, on the left over
bank and on the right over bank. The former is calculated by the script along
the streambed polyline; the latters can be evaluated in an approximate way
(selecting an optional flag), but, in current implementation, a manual input is
still suggested.
Furthermore it is possible to add the levees (paying attention they don't cross
more times the same section) and the left and right banks (i.e. the points of
separation between main river and floodplains) drawn as unique line or just at
the intersections.
The first script creates the .sdf file according the Hec-RAS format; this file can
be loaded in Hec-RAS and used to support simulations. Hec-RAS allows for a
manual editing of the imported sections.
3 Hec-RAS to GRASS script
After the simulations have been performed, water levels can be exported
toward the GIS. Currently, only water elevation values from steady state
simulations can be exported, but many other variables can be considered in
future development. A new .sdf file is written which includes the geometric
data used in Hec-RAS and the hydraulic output.
The second script creates a vector layer in GRASS with the cut lines; each
cutline is characterized by one or more water elevation values (depending on
the number of simulated water profiles), stored in the attribute table. Note that,
the script is not able to account for the actual water extent along the section.
3
Domain of analysis in GRASS Domain of analysis in Hec-RAS
4. A third script allows the interpolation of water level between the sections to
create a raster map. This is a useful tool to map easily the water level in the
area of analysis, but it must be used carefully as the interpolation is not
performed by hydraulic modelling. For this reason, the script is developed
independetly and released separately.
REFERENCES
Chiraz, P., & Ricci, A. (2013) Studio Associato GfosServices, Terni (Italy).
V.grass2hec & v.hec2grass scripts (first version 2008, latest version 2013),
from http://www.gfosservices.it.
D.Lgs 49/2010 (http://www.camera.it/parlam/leggi/deleghe/10049dl.htm).
GRASS (http://grass.osgeo.org/).
Hec-RAS (http://www.hec.usace.army.mil/software/hec-ras/).
QGIS (http://www2.qgis.org/it/site/).
4
GRASS script GUI The .sdf file
Geometric data in Hec-RAS Example of inundated areas