SumAccountSlotsByWaterType

This function sums the values of all accounting slots of a given name on accounts of a given water type.

Description

The sum of slots of a given name and water type.

Type

NUMERIC

Arguments

Type

Meaning

1

OBJECT

the object on which to sum

2

STRING

the water type of accounts to sum

3

STRING

the name of the slots to sum

4

DATETIME

the date at which to sum

Evaluation

The function contains two nested loops. The outer loop iterates over all of the account types which may exist on the given object (Storage Account and/or Passthrough Account or Diversion Account). For each account type, a list is made of all of the accounts which are of the given water type.

The inner loop iterates over all of these accounts and sums the values of the slots with the given name at the given time.

Mathematical Expression

 

Comments

If the object cannot accept accounts, has no accounts, or has no accounts of the given water type, this function aborts the run with an error.

If none of the accounts of the given water type has a slot with the given name, or the slot is not a series slot, this function aborts the run with an error.

Any slots which contain a NaN at the given datetime are ignored for the purpose of summation. If all of the slots contain NaNs at the given datetime, the function forces an early termination of the calling rule.

If the given datetime argument does not land on an interval of the series slot, this function aborts the run with an error.

 
SumAccountSlotsByWaterType(%"Heron Reservoir","RioGrande","storage",
@"t")
 
71629333.443 "m3"