Friday, May 31, 2019

McBreach Probabilistic Dam Breach Modeling Software

Fellow HEC-RAS modelers. Today is National Dam Safety Day.  Dam Breach modeling is a key component to a well-rounded and robust dam safety program.  If you're doing dam breach modeling, you need to check out McBreach. Probabilistic hydraulic modeling is where we're heading with dam breach analysis. Why not get a head start with McBreach. This is free software and works seamlessly with HEC-RAS.  https://spark.adobe.com/page/RXu9m2OZJFOuc/

Thursday, May 23, 2019

HEC-RAS Pub and Grub in Portland-June 27th-Reminder and short video preview!


For those of you who will be in the Portland Oregon area on June 27th, I invite you to join me for this special event Kleinschmidt is hosting at the Lucky Lab on Hawthorne.  I'll be joined by two dynamic and entertaining presenters: Krey Price of Surface Water Solutions and Sean Welch of BPA.  We will be talking about the fun side of hydraulic modeling, demonstrating some wild, creative, and somewhat wacky applications of HEC-RAS.  

  • 2D Modeling of the Ice Age Missoula Floods
  • Automating HEC-RAS with the HECRASController
  • How to know when your HEC-RAS model is wrong
  • Crazy and absurd (but fun!) applications of HEC-RAS around the world
  • Using drones and Structure from Motion to prepare terrain surfaces for your HEC-RAS models.  

You don't want to miss this!  

Check out Krey Price's preview video for the HEC-RAS Pub and Grub!


It will be an informal, casual gathering with lots of time for Q&A.  Hope to see you there!  No RSVP needed.  Just show up, get a pint, and grab a chair.  We'll start at 5:30 and we have the pub until 8:30.  



Wednesday, April 24, 2019

Those Nuisance Cell Errors and Wedge Depressions


Written by Chris Goodell | Kleinschmidt Associates
Copyright © The RAS Solution.  All rights reserved

If you've been doing some 2D modeling, you most likely have run into what I call nuisance cell errors.  You see them while your model is running and they can really slow down your simulation as the RAS chugs through iterations to try to come to a solution.

The errors here are in the second to last column and are in units of feet.  So as you can see, they are quite small, and normally I wouldn't be too concerned with them.  However, if the errors persist, they can really slow down your simulation time.  Sometimes adding several hours to the overall time, in my experience.  So while the errors are small, there is a need to get rid of them, at least the ones that persist for many timesteps.  

A common cause of nuisance cell errors is what I call "wedge depressions".  In the following figure, notice the wedge of water that sits below a well defined ridge line.  The red arrow points to it.  


As you can see by the blue hydraulic connectivity lines that there is hydraulic connectivity between Cell 1 and Cell 2.  But water fills up cells from the lowest spot, and in Cell 2, this is below the ridge.  So you get a narrow wedge of water (wedge depression) that builds up causing some local fragmentation and a resulting error.  Notice the water just abruptly stops at the cell face between Cell 1 and Cell 2.  Wedge depression doesn't always cause an error (by error, I mean RAS cannot converge on a solution within the error tolerance in 20 iteration tries).  But it did in Cell 2.  Notice Cell 4 has the same wedge depression, but it was not producing errors in this simulation (ahhh, the mysteries of HEC-RAS!).  

Fortunately, the fix for this is easy.  You draw a breakline along the ridge line so that a cell face resides on the ridge line itself.  This removes the low spot (and thus the wedge depression) in Cell 2.  the next figure shows the placement of the breakline (but before enforcement).  In this case, to preserve the spacing of the cells on the north side of the line, I specified a cell center spacing of 55 feet on the breakline (actually, I started with 40 feet, then 50 feet, but these produced the dreaded "red dots".  55 feet worked.)


After a bit more tweaking of the breakline alignment, here is the result with the breakline enforced and the wedge depression eliminated.  Notice without the wedge depression, flow is able to move more naturally towards the upper left from what used to be Cell 1.  Oh yeah...and no more nuisance cell errors!  


Yes...there's still some more fragmentation that could be addressed, but this is early on in the simulation and my objective is to ultimately present the max ws maps.  So my concern at this point in the simulation is to have decent results with fast simulation times.  I'm not concerned with little bits of fragmentation that don't throw errors.  

Monday, March 25, 2019

HEC-RAS 1D-2D Course in Atlanta, Georgia

RAS Modelers-

This class is filling up fast!  Don't wait to register!  


Please come join me in Atlanta for a 3-day informative, workshop-oriented course in Atlanta Georgia this May 7-9.  This will be a great opportunity to learn everything you need to know to get started with combined 1D-2D HEC-RAS Modeling.  Please visit here for more information and to register:





Tuesday, March 19, 2019

HEC-RAS Version 5.0.7 is now available!

