1 / 21

Integrating an open source dynamic river model in hydrology modeling frameworks

Frank Liu IBM Research Austin Ben R. Hodges Univ . of Texas at Austin. Integrating an open source dynamic river model in hydrology modeling frameworks.

alodie
Télécharger la présentation

Integrating an open source dynamic river model in hydrology modeling frameworks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks Simulation of Guadalupe and San Antonio River basin during a flood event with 1.3 x 105 computational nodes at 100 m resolution. On a desktop computer this runs 300x faster than real time. next 1/4 This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  2. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks next prev. 2D Catchment-based runoff models must communicate with 1D river network models, but we lack consistent simple standards for model communications. Integrated runoff/river models are limiting, because we cannot readily adopt new advances. 2/4 We have created the Simulation Program for River Networks (SPRNT) as an open source dynamic river model (Saint-Venant equations) that can communicate with a catchment model either through a simple text-based “Netlist” or through an Application Programming Interface (API). This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  3. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks SPRNT is unique in adapting methods developed in microprocessor electronic circuit design, known as Very Large Scale Integration (VLSI), to provide more rapid simulation of river networks. We are just beginning to explore the myriad of possibilities. next prev. 3/4 This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  4. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks By clicking on the boxes below you can delve a little deeper into the world of SPRNT. prev. 4/4 Simulation Program for River Networks (SPRNT) Netlist communication API communication Electric circuits and river networks Movie of model Publications This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  5. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks • Simulation Program for River Networks (SPRINT) • Fully dynamic Saint-Venant equations • Large capacity, high performance, • Full nonlinear operation with Newton-Raphson solution • Standard Preismann implicit discretization • Jacobian bypass for solution acceleration • Operation using a for simple text-based input • Operation with for integration with other models • Written in C/C++ • Open Source available on (search on SPRNT) X modular design “Netlist” API GitHub This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  6. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks X • Netlist • Similar to ideas used for semiconductor software • Advantages of text-based format: • Easy to read (for human and machine) • Easy to modify and create from different types of software • Provides a simple standard for identifying • is easy to translate from/to other models • Disadvantages of text-based format: • Data exchange through files, which can be large • Forcing terms (boundary conditions) are defined in Netlist, so updates require rewriting file circuit nodes and elements Format This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  7. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks • Application Programming Interface • A set of that other programs can use to... • Construct river network • Call SPRNT to compute steady or unsteady solutions • Obtain model results • Advantages of API • Works as “run-stop-run-stop” interface with hydrologic model • SPRNT can be hosted on a computer accessed through web, i.e. does not require tight coupling to hydrologic model. • Disadvantages of API • Requires C++ customization to interface with another model • Greater development effort to use X C++ functions nodes and elements This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  8. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks • Open source version control with Git • Gitis a software version control and management system • Written by Linus Torvalds (THE Linux guy) • Allows easy collaborative code development • “git checkout”, “git add”, “git branch” control modification • “git clone”, “git push” and “git pull” for multiple user copies • Git is easy with X GitHub “clone” This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160 John’s gitrepository “cloned” on Jane’s computer “push”,”pull”

  9. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks • Git on the GitHub • GitHub is a hosting service for Git repositories • Free for open source code • SPRNT is available on GitHub (just search GitHub for SPRNT) • “Clone” SPRNT to get compile-ready code that can be readily updated with future bugfixes • “Fork” SPRNT if you want to build something new using the code. X This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  10. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks X SPRNT Modular Design command-line run_sprnt File I/O Netlist Parser API Model Construction Steady Solve Run Controls Unsteady Solve This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160 Nonlinear Solver Linear Solver

  11. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks Nodes and elements X The continuous river must be broken into nodes and elements, connected at junctions. Communicating with a hydrological model requires translation of the 1D network of node-element-junction space to the 2D space of catchments. We use our Netlist format, but the community really needs to develop a standard! This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  12. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks Electric circuits and river networks X Electric circuits are more complex, but the dynamic equations – with backwards and forwards propagating characteristics – are more difficult to solve. 3D connections Connection network of a microprocessor electric circuit. http://visicad.eecs.umich.edu/BK/FGR Connection network of the Amazon River http://daac.ornl.gov/LBA/guides/CD06_CAMREX.html This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  13. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks b 3D circuit structure on a silicon chip Electric circuits and river networks X Electric circuits are more complex, but the dynamic equations – with backwards and forwards propagating characteristics – are more difficult to solve. 3D connections Connection network of the Amazon River http://daac.ornl.gov/LBA/guides/CD06_CAMREX.html Connection network of a microprocessor electric circuit. http://en.wikipedia.org/wiki/Standard_cell This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  14. ## model of Possum Creek; done by John Doe, P.E. ## based on survey of XYZ consulting, June 1999 defnode id=1 sr=0.0083 n=0.04 zr=707.23 hr=0.0 defxy x=0.0 y=6.0 x=2.5 y=1.0 x=3.5 y=1.0 x=6.0 y=6 end end def nodeid=2 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=1 slope=0.5 end end ...... def segment up=1 down=2 length=39.1 end def segment up=2 down=3 length=45.2 end …… defqsource location=1 timeunit=minute deftimeseries timeunit=minute t=0 v=1.0 t=10 v=1.0 end end ...... def options metric=1 end …… ## morecomments can be added Any lines starting with “#” are comments X “def … end” pairs define nodes Netlist format Complex cross-section geometry defined by xy pairs Simple trapezoidal cross-sections can be used segments: connecting nodes qsources: inflow terms Complete Netlist options: control This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  15. ## automatically generated by a translation script on Jul 12 2013 15:40:09 CDT ## ## ** one segment creek, test lateral inflow def options metric=0 end def options timestep=60 timestepunit=second end def options prtq=1 prta=1 prtdepth=1 prtsurfelevz=1 end def node id=1 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.5 end end def node id=2 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.50 end end def node id=3 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.5 end end def node id=4 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.5 end end def node id=5 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.5 end end def node id=6 sr=0.0083 n=0.04 zr=707.23 hr=0.0 def trapezoidal bottomwidth=0.1 slope=1.5 end end def segment up=1 down=2 length=40 end def segment up=2 down=3 length=50 end def segment up=3 down=4 length=60 end def segment up=4 down=5 length=70 end def segment up=5 down=6 length=80 end defqsource location=1 timeunit=minute deftimeseries timeunit=minute t=0 v=1.0 t=10 v=1.0 t=1400 v=1.0 t=2500 v=1.0 t=5000 v=1.0 end end X Netlist format Continue This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  16. deflateralsource location=2 timeunit=minute deftimeseries timeunit=minute t=0 v=1.0 t=100 v=1.0 t=200 v=2.0 t=2000 v=1.0 end end deflateralsource location=3 timeunit=minute deftimeseries timeunit=minute t=0 v=1.2 t=2000 v=1.2 end end defboundarycondition location=6 type=area deftimeseries timeunit=minute t=0 v=8 t=2800 v=8 end end def options stoptime=600 stoptimeunit=minute prtinterval=5 prtintervalunit=minute end ## ** Done X Netlist format (continued) This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  17. X #include <stdio.h> #include "base.h" #include "waveforms.h" #include "options.h" #include "subcatch.h” int main() { Subcatchment *BASIN; …. BASIN->MakeNode(1, 0.0083, 0.04, 0, 0, 0, 0, 702.23, 0, TRAP, 0.1,1.5); BASIN->MakeNode(2, 0.0083, 0.04, 0, 0, 0, 0, 670.23, 0, TRAP, 0.1,1.5); … BASIN->MakeStvEquation(4, 5, 80); BASIN->MakeStvEquation(5, 6, 80); … BASIN->MakeQrSrcEquation(0, idx1 ); BASIN->MakeQrSrcEquation(4, idx2); intrc = BASIN->TopologyCheck(); … int rc2 = BASIN->SteadySolve(120, 120, 5*OPT.Tol()); API model header files for SPRNT Used in place of Netlist to automate connections to other models a “subcatchment” object holds SPRNTdata define nodes define segments define forcing terms checking all nodes are connected Continue steady solve : initial conditions This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  18. // continued from previous page …. // the time interval is 0 to 150 BASIN->UnsteadySolve(150, 1, 25, ….); ...... WV->GetQatNode(6, &rep_val1[0]); WV->GetZatNode(6, &rep_val2[0]); ...... // now we move forward to the time point 420 sec (from 150 sec) BASIN->UnsteadySolve(420, 1, 25, ...); …… // assume we update forcing terms from 420 forward BASIN->UpdateSource(idx1, 16, …); BASIN->UpdateSource(idx2, 26, …); … // simulatefrom 420 second to 680 sec BASIN->UnsteadySolve(680, 1, 25, …); … // repeat … if (BASIN) delete BASIN; return 0; } X API model start unsteady solve Used in place of Netlist to automate connections to other models query results continue unsteady solve update forcing terms continue unsteady clean up This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  19. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks X X

  20. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks X Hodges and Liu (2014) Rivers and Electric Networks: Crossing Disciplines in Modeling and Simulation, Foundations and Trends in Electronic Design Automation 8:1:1-116 Liu and Hodges (2014) Applying microprocessor analysis methods to river network modeling, Environmental Modelling & Software, 52:234-252 Hodges (2013) Challenges in continental river dynamics, Environmental Modelling& Software, 50:16-20. Downloads at http://www.crwr.utexas.edu/hodges/papers/ email: hodges@utexas.edu This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

  21. Frank Liu IBM Research Austin Ben R. Hodges Univ. of Texas at Austin Integrating an open source dynamic river model in hydrology modeling frameworks X End of presentation This material is based upon work supported in part by the U.S. National Science Foundation under Grant No. CCF-133160

More Related