Written by Chris Goodell, P.E., D. WRE | WEST Consultants
Copyright © RASModel.com. 2008. All rights reserved.
Here's a question I got recently:
"When interpolating cross-sectional data, HEC-RAS truncates after 4 decimal places. We have a very flat system and this is causing problems with our model because every time it truncates, there is a step discontinuity in the results which manifests itself as an instability in the energy gradient. How can I extend the precision in HEC-RAS to 6 digits after the decimal place?"
try this: Perform a datum adjustment for all the geometry (cross sections, bridges, inline structures, etc.). Adjust by a factor of 100. Or 1000, whatever works. This can be done very quickly in the geometry schematic under Tools…Datum Adjustment. So let’s say you have an invert of 5.432615 meters at River Station X. You now have an invert of 543.2615 (and all the other elevations in the geometry will change as well). You have now bought yourself another 2 decimal places to work with when you interpolate. Then after interpolating with a precision of 4 decimal points, datum shift again, by a factor of 0.01 to get back to the real elevations-make sure you maintain enough decimal points during the datum shift to avoid rounding off the extra precision you just obtained.
A potential problem is when you go to save the data. I believe RAS uses double-precision floating point numbers for elevations when storing data to internal memory (RAM)-this gives you LOT of decimal places. However, once the data is written to a file, it is reduced to a single precision number-which is limited to 7 digits and a decimal point (or 8 digits without a decimal point). So if you have an elevation of 1234.56789 ft, it will be reduced to 1234.568 when written to the geometry file. You'll also see this in the cross section editor. Values are reduced to single-precision floating point numbers. I imagine this will only be a problem if you’re working with high elevation streams. Again, this can be avoided by setting an arbitrary datum near the downstream end of the model so that smaller numbers can be used.
Copyright © RASModel.com. 2008. All rights reserved.
Here's a question I got recently:
"When interpolating cross-sectional data, HEC-RAS truncates after 4 decimal places. We have a very flat system and this is causing problems with our model because every time it truncates, there is a step discontinuity in the results which manifests itself as an instability in the energy gradient. How can I extend the precision in HEC-RAS to 6 digits after the decimal place?"
try this: Perform a datum adjustment for all the geometry (cross sections, bridges, inline structures, etc.). Adjust by a factor of 100. Or 1000, whatever works. This can be done very quickly in the geometry schematic under Tools…Datum Adjustment. So let’s say you have an invert of 5.432615 meters at River Station X. You now have an invert of 543.2615 (and all the other elevations in the geometry will change as well). You have now bought yourself another 2 decimal places to work with when you interpolate. Then after interpolating with a precision of 4 decimal points, datum shift again, by a factor of 0.01 to get back to the real elevations-make sure you maintain enough decimal points during the datum shift to avoid rounding off the extra precision you just obtained.
A potential problem is when you go to save the data. I believe RAS uses double-precision floating point numbers for elevations when storing data to internal memory (RAM)-this gives you LOT of decimal places. However, once the data is written to a file, it is reduced to a single precision number-which is limited to 7 digits and a decimal point (or 8 digits without a decimal point). So if you have an elevation of 1234.56789 ft, it will be reduced to 1234.568 when written to the geometry file. You'll also see this in the cross section editor. Values are reduced to single-precision floating point numbers. I imagine this will only be a problem if you’re working with high elevation streams. Again, this can be avoided by setting an arbitrary datum near the downstream end of the model so that smaller numbers can be used.