SumFlowsToVolumeByCol and SumFlowsToVolumeByColSkipNaNs

Description

This function sums a a column of a slot’s FLOW values between a starting timestep and ending timestep and evaluates to the corresponding volume of water

Type

NUMERIC

Arguments

Type

Meaning

1

SLOT

the Agg Series Slot or periodic slot to sum

2

DATETIME

the start date

3

DATETIME

the end date

4

NUMERIC

the column (interpreted as a 0-based integral index)

Evaluation

The function loops through all of the slot values of the given column between the start and end datetime arguments. For each value, the flow is multiplied by the corresponding timestep’s length to convert it to a volume before adding it to the previous result. The function evaluates to the final result in units of "m3".

Mathematical Expression

 

Comments

If the unit type of the given column of the slot is not FLOW or if the slot is an Agg Series Slot and the starting or ending datetime argument is not defined in the slot, this function aborts the run with an error.

For the SumFlowsToVolumeByCol function, if one of the slot values in the time range is a NaN, the function forces an early termination of the calling rule. The "SkipNaNs" variation treats an invalid value (NaN) as 0.0.

For periodic slots, the dates used are those within the range and falling on a run timestep.

 
SumFlowsToVolumeByCol(Data.Coeff, @"January, 1999", @"September, 1999", 1)
 
12.231 "m3"