RiverWare

a screenshot of a riverware workspace showing part of a model with map in the background

RiverWare is a river system modeling tool. It is an ideal platform for operational decision making, responsive forecasting, operational policy evaluation, system optimization, water accounting, water rights administration and long-term resource planning. This wide range of applications is made possible by a choice of computational timesteps ranging from one hour to one year.

RiverWare has the capability to model:

  • Hydrology and hydrologic processes of reservoirs, river reaches, diversions, distribution canals, consumptive uses, groundwater interaction and conjunctive use
  • Water quality, including total dissolved gas (TDG), dissolved oxygen (DO) and temperature
  • Hydropower production and energy uses
  • Water rights, water ownership and water accounting transactions

RiverWare鈥檚 object-oriented, data-centered approach enables the modeler to represent site-specific conditions by creating a network of simulation objects, linking them together to form the river/reservoir network, populating each with data, and selecting physical process algorithms on each object that are appropriate to the purposes of the object and its representation in the overall model. For example, there are numerous methods for routing flow in river reaches, for evaporation calculations and for computing the hydropower generated.

RiverWare鈥檚 palette of objects includes:

  • Reservoirs鈥攕torage reservoir, hydropower reservoir, pumped storage reservoir 聽
  • River reach
  • Confluence
  • Bifurcation
  • Stream gauge
  • Inline power plant
  • Inline pumping plant
  • Diversion
  • Distribution canal
  • Bidirectional canal
  • Water user and aggregated water user
  • Control point
  • Groundwater element
  • Pipeline
  • Hydropower economic unit
  • Data object

The model simulates by solving the governing equations on each object and propagating values via links. Rulebased simulation provides a means for simulation driven by logical policy statements rather than explicitly specified input values for operations such as reservoir releases, storages, diversions, and so on. In general, the operating policies, called rules, contain logic for operating the system based on hydrologic conditions, time of year, demands and numerous other considerations.

The operational policy is expressed in the RiverWare Policy Language (RPL), an interpreted language developed for and exclusive to RiverWare. A rule is constructed in a syntax-directed editor that accesses a palette containing these elements. The rule set is a collection of prioritized rules that as a whole define the operating policy of the river system. The entire rule set is applied at each timestep in the model. The solution of the rulebased simulation run includes information about how the final results were affected by various policies.

RiverWare鈥檚 optimization solution is a linear, preemptive goal programming algorithm that finds a globally optimal solution for all objects at all timesteps based on a prioritized set of user-specified objectives. Preemptive linear goal programming successively applies the prioritized objectives. Each objective is optimized in order and then constrained to its optimal value. Thus, a high-priority objective is never sacrificed for a lower one. Sets of constraints are converted to a single objective to minimize the deviation from the constraints. This approach avoids inconvenient infeasibilities. RiverWare provides linearizations for nonlinear variables. The objectives and constraints are formulated in the RPL syntax-directed editor. The software formulates the optimization problem (one for each prioritized goal) and sends it to the solver. RiverWare employs IBM CPLEX, a robust third-party solver.

Optimization is especially useful for optimizing the value of hydropower production鈥攊t can trade off the value of producing power at one timestep with storing water and producing power at another time. The value of power is a prioritized objective, balancing other water-related objectives, such as flood control and environmental flows.

Water ownership is modeled in RiverWare via a network of account objects that are associated with the simulation objects on the workspace. The accounting network of objects keeps track of the 鈥減aper water鈥 as distinct from the 鈥渨et water鈥 modeled by the simulation objects. The ownership, water type and other user-defined attributes of water ownership are tracked through the network of objects; at each object at each timestep, it is possible to view the water accounting data. A separate view of the RiverWare workspace is available to view the accounts on objects and their linkages.

There are three types of legal accounts, each of which tracks the necessary aspects of the legal water right:

  • Storage account in a reservoir
  • Diversion account that removes water from a River Reach to a water user object
  • Instream flow account, which keeps track of instream flow rights

In addition, pass-through accounts account for the paper water as it moves through the river network from one legal account to another. Transfers between accounts are executed by user input or by rules in combination with the rules that drive the operations. Accounts keep track of accruals, carryover and constraints on their allocations. Exchanges are tracked through an exchange manager.

Priority water rights allocations are executed by a rule function that solves the global problem of allocating water designated as 鈥渁llocatable flow鈥 according to priority dates for storage rights, diversion rights and instream flow rights. The solver visits all water rights (storage, diversion and instream flow rights) that are linked to that supply chain in priority order as described above. The solver finds the allocation and returns the entire set of values to the rule. In doing so, the solver considers legal constraints, such as annual accrual limits and daily maximum diversion rates, as well as physical constraints, such as size of conservation pool and size of diversion structure.

Several major river systems in the Western U.S. use RiverWare for water rights allocation and for official water accounting.

For planning studies that consider risk and reliability, it is necessary to make many runs and use the aggregated results from all the runs to get probabilistic output, much like a Monte Carlo simulation. RiverWare includes a utility called Multiple Run Management (MRM) that sets up and executes multiple runs automatically and sends the results to output files that can be analyzed by postprocessing programs. Using MRM, the user can make many runs over a planning horizon, using many traces of stochastically generated hydrologic inputs. MRM exports the results of the runs to one or more files in RiverWare Data Format (RDF). Then, postprocessing analysis programs can import the RDF files and generate probabilistic information about the occurrence of certain events or the effectiveness of proposed operating policies.

Another application of automated multiple runs allows logic to change inputs to successive runs and check the outputs. This can be applied with a simple search algorithm that can, for example, solve a yield analysis problem for a reservoir: search for the demand from the reservoir that results in exactly depleting the conservation pool over the period of record hydrology. This feature has also been used to execute a heuristic optimization algorithm in which the optimal value is found via a search procedure.

The System Control Table (SCT) is a spreadsheet-like view of the data in selected timeseries slots. The table displays either timesteps as column headings and slot names as row headings, or vice versa. The data can be displayed in an aggregated view鈥攆or example, hourly timestep values displayed as daily values. The user may specify the type of aggregated value (sum, average, first, last, etc.). The SCT allows RiverWare to be used in an operational setting because it provides quick access simultaneously to all the relevant information in the model. In addition, values can be input directly into the SCT (input values are flagged and can be distinguished), and model runs can be initiated directly from this interface. The SCT provides numerous special features such as copy and paste, plotting, printing and customization of the display.

The data management interface (DMI) includes direct data connections that map data directly to or from the Reclamation Hydrologic Database (HDB), USACE Data Storage System (DSS) and Excel workbooks. In addition, the 鈥渃ontrol file鈥 DMI executes user-defined external routines to access virtually any other database or other data source. The DMIs can also perform other model initialization tasks, such as moving the run control time forward. A common use of the DMI is to initialize models for daily operations by running a suite of DMI routines that import initialization data, such as initial reservoir storages, forecasted flows, hydro unit generator availabilities and firm power commitments. The DMI is also used for exporting data after a run to tailor reports or postprocessing tools.

The Scenario Manager offers a structure in which modelers can set up a 鈥渨hat-if鈥 scenario framework, in which specified input variables can be modified and specified output variables can be viewed. Stakeholders can utilize the framework to view how variations in inputs affect outputs. New 鈥渨hat-if鈥 scenarios can be created by the stakeholder and executed and compared with the designated baseline run. Scenarios can be saved and shared with other users.