Fellow RAS Users:  Please take note that a new version of HEC-RAS, Version 5.0.7, is now available to download.  This is purely a bug fix release, so there are no new (advertised) features.  You may download the new version here:





Please read the following announcement from Gary Brunner and the list of bug fixes described below.
  
             "We have released a new version of HEC-RAS called version 5.0.7 today.  This version is a bug fix only version (i.e. No new features).  Unfortunately there were some bugs in version 5.0.6 that were significant enough to warrant a new release of the software.  Enclosed are the HEC-RAS 5.0.7 release notes describing the bugs that were fixed.

                We are sorry for any inconvenience this may have caused you while using HEC-RAS.  We hope you enjoy the new version of the software.  As always, please keep us informed on any bugs you find, or your ideas for new features.  Here is the link to the HEC-RAS 5.0.7 download area of our webpage:


Warning:  A few new software checks have been added for Lateral Structures and SA/2D Hydraulic Connections.  When you run version 5.0.7 of HEC-RAS these data checks may stop your data set from running, until you address the issues listed in the error messages."


The following is a list of bugs that were found in HEC-RAS Version 5.0.6 and fixed for Version 5.0.7:

Monday, February 25, 2019

Georeferencing hard copy or pdf maps

Written by Krey Price  |  Surface Water Solutions
Copyright © The RAS Solution 2019.  All rights reserved. 

Using RAS Mapper as a GIS tool Part 3:
Georeferencing hard copy or pdf maps





Have you ever received your background data in hard copy or pdf format and wanted to view it in its georeferenced location? For this final topic in our three-part series on using RAS Mapper as a GIS tool, we'll cover the steps required to georeference a map using world files. [For additional background see the previous posts Part 1: Terrain modification and Part 2: Web imagery with world files.] 








Before you begin any georeferencing process, always check that you are using the correct projection (and confirm the desired projection with the client or end user of the data.) If you don't know which projection to use, you may need to check with the provider of your LiDAR data or other geospatial data. If your terrain file has been provided in geotif format, another option is to add the terrain file to RAS Mapper without assigning a projection, then double click on the name of the terrain, select the "Source Files" tab, and click on the "Info" button to view the GDAL metadata. The projection should show up under the "PROJCS" tag:


If you don't have the relevant projection file available, most projections (with the exception of local project grids) are available online for free download. Projections are typically catalogued according to European Petroleum Survey Group (EPSG) codes maintained by the International Association of Oil and Gas Producers. [When you think about it, it makes sense that the oil and gas industry would have a substantial interest in pinpointing global locations for exploratory wells and other critical geospatial data!]
Online repositories for projection files such as spatialreference.org include the EPSG code with each spatial reference system:


http://www.spatialreference.org


Projection files can also be copied from the prj file associated with any shape file that matches the target coordinate system. In any case, once I've got the correct prj files, I like to place it in a separate subfolder named "projection" that I create under my project directory, and then assign it a file name such as "GDA 94 MGA Zone 55 Projection.prj" that clearly distinguishes it is a projection file (as opposed to a HEC-RAS project prj file!) I also like to make sure that the projection folder includes only a single prj file so that anyone who picks up the project in the future knows the intended projection. [RAS Mapper sometimes loses the spatial reference system association and that can avoid confusion when it is re-assigned.]
Once you've confirmed that you are using the correct projection (typically by turning on web imagery and checking that it lines up with your terrain, shape files, or other geospatial data for your project) you can georeference any hard copy, scans, image files, or pdf files within the specified projection.
The georeferencing steps are covered on our new YouTube channel in this video walk-through beginning at 6:37:

https://youtu.be/5REWQ8Z_08I
Here are the steps covered in the video: 


