Water Accounting
User Defined Accounting Methods
The accounting calculations in RiverWare are now accessible by all RiverWare users. New functionality has been added to allow users to write methods, in the same language used for rules, that move water into and out of the accounting system. In every accounting model there has to be a way to move physical water into the accounts. For example, in a rain event a reservoir will experience hydrologic or local inflows that will increase the storage in the reservoir. Most accounting systems then have some sort of policy that describes how this water is divided among the storage accounts in the reservoir. Another example is when the physical system is experiencing losses, these losses usually have to be applied to the accounts in some specific manner. The User Defined Accounting Methods can be written and selected by the user to accomplish both of these tasks.
The Method Set Editor can be accessed by selecting Accounting->Accounting Methods from the RiverWare Workspace main menu. This will bring up a dialog box that looks similar to the Ruleset Editor.
Each of the categories listed in the Method Set Editor corresponds to a user method category on a particular object or objects. When a method is added to one of these categories, the method then shows up in the list of available user methods in that method category on every object that has that category. The user activates these methods by opening up the object and selecting the method in the appropriate category (the same way user methods are selected for simulation). If a method is selected on an object, that method should only set accounting slots (i.e. Slot Inflow and Gain Loss on particular accounts) on accounts that are on that object. However, the methods are allowed to set slots on data objects. If a method attempts to set a non-accounting slot or a slot on another object and error result.
The user can write generic methods that may be used and selected on several objects. The ThisObject variable can be used when writing methods to access slots of a particular name on whatever object is using the method at a given time. Following is an example of a simple method (this can be printed for increased clarity):
This method sets the Slot Inflow slot on the RioGrande account to the value in the Hydrologic Inflow slot. Since the ThisObject variable is used, this method can be selected on more than one object, and the name of the object that is using the method at a given time replaces the ThisObject variable.
Pre-Defined Accounting Methods
Zero Slot Inflows on Reach
The Zero Slot Inflows method in the Reach Pass Through Account Slot Inflow category now sets the Slot Inflow to zero for all accounts on the Reach object.
Multiple Supplies Between Accounts
RiverWare accounting now has the ability to model multiple supplies between the same two accounts. This is accomplished by naming an upstream account as a supply, then naming the same account again as another supply. As long as the two supplies have different names this will not be a problem. This is useful when the user needs to differentiate among the various reasons why water is being moved between the two accounts.