SumTimestepsForEachObject

This function evaluates to a list. Each item of the list is a list comprised of the object name and the sum of the slot values on that object for the time range specified.

Description

Sum a slot’s values over a time range, for each object in a subbasin.

Type

LIST {LIST {OBJECT, NUMERIC}}

Arguments

Type

Meaning

1

STRING

Subbasin name

2

STRING

slot name

3

STRING

aggregation filter ("INPUT", "OUTPUT", or "ALL")

4

BOOLEAN

time conversion option ("TRUE" or "FALSE")

5

DATETIME

start datetime

6

DATETIME

end datetime

Evaluation

A list of slots is generated by searching all of the objects in the Subbasin argument for slots which match the slot name argument. For each object, the slot’s values over every timestep in the range of the datetime arguments are summed. Any values which do not satisfy the aggregation filter argument are ignored during the calculation. If the time conversion option argument is TRUE, and the values to be summed are of the FLOW unit type, the values are first multiplied by their corresponding timestep length to convert them to values of the unit type VOLUME.

Mathematical Expression

 

 

 

Comments

If the time conversion option argument is TRUE, but the unit of the slot values is not FLOW, this function aborts the run with an error. If none of the values for a slot satisfy the aggregation filter argument, this function also aborts RiverWare with an error.

 
SumTimestepsForEachObject("upper basin", "Inflow", "ALL", TRUE,
@"October, Previous Year",
@"September, Current Year")
 
{ {%"Res1", 12.23"cms"}, {%"Reach2", 4.92 "cms"}, {%"Res2", 23.2 "cms"} }