SumFlowsToVolume and SumFlowsToVolumeSkipNaNs

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

Description

The volume equivalent of flows over time.

Type

NUMERIC

Arguments

Type

Meaning

1

SLOT

the series or periodic slot to sum

2

DATETIME

the start date

3

DATETIME

the end date

Evaluation

The function loops through all of the slot values 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 slot argument is not FLOW or the starting or ending datetime argument is not defined in the series slot, this function aborts the run with an error.

For the SumFlowsToVolume 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 and the column used is the first column.

 
SumFlowsToVolume(Crystal.Inflow, @"January, 1999", @"September, 1999")
 
12.3023 "m3"