SlotWeightedAverageOverTime

Description

Computes a Series Slot's weighted average over a given time period, using another Series Slot’s values in that same time range as the weights.

Type

NUMERIC

Arguments

 

 

1

SLOT

Slot 1: the weighting slot

2

SLOT

Slot 2: the slot being averaged

3

DATETIME

Begin timestep for period of average - partially specified

4

DATETIME

End timestep for period of average - partially specified

 

DATETIME

Reference timestep

Evaluation

The partially specified begin and end timesteps are converted to fully specified timesteps using the reference timestep to complete the missing information.

The weighted average is then computed as the quotient of two summations over the averaging time period (begin timestep to end timestep):

 
Comments

For a calendar year weighting of monthly timesteps, the time arguments would be @“January”, @“December”, and @“t”

For a water year weighting of monthly timesteps, the time arguments would be @“October 31, Previous Year”, @“September 30”, @“t”.

For a monthly weighting, the time arguments would be @“DayOfMonth 1”, @“Max DayOfMonth”, @“t”.

 

 
SlotWeightedAverageOverTime(Mead.Outflow, Mead.Salt Concentration, @”January”, @”December”, @”t”)