Application of Python Scripting Techniques for Control and Automation of HEC-RAS Simulations
Abstract
:1. Introduction
2. Methods
2.1. HEC-RAS
2.2. HECRASController
2.3. Python Scripting and Applied Modules
- (1)
- (2)
- (3)
- (4)
- (5)
2.4. General Remarks on Analyzed Examples
2.5. Applied Rules of Coding
3. Results and Discussion
3.1. Case Study—Model of a River Reach
3.2. Example 1—Basic Simulation
3.3. Example 2—Calibration of Roughness Coefficients
3.4. Example 3—Control of Sediment Simulation
4. Conclusions
Software Availability
Author Contributions
Funding
Conflicts of Interest
References
- Kachiashvili, K.J.; Melikdzhanian, D.I. Software realization problems of mathematical models of pollutants transport in rivers. Adv. Eng. Softw. 2009, 40, 1063–1073. [Google Scholar] [CrossRef]
- Zischg, A.P.; Mosimann, M.; Bernet, D.B.; Röthlisberger, V. Validation of 2D flood models with insurance claims. J. Hydrol. 2018, 557, 350–361. [Google Scholar] [CrossRef]
- Pinar, E.; Paydas, K.; Seckin, G.; Akilli, H.; Sahin, B.; Cobaner, M.; Kocaman, S.; Akar, M.A. Artificial neural network approaches for prediction of backwater through arched bridge constrictions. Adv. Eng. Softw. 2010, 41, 627–635. [Google Scholar] [CrossRef]
- Shen, D.Y.; Jia, Y.; Altinakar, M.; Bingner, R.L. GIS-based channel flow and sediment transport simulation using CCHE1D coupled with AnnAGNPS. J. Hydraul. Res. 2016, 54, 567–574. [Google Scholar] [CrossRef]
- Gibson, S.; Sánchez, A.; Piper, S.; Brunner, G. New One-Dimensional Sediment Features in HEC-RAS 5.0 and 5.1. In Proceedings of the World Environmental and Water Resources Congress 2017, Sacramento, CA, USA, 21–25 May 2017; pp. 192–206. [Google Scholar]
- Horritta, M.S.; Bates, P.D. Evaluation of 1D and 2D numerical models for predicting river flood inundation. J. Hydrol. 2002, 268, 87–99. [Google Scholar] [CrossRef]
- Rodriguez, L.B.; Cello, P.A.; Vionnet, C.A.; Goodrich, D. Fully conservative coupling of HEC-RAS with MODFLOW to simulate stream–aquifer interactions in a drainage basin. J. Hydrol. 2008, 353, 129–142. [Google Scholar] [CrossRef]
- Drake, J.; Bradford, A.; Joy, D. Application of HEC-RAS 4.0 temperature model to estimate groundwater contributions to Swan Creek, Ontario, Canada. J. Hydrol. 2010, 389, 390–398. [Google Scholar] [CrossRef]
- Brunner, G.W. HEC-RAS River Analysis System Hydraulic Reference Manual; US Army Corps of Engineers; Report No. CPD-69; Hydrologic Engineering Center (HEC): Davis, CA, USA, 2016. [Google Scholar]
- DHI. MIKE 11—A Modeling System for Rivers and Channels User Guide, DHI Software. 2003. Available online: https://www.tu-braunschweig.de/Medien-DB/geooekologie/mike11usersmanual.pdf (accessed on 10 May 2018).
- Deltares. SOBEK User Manual, Delft, The Netherlands, 2018. Available online: https://content.oss.deltares.nl/delft3d/manuals/SOBEK_User_Manual.pdf (accessed on 10 May 2018).
- Caponi, F.; Ehrbar, D.; Facchini, M.; Kammerer, S.; Koch, A.; Peter, S.; Vonwiller, L. BASEMENT System Manuals–Reference Manual, VAW–ETH, Zurich, 2017. Available online: http://people.ee.ethz.ch/~basement/baseweb/download/documentation/BMdoc-Reference-Manual-v2-7.pdf (accessed on 10 May 2018).
- Greimann, B.; Huang, J.V. SRH-1D 4.0 User’s Manual; Bureau of Reclamation: Denver, CO, USA, 2018. Available online: https://www.usbr.gov/tsc/techreferences/computer%20software/models/srh1d/index.html (accessed on 10 May 2018).
- Pappenberger, F.; Beven, K.; Horritt, M.; Blazkova, S. Uncertainty in the calibration of effective roughness parameters in HEC-RAS using inundation and downstream level observations. J. Hydrol. 2005, 302, 46–69. [Google Scholar] [CrossRef]
- Vansteenkiste, T.; Tavakoli, M.; Ntegeka, V.; De Smedt, F.; Batelaan, O.; Pereira, F.; Willems, P. Intercomparison of hydrological model structures and calibration approaches in climate scenario impact projections. J. Hydrol. 2014, 519, 743–755. [Google Scholar] [CrossRef]
- Shrestha, B.; Cochrane, T.A.; Caruso, B.S.; Arias, M.E.; Piman, T. Uncertainty in flow and sediment projections due to future climate scenarios for the 3S Rivers in the Mekong Basin. J. Hydrol. 2016, 540, 1088–1104. [Google Scholar] [CrossRef]
- Guo, A.; Chang, J.; Wang, Y.; Huang, Q.; Zhou, S. Flood risk analysis for flood control and sediment transportation in sandy regions: A case study in the Loess Plateau, China. J. Hydrol. 2018, 560, 39–55. [Google Scholar] [CrossRef]
- Dimitriadis, P.; Tegos, A.; Oikonomou, A.; Pagana, V.; Koukouvinos, A.; Mamassis, N.; Koutsoyiannis, D.; Efstratiadis, A. Comparative evaluation of 1D and quasi-2D hydraulic models based on benchmark and real-world applications for uncertainty assessment in flood mapping. J. Hydrol. 2016, 534, 478–492. [Google Scholar] [CrossRef]
- Afshari, S.; Tavakoly, A.A.; Rajib, M.A.; Zheng, X.; Follum, M.L.; Omranian, E.; Fekete, B.M. Comparison of new generation low-complexity flood inundation mapping tools with a hydrodynamic model. J. Hydrol. 2018, 556, 539–556. [Google Scholar] [CrossRef]
- Goodell, C. Breaking HEC-RAS Code. A User’s Guide to Automating HEC-RAS; h2ls: Portland, OR, USA, 2014. [Google Scholar]
- Goodell, C. Automating HEC-RAS, The RAS Solution. 2014. Available online: http://hecrasmodel.blogspot.com/2014/10/automating-hec-ras.html (accessed on 20 November 2017).
- Yang, T.-H.; Wang, Y.-C.; Tsung, S.-C.; Guo, W.-D. Applying micro-genetic algorithm in the one-dimensional unsteady hydraulic model for parameter optimization. J. Hydroinform. 2014, 16, 772–783. [Google Scholar] [CrossRef]
- Lacasta, A.; Morales-Hernández, M.; Burguete, J.; Brufau, P.; García-Navarro, P. Calibration of the 1D shallow water equations: A comparison of Monte Carlo and gradient-based optimization methods. J. Hydroinform. 2017, 19, 282–298. [Google Scholar] [CrossRef]
- Vladyman. Automating Hydraulic Analysis (AHYDRA) v. 1.0. 2011. Available online: http://ahydra.yolasite.com/ (accessed on 7 November 2017).
- Leon, A.S.; Goodell, C. Controlling HEC-RAS using MATLAB. Environ. Model. Softw. 2016, 84, 339–348. [Google Scholar] [CrossRef] [Green Version]
- Python Software Foundation. Python 2.7.14 Documentation. 2017. Available online: https://docs.python.org/2/index.html (accessed on 8 November 2017).
- Galiano, V.; Migallón, H.; Migallón, V.; Penadés, J. PyPnetCDF: A high level framework for parallel access to netCDF files. Adv. Eng. Softw. 2010, 41, 92–98. [Google Scholar] [CrossRef]
- Patzák, B.; Rypl, D.; Kruis, J. MuPIF—A distributed multi-physics integration tool. Adv. Eng. Softw. 2013, 60–61, 89–97. [Google Scholar] [CrossRef]
- SciPy Community SciPy Reference Guide. 2017. Available online: https://docs.scipy.org/doc/scipy/reference/ (accessed on 24 November 2017).
- SciPy.org NumPy. 2017. Available online: http://www.numpy.org/ (accessed on 8 November 2017).
- SciPy.org Optimization and Root Finding (scipy.optimize). 2017. Available online: https://docs.scipy.org/doc/scipy/reference/optimize.html (accessed on 8 November 2017).
- SciPy.org F2PY Users Guide and Reference Manual. 2017. Available online: https://docs.scipy.org/doc/numpy-dev/f2py/ (accessed on 24 November 2017).
- Python 2.7.15 Documentation. Available online: https://docs.python.org/2/index.html (accessed on 11 September 2018).
- Hammond, M.; Robinson, A. Python Programming on Win32; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2000. [Google Scholar]
- PythonCOM Documentation Index Python and COM. Blowing the Rest Away! 2017. Available online: http://docs.activestate.com/activepython/2.4/pywin32/html/com/win32com/HTML/docindex.html (accessed on 8 November 2017).
- Python Software Foundation. The ElementTree XML API, in Python Software Foundation. 2017. Available online: https://docs.python.org/2/library/xml.etree.elementtree.html (accessed on 8 November 2017).
- HDF Group. High Level Introduction to HDF5. 2016. Available online: https://support.hdfgroup.org/HDF5/Tutor/HDF5Intro.pdf (accessed on 24 November 2017).
- Zandbergen, P.A. Python Scripting for ArcGIS; Esri Press: Redlands, CA, USA, 2013. [Google Scholar]
- QGIS Project PyQGIS Developer Cookbook Release 2.18. 2017. Available online: http://docs.qgis.org/2.18/pdf/en/QGIS-2.18-PyQGISDeveloperCookbook-en.pdf (accessed on 26 November 2017).
- Peña-Castellanos, G. PyRAS—Python for River AnalysiS; MIT License. 2015. Available online: https://pypi.python.org/pypi/PyRAS/ (accessed on 7 November 2017).
- Vimal, S. PyFloods. Python Module for Floods. 2015. Available online: https://github.com/solomonvimal/PyFloods (accessed on 7 November 2017).
- Chow, V.T. Open Channel Hydraulics; McGraw-Hill: New York, NY, USA, 1959. [Google Scholar]
- Henderson, F.M. Open Channel Flow. Macmillan Series in Civil Engineering; Macmillan Company: New York, NY, USA, 1966. [Google Scholar]
- Abbott, M.B.; Minns, A.W. Computational Hydraulics; Ashgate Publishing: Farnham, UK, 1979. [Google Scholar]
- Cunge, J.A.; Holly, F.M.; Verwey, A. Practical Aspects of Computational River Hydraulics; Pitman Advanced Publishing Program: Boston, MA, USA, 1980. [Google Scholar]
- Wu, W. Computational River Dynamics; Taylor & Francis Group: London, UK, 2007. [Google Scholar]
- Szymkiewicz, R. Numerical Modeling in Open Channel Hydraulics. In Water Science and Technology Library; Springer: Dordrecht, The Netherlands, 2010; Volume 83. [Google Scholar]
- Leonard, B.P. A Stable and Accurate Convective Modelling Procedure Based on Quadratic Upstream Interpolation. In Computer Methods in Applied Mechanics and Engineering; North-Holland Publishing Company: Amsterdam, The Netherlands, 1979; Volume 19, pp. 59–98. [Google Scholar]
- Brunner, G.W. HEC-RAS River Analysis System User’s Manual Version 5.0; US Army Corps of Engineers; Report No. CPD-68; Hydrologic Engineering Center (HEC): Davis, CA, USA, 2016. [Google Scholar]
- Green, J.; Bullen, S.; Bovey, R.; Alexander, M. Excel 2007 VBA Programmer’s Reference; Wiley Publishing, Inc.: Indianapolis, IN, USA, 2007. [Google Scholar]
- Sandler, R. The 14 Most Popular Programming Languages, According to a Study of 100,000 Developers. Buisness Insider, 2018. Available online: https://www.businessinsider.com/14-most-popular-programming-languages-stack-overflow-developer-survey-2018-4 (accessed on 8 September 2018).
- Putano, B. Most Popular and Influential Programming Languages of 2018, Stackify. 2017. Available online: https://stackify.com/popular-programming-languages-2018/ (accessed on 8 September 2018).
- Petkov, A. Here Are the Best Programming Languages to Learn in 2018. freeCodeCamp.org, 2018. Available online: https://medium.freecodecamp.org/best-programming-languages-to-learn-in-2018-ultimate-guide-bfc93e615b35 (accessed on 8 September 2018).
- Downey, A.; Elkner, J.; Meyers, C. How to Think Like a Computer Scientist. Learning with Python; Green Tea Press: Wellesley, MA, USA, 2002; Available online: http://www.greenteapress.com/thinkpython/thinkCSpy.pdf (accessed on 8 November 2017).
- Rubalcava, R. Introducing ArcGIS API 4 for JavaScript: Turn Awesome Maps into Awesome Apps; Apress: New York, NY, USA, 2017. [Google Scholar]
- Pobuda, M. Using the R-ArcGIS Bridge: The Arcgisbinding Package. Available online: https://r-arcgis.github.io/assets/arcgisbinding-vignette.html (accessed on 11 September 2018).
- Tutorials Point NumPy. Tutorials Point (I) Pvt. Ltd., 2016. Available online: https://www.tutorialspoint.com/numpy/ (accessed on 24 November 2017).
- Press, W.H.; Teukolsky, S.A.; Vetterling, W.T.; Flannery, B.P. Numerical Recipes in Fortran 77: The Art of Scientific Computing, Volume 1 of Fortran Numerical Recipes. Second Edition, University of Cambridge. 1992. Available online: http://numerical.recipes/oldverswitcher.html (accessed on 24 November 2017).
- Tutorials Point XML. Tutorials Point (I) Pvt. Ltd., 2017. Available online: https://www.tutorialspoint.com/xml/ (accessed on 24 November 2017).
- Lundh, F. Elements and Element Trees. 2007. Available online: http://effbot.org/zone/element.htm (accessed on 24 November 2017).
- Collette, A. h5py Documentation. 2017. Available online: http://docs.h5py.org/en/latest/ (accessed on 8 November 2017).
- Dysarz, T.; Szałkiewicz, E.; Wicher-Dysarz, J. Long-term impact of sediment deposition and erosion on water surface profiles in the Ner river. Water 2017, 9, 168. [Google Scholar] [CrossRef]
- Wicher-Dysarz, J.; Dysarz, T. Analiza procesu akumulacji rumowiska w górnej części zbiornika Jeziorsko. Gospodarka Wodna 2016, 9, 292–298. (In Polish) [Google Scholar]
Data | File | Access Hierarchy | |
---|---|---|---|
Type | Name | ||
sediment sample | XML | test_sedi.s01 | Data\Bed_Gradation\Sample\Gradation |
River Stations | HDF | test_sedi.g03.hdf | Geometry\Cross Sections\River Stations |
bed elevations | HDF | test_sedi.p03.hdf | Results\Sediment\Output Blocks\Sediment\Sediment Time Series\Cross Sections\Invert Elevation |
water surface elevations | HDF | test_sedi.p03.hdf | Results\Sediment\Output Blocks\Sediment\Sediment Time Series\Cross Sections\Water Surface |
© 2018 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dysarz, T. Application of Python Scripting Techniques for Control and Automation of HEC-RAS Simulations. Water 2018, 10, 1382. https://doi.org/10.3390/w10101382
Dysarz T. Application of Python Scripting Techniques for Control and Automation of HEC-RAS Simulations. Water. 2018; 10(10):1382. https://doi.org/10.3390/w10101382
Chicago/Turabian StyleDysarz, Tomasz. 2018. "Application of Python Scripting Techniques for Control and Automation of HEC-RAS Simulations" Water 10, no. 10: 1382. https://doi.org/10.3390/w10101382
APA StyleDysarz, T. (2018). Application of Python Scripting Techniques for Control and Automation of HEC-RAS Simulations. Water, 10(10), 1382. https://doi.org/10.3390/w10101382