skip to main content
Release Notes Version 4.4
Release Notes Version 4.4
Special Attention Notes
• If the text or graphics in this file are not clear, you may need to print this document. Resolution should improve on the printed page.
• New basin-scale flood control algorithms have been implemented in RiverWare. These algorithms are described in the Flood Control section of these release notes as well as in the online help.
• RiverWare’s DMI has been significantly enhanced-- both in its functionality and in its ease of use. A brief description of these enhancements is provided later in these release notes. Users are encouraged to read the DMI Documentation in the online help for a more detailed description of the new DMI.
• The SCT has been re-implemented and enhanced. A brief overview of the new features and functionality are provided in these release notes. Users are encouraged to read the SCT Documentation in the online help for full detail.
• On the Water User, the Application Efficiency slot for the Pump Back Return Flow methods was changed from a series slot to a scalar slot. Any data previously in the Application Efficiency slot will be lost when users open and save their models in RiverWare 4.4. Users will need to re-enter a single efficiency value into the Application Efficiency slot.
• There has been a change to the lookup date on periodic slots with irregular intervals. If a lookup is done on the Periodic Slot for a date which falls exactly on an irregular interval boundary, RiverWare now always returns the lookup for the prior interval. This change could break existing rulesets. References to periodic slots at “date -1” might need to be replaced with the more natural “date”.
• Many RiverWare Solaris users have reported problems using the numeric keypad (on the right side of the keyboard). The problem on Solaris is that the key mapping used for Solaris/X11 keyboards confuses Riverware’s GUI toolkits (and those in other applications). The solution is to change the mapping of the numeric keypad keys to conform to a setup that Riverware can understand. Instructions and a script file are available on our web site, under the RiverWare user pages:
http://cadswes.colorado.edu/sponsors/
1. Log in to the RiverWare Sponsor and User pages.
2. Scroll down to the RiverWare User Information section and select “RiverWare Application Notes”.
3. Select “Numeric Keypad Fix for Solaris”and follow the instructions.
Note:  This is NOT a problem on Windows. Windows users should ignore this fix.
• A new power method, Plant Efficiency Curve method, has been added to Power Reservoirs. This method is similar to the Plant Power Calc method, except that it uses one table, Plant Power Table, instead of the four tables used by the Plant Power Calc method (Best Turbine Q, Max Turbine Q, Best Power Coefficients, and Max Power Coefficients). This allows the user to put in several efficiency points instead of just two (the best and max). The Plant Power Table is a 3-D table that relates operating head, turbine release, and power. The Plant Power Table is used to automatically generate the max and best turbine Q tables (called auto best and auto max turbine Q for this method). The Plant Power Table replaces the Power Linearization Table used in Optimization. All existing models using the Power Linearization Table will be updated automatically to change the name of the Power Linearization Table to Plant Power Table. Users should be aware that data must be entered into the table in increasing, concave blocks of the same operating head for the 3-dimensional table interpolation to work correctly. It is possible that the new concavity check may catch mistakes in the data (that the old Power Linearization Table ignored), thus causing the run to abort. Data may need to be updated to fix any non-concavity issues. See the documentation in the online help for more information on this method and the formulation of the table.
• A new predefined rules function, FloodControl, has been added to RPL. Some users’ rulesets may already have a user defined function with this same name. Though the ruleset may open, it will not load or validate. An error will be posted to notify users that the name FloodControl is not unique. Users will have to edit their ruleset to change the name of their user defined FloodControl function to some other name.
• When validating a ruleset, RiverWare now issues diagnostics about all the errors encountered all at one time. This change was necessary to check whether two functions with the same name (e.g., FloodControl) were included in the ruleset. Users may see more errors at one time than they are used to seeing.
• Users of the ResetRanDev predefined function should be aware of recent performance enhancements that do not execute RPL print statements and send them to the diagnostic output unless Diagnostics are turned on. Some users’ rulesets execute the ResetRanDev function through a print statement. ResetRanDev should now always be called from a function with arguments, not from a print statement. E.g.,
object.slot[]=IF(NOT ResetRanDev (...))
STOP_RUN “ResetRanDev Failed”
ENDIF
This will never assign any values, but will always evaluate the function call. See the ResetRanDev function in the Rulebased Simulation Documentation in the online help for more information.
RiverWare for Windows 2000 and Windows XP
RiverWare is available and supported for Windows 2000 and Windows XP (it will also run on NT but CADSWES is supporting Windows 2000 and XP). The user should be aware of the following differences that exist in RiverWare for Windows:
Differences in RiverWare for Windows
• Middle-mouse features such as QuickLink or rearranging the rows in the run analysis dialog are activated with the combination (pressed in this order): Alt + right mouse button + left mouse button. In Windows, the mouse configuration can also be changed so that middle mouse button actions are executed with the right mouse button (this would avoid the awkward sequence mentioned above).
• QuickLink can also be activated using the right-mouse button.
• The Windows DMI executable can be a DOS batch file or any other windows executable that can be run directly from a command shell.
Problems/Bugs in RiverWare for Windows
• The Locator View window often gets in a bad state when you resize the main workspace.
• It is possible that the objects may get shifted off the workspace if the workspace window is resized in certain ways. In order to make the objects visible again, you must save the model then reload it. Reloading the model will shift the model so that all objects are visible on the workspace.
Saving Model Files and Rulesets
• When saving model files or ruleset files that you intend to move between windows and unix systems, always save with the .gz extension. This saves the model/ruleset in a binary format that is the same on windows and unix.
General RiverWare
DMI
Significant enhancements have been made to RiverWare’s Data Management Interface (DMI). New functionality includes the ability to import data in the middle of a timeseries and the ability to put multiple data files in the control file. Also, users can now invoke a group of DMIs all at once with the new DMI Group feature. With the enhanced DMI, users still create their individual executables and control files, however, this process has been made easier through a new graphical user interface. The graphical user interface makes the creation of user key words much more intuitive.
The user is encouraged to consult the DMI Documentation in the online help for a more detailed description of the functionality and use of the DMI.
SCT
The System Control Table (SCT) has been enhanced and re-implemented in the Qt graphical user interface (GUI). The new SCT Configuration dialog box adds ease to and extends the capabilities of configuring the SCT. For example, users can now reverse the axis orientation of the SCT so that run timesteps are viewed either vertically (in rows) or horizontally (in columns), depending on user preference. It is also now much easier to configure the time aggregation of slots. The user is encouraged to consult the SCT Documentation in the online help for a more detailed description of the SCT and other new functionality.
When loading an existing SCT, users are now prompted to either migrate and work with the SCT in the new QT GUI format (... 2.0) or continue with the old-style format (... 1.0). Users should note that the SCT is not backwards compatible-- once a SCT is saved in the 2.0 version, it cannot be opened again in the 1.0 version. Future RiverWare releases may not support the old SCT.
Computational Subbasin
A new subbasin type, the Computational Subbasin, has been added to RiverWare. The Computational Subbasin supports computations that involve more than one object, so-called “global” solutions, though they need not encompass the entire network. A Computational Subbasin is created through the same dialogs as other typed subbasins, but it, like simulation objects, contains slots and other attributes that you can inspect and change, by “opening” the subbasin. It contains no general slots; all slots are dependent on user-selectable methods. The Computational Subbasin is instrumental to the new flood control algorithms recently implemented in RiverWare. See the Flood Control section below for more details.
Optional Elimination of Comment Lines in Exported Slots
It is now possible for users to eliminate the comment lines that are automatically generated when exporting a slot. These comment lines start with a ‘#’ and include the slot name and the scale and units of the data. This caused problems for some users’ post-processing tools. To disable comment generation in Solaris, use the ‘setenv’ command to define the following environment variable:
setenv OLD_4P2_EXPORT_COMMENT_STYLE 1
Open Object Dialog
Slot Reordering
Whenever users re-order slots in the Open Object Dialog, this ordering is automatically saved when the model is saved. Now every time a model is loaded the Open Object Dialog will display the most recent slot ordering. Users can still toggle between the object’s “Custom” slot ordering, the “Saved Object-Type” slot ordering, and the “Default” RiverWare slot ordering by pressing a column header at the top of the list view.
Plotting
Plotting Keyboard Accelerator
A keyboard accelerator has been added to plot slots from the Open Object Dialog. Highlight the desired slot and then press:
Ctrl+P
Plotting Contour Curves
RiverWare now has the capability to plot three-dimensional table slots using contours. The default behavior plots column 1 of the table slot on the x-axis, column 2 on the y-axis, and the values in column 0 as the contours. Each of these contours is plotted as a distinct curve. In the Plot TableSlot dialog box, users can toggle the “Generate Contour Curves” button and select which column to plot on each axis.
Plotting TableSeries and AggSeries Slots
Users plotting TableSeries and AggSeries slots can now select which column to plot. (Previously, RiverWare always plotted the first column.)
Scaling
RiverWare now honors the user-set slot scaling value (e.g., 1000 cfs) when plotting. The scaling value is reflected on the plot axis labels.
DateAxis Toolbar
A new DateAxis toolbar is available under the Window menu of the plot dialog. This toolbar contains a date-time spinner which will automatically re-center the plot to the specified date. The toolbar also contains a “Synch the dates on all plots” button (a calendar, clock and down arrow) which will synch all the plots to the timestep of the currently selected plot. Synch dates can also be invoked with the keyboard accelerator Ctrl+D.
Hovering Over a Plot Point Displays Information
Hovering over a plot point will now generate a tool tip with information about that point: the slot name, time, and point value.
Accounting
Several fixes have been made for plotting accounting slots. Users can now select to plot Supplies directly from the plot dialog by selecting Data >> Add Series Curve, just as they would with any other type of slot. Supplies are now plotted in user units and slot names are correctly represented in the legend. It is also now possible to plot slots from the Account Detail dialog with “File >> Plot Slot”.
AggSeries Slots on the Data Object
Users can now add AggSeries Slots to Data Objects. Under the “Slot” heading in the Open Object dialog, select “Add AggSeries Slot”. The name of each column can also be edited.
Numeric Keypad
Many RiverWare Solaris users have reported problems using the numeric keypad (on the right side of the keyboard). The problem on Solaris is that the key mapping used for Solaris/X11 keyboards confuses RiverWare’s GUI toolkits (and those in other applications). The solution is to change the mapping of the numeric keypad keys to conform to a setup that RiverWare can understand. Instructions and a script file are available on our web site, under the RiverWare user pages:
http://cadswes.colorado.edu/sponsors/RiverWare/AppNotes/
• Log on as user: rwuser and password: Zanskar
Note:  This is NOT a problem on Windows. Windows users should ignore this.
Synchronizing With Run Control
Exclude Slots with Different Timestep from Run
When synchronizing objects with the Run Control, users now have the option to exclude slots that have a different timestep than that of the Run Control. This option may be useful, in particular, to retain data stored in Data Objects.
End of Run Diagnostic
RiverWare now displays a green diagnostic at the end of a run. The diagnostic will state whether the run finished, aborted, or was stopped. The diagnostic will also display the number of seconds elapsed since the run was started.
Periodic Slot
Change to Lookup Date on Periodic Slots with Irregular Intervals
If a lookup is done on the Periodic Slot for a date which falls exactly on an interval boundary, RiverWare returns the lookup for the prior interval. This was always true for Periodic Slots with regular intervals, the behavior has been added to consistently work for Periodic Slots with irregular intervals.
NOTE: This change could break existing rulesets. References to periodic slots at “date -1” might need to be replaced with the more natural “date”.
Horizontal Scrollbar
The Periodic Slot now has an “automatic” horizontal scroll bar that appears when the window isn’t wide enough to display all the columns. The minimum height of the slot is set to approximately three lines.
Inverse Interpolation
The inverse interpolation on periodic slots (given a date and a table value, return the appropriate column map value) has been re-implemented. The new behavior orders the interpolations consistently, thus fixing any inconsistencies in forward and backward interpolation.
NOTE: This change could potentially cause numeric differences in models with methods which use inverse interpolation on a periodic slot or in models with rulesets that call this function directly by calling getColumnValue.
Simulation Objects
The following enhancements to the RiverWare simulation objects are described briefly. The user is encouraged to consult the Simulation Objects Documentation in the online help for more detailed descriptions of the enhancements to the objects and their methods.
Canal Object
Canal Flow Table Method
A new method, Canal Flow Table, has been added to the Canal Flow Calculation category of the Canal object. This method is general and solves for any canal flow that can be described using the Canal Flow Table. This method takes the average pool elevation of the lower Reservoir and the difference in average elevation between the two Reservoirs and uses linear interpolation to determine Canal Flow from the Canal Flow Table.
Control Point Object
Include Locals in Outflow Category
A new method category called Include Locals in Outflow was added to the Control Point object. The two methods in this category, Locals Included in Outflow and Locals Not Included in Outflow, allow flexibility in the use of specific local flow data. In most cases, the default method, Locals Included in Outflow, is the appropriate method. However, for basins in which local flow data is reported cumulatively (e. g., in the Army Corps of Engineers Southwest Division), users can choose the Locals Not Included in Outflow method which allows the local inflow to be excluded from the system until a reservoir object is reached, thus providing an accurate calculation of the total inflow to the reservoir.
Regulation Discharge Methods
The Regulation Discharge methods are part of the new flood control algorithms now available in RiverWare. These methods determine the regulation discharge, meaning the maximum flow that is allowed in the channel at the control point, for each timestep in the specified forecast period. See the Flood Control section below for details of the Regulation Discharge methods.
Key Control Point Balancing Methods
The Key Control Point Balancing methods are part of the new flood control algorithms now available in RiverWare. Selection of a method in this category makes a control point a key control point and allows for the balancing of storage in the associated reservoirs with respect to the empty space available in the channel at the control point (available space is determined by the Regulation Discharge methods). Calculations for these methods are actually initiated from a flood control method selected on a computational subbasin that includes the control point. For details on these methods as well as other flood control related methods, see the Flood Control section below.
Change to the Forecasting Methods
In the Generate Forecast Inflows methods (Geometric Recession and Exponential Recession), it is now no longer necessary to include data in the Deterministic Inflow slot past the end of the run. Previously, because the period of perfect knowledge could extend past the end of the run, users were required to enter deterministic inflow data for the number of timesteps in the period of perfect knowledge past the end of the run. Now, if this data is not entered, the Local Inflow values past the end of the run are assumed to be zero. If the data is entered, the method will work in the same way it always has (i. e., use the Deterministic Inflow data to determine the Local Inflow values past the end of the run).
Pipeline Object
A new object, the Pipeline object, was added to RiverWare. This object solves for outflow given inflow or inflow given outflow.
Pipeline Solution Direction Category
The pipeline solution direction category contains two methods (Solve Upstream or Downstream and Solve Downstream Only) to allow users to specify the direction the Pipeline solves. The default method, Solve Upstream or Downstream, should remain selected for basic Simulation. In Rulebased Simulation, however, the user may need to limit the Pipeline to downstream solution only. In this situation users can select the Solve Downstream Only method.
Reach Object
Step Response Routing Method
A new routing method, Step Response, has been added to the Reach object. This method uses inflow values and lag coefficients to calculate the outflow for the current timestep, as well as future timesteps. The total number of outflows computed will equal the number of lag coefficients. The general outflow calculation for this method is the same as that for the Impulse Response Routing method. The difference is that with the Step Response Routing method the outflow is calculated for the current timestep and future timesteps. The Impulse Response Routing Method calculates outflow for the current timestep only.
Change to the Forecasting Methods
In the Generate Forecast Inflows methods (Geometric Recession and Exponential Recession), it is now no longer necessary to include data in the Deterministic Inflow slot past the end of the run. Previously, because the period of perfect knowledge could extend past the end of the run, users were required to enter deterministic inflow data for the number of timesteps in the period of perfect knowledge past the end of the run. Now, if this data is not entered, the Local Inflow values past the end of the run are assumed to be zero. If the data is entered, the method will work in the same way it always has (i. e., use the Deterministic Inflow data to determine the Local Inflow values past the end of the run).
Reservoir Objects
Surcharge Release Category and Methods
A new method category, Surcharge Release, has been added to all Reservoir objects. The Surcharge Releases methods, together with the new Regulation Discharge methods, Key Control Point Balancing methods and Flood Control Release methods, are based on US Army Corps of Engineers flood control algorithms. All these methods are, however, designed to be generic and could potentially be used for flood control in any river basin. The Surcharge Release methods determine mandatory releases made when the reservoir is in the surcharge pool. These methods are executed only when the Reservoir’s Outflow slot is set with the Surcharge Release (S) flag. This flag can only be set by a rule. The Surcharge Release method category contains four new methods: Flat Top Surcharge, Induced Surcharge Curve, Pass Inflows, and Specified Surcharge. Brief descriptions of these methods follow:
The Flat Top Surcharge method is based on US Army Corps of Engineers Southwest District algorithms. The method determines the surcharge releases for the forecast period to prevent overtopping of a reservoir. The name of this method comes from the process of computing releases during the forecast period to flatten the flood wave peak as it comes through the reservoir by making some anticipatory releases. This approach aims to prevent excessively large inflows from creating equally large releases by extending the time period over which these inflows are released.
The Induced Surcharge Curve method follows the procedure used by the US Army Corps of Engineers Kansas City office to determine surcharge releases during a forecast period for reservoirs with tainter gates. This method determines a surcharge release (and gate opening) for each timestep in the forecast period.
The Pass Inflows method is designed to pass the inflows to the reservoir whenever the pool elevation enters the surcharge pool. If the inflows cannot be passed (due to the physical limitations of the outlet works) the surcharge release is set equal to the max outflow. Then the gates remain open until the surcharge pool is evacuated.
The Specified Surcharge method is used to compute the surcharge release based on a user specified value. As always, the surcharge release is limited to the physical maximum outflow from the reservoir.
Flood Control Release Calculation Category and Methods
The new Flood Control Release Calculation method category holds two flood control release methods, Operating Level Balancing and Phase Balancing. These methods work together with the methods selected on a computational subbasin and the predefined FloodControl rule function. Selecting a Flood Control Release Calculation method on a reservoir actually sets up dependent slots to be available for use by the predefined FloodControl rule function. The same method must also be selected on the computational subbasin of which this reservoir is a member. The Operating Level Balancing and Phase Balancing methods are described in the Flood Control section below.
Changes to the Forecasting Methods
The Geometric Recession and Exponential Recession forecast methods now set the Hydrologic Inflow Forecast slot instead of the Hydrologic Inflow slot. This change was necessary to enforce proper dispatching. The Coefficient and Exponent Hydrology method on the Reservoir object and analagous methods on the Reach and Control Point objects remain unchanged.
In all the Generate Forecast Inflows methods (Geometric Recession, Exponential Recession, and Coefficient and Exponent Hydrology), it is now no longer necessary to include data in the Deterministic Hydrologic Inflow slot past the end of the run. Previously, because the period of perfect knowledge could extend past the end of the run, users were required to enter deterministic hydrologic inflow data for the number of timesteps in the period of perfect knowledge past the end of the run. Now, if this data is not entered, the Hydrologic Inflow Forecast values past the end of the run are assumed to be zero. If the data is entered, the method will work as it used to: use the Deterministic Hydrologic Inflow data to determine the Hydrologic Inflow Forecast values past the end of the run.
Plant Efficiency Curve Power Method
A new power method, Plant Efficiency Curve method, has been added to Power Reservoirs. This method is similar to the Plant Power Calc method, except that it uses one table, Plant Power Table, instead of the four tables used by the Plant Power Calc method (Best Turbine Q, Max Turbine Q, Best Power Coefficients, and Max Power Coefficients). This allows the user to put in several efficiency points instead of just two (the best and max). The Plant Power Table is a 3-D table that relates Operating Head, Turbine Release, and Power. The Plant Power Table is used to automatically generate the max and best turbine Q tables (called auto best/max turbine Q for this method).
NOTE: The Plant Power Table replaces the Power Linearization Table used in Optimization. All existing models using the Power Linearization Table will be updated automatically to change the name of the Power Linearization Table to Plant Power Table. Users should be aware that data must be entered into the table in increasing, concave blocks of the same Operating Head for the 3-dimensional table interpolation to work correctly. It is possible that the new concavity check may catch mistakes in the data (that the old Power Linearization Table ignored) thus causing the run to abort. Data may need to be updated to fix any non-concavity issues. See the documentation in the online help for more information on this method and the formulation of the table.
Water User Object
Additions/ Changes to Pump Back Return Flow Method
Two new slots, Non Applied Water and Project Efficiency, have been added to the Water User object when the Pump Back Return Flow method is selected. The method computes Non Applied Water as a function of Diversion, Incidental Depletions, Irrigated Area, Application Efficiency, and Project Efficiency. Return Flow and Depletion are now functions of Non Applied Water. The Non Applied Water slot can be either user input or set by Rules. The basic structure of the Pump Back Return Flow method remains unchanged.
Also, the Application Efficiency slot was changed from a series slot to a scalar slot. NOTE: Users will need to re-enter a single efficiency value into the Application Efficiency slot.
Flood Control
Overview of Flood Control Algorithms
RiverWare has a new capability to execute basin-scale flood control algorithms on a computational subbasin. A flood control method is selected on the computational subbasin in the Flood Control method category. It is invoked by the new predefined rule function FloodControl(). Reservoirs and Control Points in the subbasin each have corresponding methods for flood control that should be selected consistently with the Computational Subbasin method.
Two Flood Control methods are available in this release. Both are basin-scale methods that calculate flood control releases from all reservoirs in the subbasin that are in the flood pool with the objectives of:
• maintaining a balance among the reservoir storages as prescribed by the specific method;
• avoiding flooding at downstream control points;
• calculating releases that empty the flood pools as soon as possible within a user-specified forecast period while maintaining constraints on increasing and decreasing releases.
Both the new Flood Control methods are based on US Army Corps of Engineers flood control algorithms. The Operating Balancing method is based on the Southwest Division SUPER program’s flood control algorithm. The Phase Balancing method is based on the flood control policy used by the Kansas City District. Both methods have been implemented in RiverWare as general methods that could potentially be used for flood control in any river basin. These Flood Control methods are still under development. Users who may interested in the new Flood Control methods should contact CADSWES before implementing them in their models.
A summary of how to use the new Flood Control methods is described in the next paragraphs. See the Simulation Objects Documentation and the Rulebased Simulation Documentation in the online help for details.
Model Configuration for Flood Control
In order to use the Flood Control methods, an existing RiverWare model should be configured as follows:
1. Add Control Point Objects to the points in the network where channel capacity limits the flood control releases.
2. Create a Computational Subbasin through the Edit SubBasins dialog on the Workspace menu. Include in the subbasin all objects that are part of the reservoir and river network, including the Control Points. All objects on the network must be linked and no loops may exist.
3. Select a Flood Control Method on the Subbasin. Select methods for all dependent method categories that appear when the Flood Control method is selected. Provide all input data required on the slots on the Computational Subbasin associated with the Flood Control method selected. See the Computational Subbasin Documentation for details about the methods and their input requirements.
4. Provide forecasted inflows (forecast the flood event). The inflows over the forecast period can be provided as Local Inflows to Reaches and Control Points and as Hydrologic Inflows to Reservoirs. You can forecast at some or all of these points. On each of these objects, select Forecast Local Inflows method under the Local Inflow Calculation or Hydrologic Inflow Calculation Category, then select the forecasting method you would like to use under the Generate Forecast Inflows Category. Provide data as needed to forecast the inflows at the control point. See each object’s documentation for details.
5. At control points, select the Regulation Discharge Method according to your policy. Select the Key Control Point Balancing method consistent with the Flood Control method you selected on the Subbasin and according to the regulation implemented at that control point. Flooding Exception and Sag Operation can also be selected. Provide input data as required for each method selection. See the Control Point documentation for details.
6. On Reservoirs, select the same method in the Flood Control Release Calculation category that you chose on the Computational Subbasin. Some data like forecast period can be propagated automatically to all reservoirs. See the Computational Subbasin documentation for details. Provide data as needed by the method selected. See specific Reservoir object documentation for details.
Note:  Sloped Storage Reservoirs cannot be included in a subbasin using the current selection of Flood Control methods because both methods require a unique relationship between Storage and Pool Elevation.
7. On Reservoirs, select a method for Surcharge Release. This method releases water in the Surcharge Pool that is not subject to downstream channel constraints. Provide data as needed by the method selected. See the Reservoir object documentation for details.
Execution of Flood Control Algorithm in Simulation
The new flood control algorithms are designed to be executed by rules. Following is a description of how the many parts of the flood control algorithm are executed in order at each timestep. See the documentation for each object for further details.
• During execution of the Beginning of Timestep routines on the Reservoir, Control Point and Reach objects, the selected Inflow Forecasting methods are executed, setting the Hydrologic Inflow Forecast slot for all timesteps in the Forecast Period, beginning with the current simulation timestep. The objects do not dispatch as a result of the setting of the Hydrologic Inflow slot.
• Lower priority rules execute and simulation propagates the results until the flood rules are next on the agenda.
• The first set of flood rules to execute sets the Surcharge Release Flag (S) on the Outflow slot of each Reservoir in the computational subbasin. A separate rule sets the Surcharge Release Flag on each Reservoir starting with the upstream reservoirs and continuing downstream. The simulation after each rule execution dispatches the Reservoir. The Surcharge Release Flag is interpreted as an input, so the reservoir executes the solveMB_givenInflowOutflow. As the dispatch method is being executed, the Surcharge Release Flag is detected and the object executes the selected surcharge release method. The surcharge releases are computed for the entire forecast period. These surcharge releases are set in the surcharge release slot. Also, the outflow slot is set equal to the surcharge release slot. After surcharge calculations are completed, the Surcharge Release Flag is removed from the current controller timestep so that surcharge releases will not be recomputed on subsequent dispatches. When the reservoir solves, it routes its surcharge releases down to the next reservoir before it (the downstream reservoir) computes surcharge releases.
• The next rule sets the Regulation Discharge (G) flag on the Reg Discharge Calculation slot on each Control Point in the Computational Subbasin for the current timestep. Setting this flag results in execution of the dispatch method which in turn executes the selected Regulation Discharge method and any dependent methods (such as Balance Level) on the Control Point. After execution, the regulation discharge flag is removed so that regulation discharge will not redispatch unless this flag is reset by a rule. After executing the selected Regulation Discharge method, the dispatch method checks to see if outflow has changed from its previous value. If it has not, the outflow slot is not reset using the regulation discharge rule priority. This prevents the regulation discharge rule priority from propagating downstream and triggering unnecessary and, in some cases, undesirable resolving.
• Lastly, a single rule invokes the predefined FloodControl() function on the subbasin. The function executes the selected Flood Control method on the Computational Subbasin. The function returns values for Outflow and Flood Control Release for each reservoir in the computational subbasin at the current controller timestep. The rule then sets the Flood Control Release and Outflow slots on each reservoir (outflow is the sum of flood control release and surcharge release). The setting of outflow triggers each reservoir to dispatch with the solveMB_givenInflowOutflow dispatch method. Nothing out of the ordinary happens in the dispatch method as a result (it doesn’t matter that we’re dispatching as a result of flood control, the object dispatches as it normally would when getting a new outflow).
Rulebased Simulation
Hypothetical Simulation
New Argument
A new argument has been added to each of the hypothetical simulation functions. This argument indicates the number of timesteps before and after the current timestep which might be involved in the simulation. Hypothetical simulation involves making copies of all the objects in the subbasin and this new argument is used to determine how much data should be copied from each object. Users should set this argument equal to the number of timesteps before and after the current timestep which they would like to be considered in the hypothetical simulation. If no value is assigned to this argument, RiverWare will use a heuristic scheme to automatically assign a reasonable value to this argument the first time a ruleset is loaded in RiverWare version 4.4. For further detail on how this argument is used in hypothetical simulation, see the hypothetical simulation predefined functions in the Rulebased Simulation Documentation in the online help.
Rules Palette Predefined Functions
Following is a brief description of changes to the rules palette predefined functions available for use in the RiverWare Policy Language for writing rules. Details on the use of these functions and the syntax involved are available in the Rulebased Simulation Documentation in the online help.
FloodControl
The new FloodControl predefined function invokes the selected Flood Control method on a computational subbasin. For each reservoir in the subbasin, two pairs are returned: one for the Outflow slot and one for the Flood Control Release slot on the reservoir.
Change to SumSlotsInARange
The “Sum Slots in a Range” predefined function now uses the timestep of the slot instead of the timestep of the model (i.e., controller timestep) when converting values. This change was made because the slot could be on a data object and have a different timestep than that of the model.
ResetRanDev
The execution of the ResetRanDev predefined function in some users’ rulesets could be affected by recent performance enhancements. These performance enhancements do not execute RPL print statements and send them to the diagnostic output unless Diagnostics are turned on. Some users’ rulesets currently execute the ResetRanDev function through a print statement. ResetRanDev should now always be called from a function with arguments, not from a print statement. E.g.,
object.slot[]=IF(NOT ResetRanDev (...))
STOP_RUN “ResetRanDev Failed”
ENDIF
This will never assign any values, but will always evaluate the function call.
The ResetRanDev function is used to initialize internal data structures which permit the RanDev function to return a pseudo-random sequence of numbers. See the ResetRanDev function in the Rulebased Simulation Documentation in the online help for more information.
Rules Palette Buttons
New Regulation Discharge Flag Button
A button has been added to the Rules Palette to set the new Regulation Discharge flag (G). Regulation Discharge and its dependent methods are executed when the Regulation Discharge flag is set for a timestep on the Reg Discharge Calculation slot on a control point. The Regulation Discharge method calculates the maximum flow allowed in the channel at the control point as calculated by the flood control releases. This calculation dictates the total water that could be released from all the reservoirs upstream as a result of flood control operations.
New Surcharge Release Flag Button
A button has been added to the Rules Palette to set the new Surcharge Release flag (S) for flood control. Setting the surcharge release flag on a Reservoir’s Outflow slot allows the surcharge release methods to be executed. The selected Surcharge Release method calculates the releases out of the surcharge pool that are not subject to downstream channel constraints.
RPL Units
Several units have been added to the list of RPL units to make the list consistent with those units available in Simulation. The units of million gallons per day (mgd), mega liters (ML), giga liters (GL) and liters (liters) have been added to the list of RPL units.
Rules Analysis Dialog
Close Window Keyboard Accelerator
A keyboard accelerator has been added to close the Rules Analysis Window:
CTRL+W
Setting Specific Columns on the AggSeries Slot with a Rule
It is now possible to set specific columns of an AggSeries Slot with a rule. Previously it was only possible to set the first column of an AggSeries Slot with a rule. This new functionality may be particularly useful now that the Data Object supports AggSeries Slots. Users can specify the column by adding column number information to the rule (e.g., object.slot[<date>, <column number>]). If the column number is not specified, the first column will be set.
Accounting
New Accounting Method on the Reservoir Object
A new method, Elephant Butte Loss with RG Compact, was added to the Storage Account Gain Loss method category on the Reservoir object. This method is specific to accounting in the Rio Grande model. This new method is similar to the Elephant Butte Loss Calculation method. The difference is that when the old method is selected, the Rio Grande GainLoss is distributed only to accounts with a positive storage. If the new method is selected, the Gain Loss is distributed to all accounts, regardless of whether or not the storage is negative.
Change to Existing Storage Account Gain Loss Methods on the Reservoir
The Elephant Butte Loss Calculation and El Vado Loss Calculation methods in the Storage Account Gain Loss category on the Reservoir object have been updated to consider multiple Rio Grande accounts. These methods are specific to accounting in the Rio Grande model. The gain loss calculation is done in the same manner as before except that now it distributes the Gain Loss value proportionally (based on storage) among all Rio Grande accounts rather than assigning the Gain Loss to only one Rio Grande account. Also, these Loss Calculation methods now take into account any transfers between two Rio Grande accounts.
Closed Bug Reports
The following is a list of the bugs which were fixed for this release. If you wish to view the details for a specific bug, please browse to http://cadswes.colorado.edu/users/gnats-query.html and search our bug database. You will need a RiverWare user login and password.
 
2819
3091
3303
3305
3312
3313
3314
3317
3318
3321
3322
3326
3327
3328
3329
3330
3339
3340
3341
3342
3342
3343
3343
3344
3346
3347
3351
3353
3354
3355
3356
3357
3358
3364
3365
3366
3367
3368
3369
3370
3371
3372
3375
3376
3382
3384
3386
3387
3295
3310
3332
3335
3336
3350
3373
3375
3379
3380
3384
3389
3392
3393
3395
3397
3399
3400
3405
3409
 
 
 
Revised: 06/03/2019