Math Functions > Time Functions


Min/Max/Avg/… Over Period

The Min/Max/Avg/… Over Period function generates a time series data set using a variety of functions from an existing irregular or regular interval time series data set.   The functions are:

 

Interpolate at end of Period

Maximum for Period

Minimum for Period

Average over Period

Accumulation over Period

Volume for Period

Integration over Period

Number of Valid Data over Period

 

where “period” is a user selected time interval to evaluate the data over.  This function is often used to compute information such as the maximum or minimum annual flow, total annual precipitation, and maximum and minimum daily temperatures.  (See remarks following regarding computing values for water years.)

 

The resulting data can be put in an irregular-interval data set.  By doing so, the date and time of each occurrence will be saved with the data.  For example, if maximum annual flows are computed, the date and time of that maximum will be provided with an irregular-interval block.  You should choose an irregular-interval block size, so that between 50 and 1,000 values are stored in a block.  Daily data results should use a block size of “IR-YEAR”.  Annual results should use a block size of “IR-DECADE”.

 

Besides choosing a standard interval, you can also select a Custom Period Interval.  This provides you the capability to compute information over a period that is different from a standard storage interval, such as two-day averages, and maximum or accumulation over 2, 5 or 10 years.  To compute using a custom interval, select Custom Period Interval and then enter an integer interval value and select the time increment for that value from the list further to the right.  The time increments include: Minute, Hour, Day, Week, Month, and Year.  If you choose a custom period interval, the results must be stored in irregular-interval data sets.

 

The data type of the original time series data governs how values are interpolated.  Data type “INST-VAL” (or “INST-CUM”) considers the value to change linearly over the interval from the previous data value to the current data value.  Data type “PER-AVER” considers the value to be constant at the current data value over the interval.  Data type “PER-CUM” considers the value to increase from 0.0 (at the start of the interval) up to the current value over the interval.  Interpolation of the three data types is illustrated below.

 


Interpolation of “INST-VAL,” “PER-AVER” and “PER-CUM” Data

 

How interpolation is performed for a specific data type influences the computation of new time series values for the selected function.  For example, if the data type is “INST-VAL,” the function Maximum for Period is evaluated by:

Referring to the plots in Figure 7.10, the Average over Period function is applied to a time series by integrating the area under the curve between interpolated points and dividing the result by the interval time.

 

Times in the new time series may be shifted (offset) from the regular interval time by a user specified offset.  As an example, the offset could be used to shift times in regular hourly interval data from the top of the hour to 6 minutes past the hour.

 

The figure below shows the appearance of the Math Functions screen for the Min/Max/Avg/… Over Period function.  

 


Screen for Min/Max/Avg/… Over Period Function

 

To compute the minimum, maximum, average, etc. of time series data sets:

  1. Choose the Time Functions tab of the Math Functions screen and select the Min/Max/Avg/… Over Period operator.
  2. Select a data set to apply the function from the Selected Data Set pull-down list at the top of the screen or multiple data sets from the list in the lower portion of the screen.  If you include the data set selected in the top Selected Data Set, the operation on that set will only be done once.
  3. From the Function Type list, select the computation to apply to the data.
  4. From the New Period Interval list or the Custom Period Interval list, select the interval period to compute values for.
  5. If you select a Custom period, enter the integer period interval and select the minute/hour/day/week/month/year time increment for that value from the list further to the right.
  6. Optionally, you may put the data in an irregular interval time series data set, which will retain the dates and times of each occurrence.  You should choose an irregular-interval Block Size, so that between 50 and 1,000 values are stored in a block.  Daily data results should use a block size of “IR-YEAR”.  Annual results should use a block size of “IR-DECADE”.
  7. Optionally, you may specify a Time Offset to offset the new points in time from the standard interval time.  For example, if you select a daily interval for the Time Interval, you may use the option to offset time points to be at 6 a.m. instead of at midnight.  If the Set Time Offset box is checked, enter an integer number in the box to the right and select the minute/hour/day/week/month/year time increment from the list further to the right.  If the Set Time Offset box is unchecked, times in the resultant data sets will fall on the regular interval time (typical setting).
  8. Click Compute.