1. For hard copies, scan your image to a raster format (commonly jpg or tif). For pdf files, use "save as" in Adobe Acrobat and select jpg (resolution can be adjusted under settings). For other file types, you may wish to use the Snipping tool that ships with Windows and save the screenshot as a jpg (best if it's on a high-resolution screen as you'll be stuck with the screen resolution and not the original source file's resolution).
2. Create a new file in Word, Notepad, Wordpad, or other text editor or word processor (or copy an existing world file and skip to Step #5).
3. Enter six lines of numerical text. Use dummy values from "original world file" column in the World File Calculator spreadsheet (available for free downloaded here) or take an initial guess at values based on the assumed coordinates of the upper left pixel.
4. Save file as plain text format (*.txt) using the same file name as the image file (select "default settings" if prompted).
5. Change file extension in Windows Explorer to *.tfw, *.jgw, *.bpw, etc. as appropriate to match your image file format (click yes if prompted with unusable file warning).




6. Under Map Layers in RAS Mapper, right-click and select "Add Existing Layer". Be sure to drag down file types to show all image files. Browse to file and select OK.
7. Using the measure tool in RAS Mapper, measure the distance between two points that are a known distance apart (preferably from a scale bar or coordinate tick marks on the map).
8. Open the World File Calculator spreadsheet (or create your own - there's really not that much to it!) and enter the measured and actual distances under Line #1 (cells D3 and E3) and again in Line #4 (cells D6 and E6).
9. Copy values from "New World File" column, open the world file in a text editor, and paste the updated values over the old values.
10. Right click on the image file and select "remove layer".
11. Re-add the image file and adjust transparency as needed.
12. Using the measure tool in RAS Mapper, click on a known point from the original image (with incorrect location), then double-click on the same known point based on the correct location.
13. Select "Copy coordinates to clipboard".
14. Paste the coordinates into Cell C10 in the spreadsheet (Note: values will be replaced in the cell range C10:F12 but only C10:D11 are used in the spreadsheet).
15. Copy "New World File" column over the previous values in the world file.
15. Remove and re-add the image file under map layers in RAS Mapper.
16. Adjust transparency as needed to confirm common points are now co-located. Measure the scale bar to confirm correct scaling.






Hopefully the first try will get you close enough for your purposes, but the process can be repeated to fine-tune the results as needed. You can also use these steps to convert geospatial data to or from a local project grid for which projection details are unavailable.


Keep in mind that these adjustments only provide a visual approximation and should be treated cautiously if the results are to be used for permitting or construction purposes. In that case, you'd want to get a surveyor on board with the proper tools to apply all of the required warping factors and address any other discrepancies. 




The full set of parameters in a projection file can get quite complex; projecting a curved surface to a flat plane comes with mathematical difficulties that have plagued mapmakers for centuries. Here's a great video explaining why all world maps are wrong.


www.surfacewater.biz/projection/




With these difficulties in mind, it is no surprise that even if you get two points to line up perfectly, a third point can still be shifted, particularly for points located a significant distance away from the alignment points. For manual georeferencing, I suggest using alignment points that are as far apart as possible for your selected zoom extent to avoid major discrepancies.
Note on rotation factors: The above steps assume that north is straight up in your hard copy or pdf map based on the applied projection (or at least close enough to straight up to suit your purposes). If not, rotation terms can be added to the world file, but in my experience this can lead to some confusion, as the pixels shift on the fly at different zoom levels.




Although rotation terms can be added to the world file by measuring the angular difference between lines drawn between two known points, my preference is to make rotation adjustments graphically before diving into any world file adjustments. Raster images can be rotated in a number of programs (Photoshop, Paintshop, Word, PowerPoint, etc.) to achieve a proper north alignment. [The "Z axis rotation" can be used in Microsoft products to apply specific sub-degree rotation factors.] The rotation terms can then remain as zero values in the world file.
We hope you have found this useful for your work. Please let us know if you have any comments or suggestions for improving these processes! Thanks for tuning in, and as always, let us know your recommendations for upcoming blog topics.



Collecting ideas for future posts: One subject we are working on for a future post is hacks for removing flow from HEC-RAS models. Internal boundary conditions are very useful for adding flow anywhere in your model, but removing flow can be a tedious process requiring a bit of creativity. Some new features coming in Version 5.1 may simplify the process, but in the meantime I've seen some clever workarounds being applied that we would like to share with this forum; please contact me if you have done this successfully so we can perhaps feature your method in an upcoming blog post.




And speaking of Version 5.1, right at the top of my wish list for HEC-RAS updates is for project files to be called *.ras files, *.hrp (HEC-RAS Project) files or any unique extension that doesn't happen to coincide with thousands of other files on my computer (in this case, of course the ESRI-format *.prj projection files). I understand the Corps may have been first in this case (calling their project files prj's well before ESRI did) but the rest of the geospatial industry is not about to change their format, so maybe HEC-RAS project files can get a unique identity in the next version - or at least a search tool within RAS that can recognize and distinguish HEC-RAS-format project files. Let us know if you agree and maybe we can turn this into a grass roots, crowd-based request!






Friday, February 15, 2019

HEC-RAS 1D-2D Course in Atlanta

Hey RAS Users-

This is a "Save the Date" notice for an upcoming 1D-2D HEC-RAS 3-day training course I'll be giving in Atlanta on May 7-9, 2019.  We'll be covering everything from setting up a 2D model, a 1D-2D combined model, RAS Mapper pre- and post-processing, viewing output, river restoration, to dam/levee breaching.  The class will consist of a mix of informative lectures focusing on practical aspects of 1D-2D HEC-RAS modeling and interactive exercises.


Come join me for a great opportunity to learn the tricks of 1D-2D modeling in HEC-RAS and to network with fellow HEC-RAS Users.

If you are interested, please follow the following link and express your interest.  We will send more details, including the venue and registration instructions as soon as they are available.






Chris Goodell
Kleinschmidt Associates
The RAS Solution