The General tab (below) contains the following functions: Units Conversion, Set Units, Set Type, Round to Nearest Whole Number, Truncate to Whole Number, Round Off, Estimate Missing Values, Replace Specific Values, Screen Using Maximum and
Minimum, Screen Using Forward Moving Average, Merge Time Series, Merge Paired Data, and Generate Data Pairs.

Units Conversion


The Units Conversion function converts SI (metric) unit data to English units, or English unit data to SI units. The Units Conversion function may be applied to either time series or paired data sets.



To convert units for time series or paired data sets:


1. Choose the General tab of the Math Functions screen and select the Time Units Conversion operator.
2.Choose the type of conversion by clicking Convert to SI or Convert to English.
3. From the Selected Data Set list, select one or more data sets for units conversion.
4. From the Available Data Sets To Convert list you may select additional data sets for units conversion. This list is affected by the type of units conversion selected. If Convert to SI is selected, only data sets that are currently in English units will appear in the list. Similarly, if Convert to English is selected only data sets currently in SI units will appear.
5. Click Compute to perform the units conversion of the selected data sets.

Set Units


The Set Units function sets the units label in the selected data set. It will not convert the data to the new units; unless a conversion multiplier is used that correctly converts from the current units to the new units. The Set Units function is often used to change the units label in incorrectly labeled data sets.
To set units for time series or paired data sets:
1. Choose the General tab of the Math Functions screen and select the Set Units operator.
2. The current units are provided in the Units box. Enter the units label you want to set the data set to.
3. If you want to convert the data besides just setting the units label, enter the conversion multiplier.
4. From the Selected Data Set list, select one or more data sets.
5. Click Compute.
6. Save your data using the Save button.

Set Type


The Set Type function sets the type label in the selected data set. It will not convert the data to the new type; you can use an operator in the Time Functions tab for that, if appropriate. The Set Type function is often used to change the type label in incorrectly labeled data sets.


To set the type for time series data sets:


1. Choose the General tab of the Math Functions screen and select the Set Type operator.
2. From the Selected Data Set list, select one or more data sets.
3.The current units are provided in the Current Type label. Enter the type that you want to set the data set to. The type choices are:
a.PER-AVER
b.PER-CUM
c.INST-VAL
d.INST-CUM
4. Click Compute.
5. Save your data using the Save button.

Round to Nearest Whole Number


The Round to Nearest Whole Number function rounds values in a time series or paired data set to the nearest whole number.
The function rounds up the decimal portion of a number if equal to or greater than .5 and rounds down decimal values less than .5. For example:
10.5 is rounded to 11.
10.499 is rounded to 10.
-10.499 is rounded to -10.
-10.500 is rounded to -10.
-10.501 is rounded to -11.
The x-values in paired data sets are unaffected by the function, only the y-value data are rounded. For time series data sets, missing values are kept missing.
To round values in time series or paired data sets to the nearest whole number:
1. Choose the General tab of the Math Functions screen and select the Round to Nearest Whole Number 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. Click Compute.

Truncate to Whole Number


The Truncate to Whole Number function truncates values in a time series or paired data set to the nearest whole number. For example:
10.99 is truncated to 10.
10.499 is truncated to 10.
-10.001 is truncated to -10.
-10.999 is truncated to -10.
The x-values in paired data sets are unaffected by the function, only the y-value data are truncated. For time series data sets, missing values are kept missing.
To truncate values in time series or paired data sets to the nearest whole number:
1. Choose the General tab of the Math Functions screen and select the Truncate to Whole Number 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. Click Compute.

Round Off


The Round Off function rounds values in a time series or paired data set to a specified number of significant digits and/or power of tens place. For the power of tens place, -1 specifies rounding to one-tenth (0.1), while +2 rounds to the hundreds (100). For example, 1234.123456 will round to:
1230.0 for number of significant digits = 3, power of tens place = -1
1234.1 for number of significant digits = 6, power of tens place = -1
1234 for number of significant digits = 6, power of tens place = 0
1230 for number of significant digits = 6, power of tens place = 1
The x-values in paired data sets are unaffected by the function, only the y-value data are rounded. For time series data sets, missing values are kept missing.
To round values in time series or paired data sets:
1. Choose the General tab of the Math Functions screen and select the Round Off 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. In the Number Significant Digits box, set digits precision.
4. In the Power of 10s Place box, set the magnitude of 10 to which to round.
5. Click Compute.

Estimate Missing Values


The Estimate Missing Values function linearly interpolates estimates for missing values in a regular or irregular interval time series data set. Linear interpolation will occur for those portions of the time series data set where the number of consecutive missing values is within a specified user limit.


If the time series data set has type "INST-CUM", a special check box appears to optionally enable the following rules intended for cumulative precipitation:


■If the values bracketing the missing period are increasing with time, only interpolate if the number of successive missing values does not exceed the value of the user specified limit.
■If the values bracketing the missing period are decreasing with time, do not estimate any missing values.
■If the values bracketing the missing period are equal, then estimate any number of missing values.

To estimate for missing values in time series data sets:


1. Choose the General tab of the Math Functions screen and select the Estimate Missing Values 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. In the Maximum Consecutive Number of Missing box, enter a value to set the limit for consecutive missing values allowed for interpolation.
4. If the time series data set is of type cumulative precipitation, select Interpolate Cumulative Precip to apply the modified rules for the interpolation of missing precipitation data.
5. Click Compute to perform the linear interpolation fill of the missing values in the data set.

Replace Specific Values


The Replace Specific Values function replaces all occurrences of a specified value with another. For example, you can use this function to change all occurrences of "1000"" to "2000". If the data set contains precision information, then values within that precision limit will be replaced. For example, if the precision of the data set is "1" (number of digits to the right of the decimal), then a value of "12.3" will replace all values between "12.25" and "12.35". If no precision is set, the values have to be exact to be replaced (not necessarily what is shown in a tabulation). This function works on both time-series and paired data sets.
To replace specific values in time series or paired data sets:


1. Choose the General tab of the Math Functions screen and select the Replace Specific Values 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. In the Value to be replaced box, enter the value in the data sets that you want to be replaced. If you want to replace missing values, leave this box empty.
4. In the Value to replace with, enter the new number that you want to replace the specified number with. If you want the value to be replaced to be set to missing, leave this box empty.
5. Click Compute to perform the operation.

Screen Using Minimum and Maximum


The Screen Using Minimum and Maximum function screens regular or irregular interval time series data sets for possible erroneous values based on user specified minimum-maximum value limits, and maximum absolute change. The maximum absolute change is tested only when the previous time series value is screened as valid. Only one test need to be specified.


Data values failing the screening test can be assigned a user specified quality flag and/or set to a specific value or to missing. The data sets may or may not contain prior quality flags. If the user specifies setting quality flags for screened data, they will be added to the resultant data sets if none already exists.


1. Choose the General tab of the Math Functions screen and select the Screen Using Minimum and Maximum 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. In the Minimum Value Limit and/or Maximum Value Limit boxes, enter the minimum and/or maximum valid value limits, respectively.
4. In the Change Value Limit box, enter a value to set maximum absolute change allowed from the previous time series value if you want to test for this.
5. Select the Set Invalid values to checkbox and fill enter the value you want to replace with for time series values failing the screening test. To set the value to missing, leave that box empty.
6. Select the Set Quality Flag box if the data quality flag is to be set for data values failing the screening test. If this box is checked, invalid data will be flagged with the quality selected in the list to the right. The available quality settings are: R(ejected), M(issing) and Q(uestionable).
7. Click Compute.

Screen with Forward Moving Average


The Screen with Forward Moving Average function screens a time series data set for possible erroneous values based on the change from the forward moving average computed at the previous point.


Data values failing the screening test are assigned a user specified quality flag and/or are set to the missing value. The data set may or may not currently have quality flags assigned. The forward moving average is computed over a user specified number of values. Missing values and values failing the screening test are not counted in the moving average and the divisor of the average is less one for each such value.


To screen data in time series data sets:


1. Choose the General tab of the Math Functions screen and select the Screen with Forward Moving Average 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. In the Number to Average Over box, enter a value to set the size of the moving average interval.
4.In the Change Value Limit box, enter a value to set maximum absolute change allowed from the forward moving average.
5.Select the Set Invalid Values to Missing box if time series values failing the screening test are to be set to the missing value.
6. Select the Set Quality Flag box if the data quality flag is to be set for data values failing the screening test. If this box is checked, invalid data will be flagged with the quality selected in the list to the right. The available quality settings are: R(ejected), M(issing) and Q(uestionable).
7. Click Compute to apply the function to the selected data set.

Paired Data Operations


The Paired Data Operations section provides a means of performing several utility operations on paired data curves. The operations include which parameter to show on the horizontal axis, an operation to reorder points in ascending order, re-sampling the curve to contain fewer points, and swapping the parameters. Generally, only one operation should be preformed at a time.  However, if desired, the order of the operations is: 1) Reorder in ascending; 2) Delete Curve(s); 3) Re-sample; 4) Swap parameters, and 5) Setting the parameter associated with the horizontal axis. 

1)Setting the parameter associated with the horizontal axis. By default, when a paired data curve is created, the first, or independent, parameter is displayed on the horizontal axis. This is the same as the first parameter in the C Part. For some plots it may be more desirable to have the independent parameter display on the vertical axis instead of the horizontal axis. This flag does not change how data is interpreted by programs; only how it is displayed in plots and tables.

2)Reorder points to be ascending and removing duplicates. This operation will take the points in the curve and reorder them so that the primary parameter is ascending. Any duplicate primary (independent) parameter values will be removed. The function will not remove dependent parameters. If you wish to accomplish this, you should swap the parameter sets, run this function, and then swap back.

3)Resample points. This operation reduces the number of points by resampling the curve according to the number specified to skip. If the value entered is 2, then every other point will be skipped. If the value entered is 3, then 2 values will be skipped and the third kept. If the value entered is one, no points will be skipped. The first and last points will always be retained.

4)Swap parameters. This operation moves the X (independent) ordinates to the Y (dependent) position and the Y ordinates to the X position. The units and type are moved also, as well as the names in the C part. This function is only valid for data sets with one curve (one dependent parameter).

5)Delete curve. This operation will delete the specified curves from a multi-curve data set. To select curves, press the down arrow on the combination box and click on the curves that are to be deleted. Selected curves will be shown with a checkbox at the beginning. This function is not valid with single curve data sets, nor can you delete all the curves.

Note: You can also delete curves, as well as insert them, from an edit-enabled table by selecting a column and then selecting Delete Column (or Insert Column) from the Edit menu.


To modify a paired data set with these functions:


1. Choose the General tab of the Math Functions screen and select the Paired Data Operations operator.
2. From the Selected Data Set list, select one or more data sets.
3.Select the operation(s) that you want to perform. It is recommended to select only one at a time. If you select resample, enter the number of points you want the new set to correspond to. If you want to delete a curve(s), select the curve(s) from the pull down box. For multiple selections, hold down the control key when you select the curve.
4. Click Compute to perform the operation(s).

Merge Time Series

The Merge Time Series function merges data from one time series data set with another time series data set. The resultant time series data set includes all the data points in the two time series, except where the data points occur at the same time. When data points from the two data sets are coincident in time, valid values in the primary time series take precedence over valid values in the second selected time series. However if a coincident point is missing in the primary time series, a valid value in the second time series will be used for the data point in the resultant data set. If the value is missing for both time series data sets, the value is missing in the resultant data set.


The data sets for merging may be either regular or irregular time interval. The resultant data set is tested to determine if the times have a regular time interval. If not, it is typed as an irregular time interval data set.


Data of any type (i.e., "INST-CUM") or units may be merged with data of any other type or units. The resultant time series receives the data type and units of the primary time series.


To merge two time series data sets:


1. Choose the General tab of the Math Functions screen and select the Merge Time Series operator.
2. From the Selected Data Set List, select the primary time series data set.
3. From the Time Series list, select the second time series data set for merging.
4. Click Compute to merge the two data sets.

Merge works best with two time-series at a time.  Selecting more than two time series series to merge all together may give unexpected results.

Merge Paired Data


The Merge Paired Data function merges two paired data sets. The resultant paired data set includes all the paired data curves from the first data set and a single selected paired data curve or all curves from the second data set. The x-values for the two paired data sets must match exactly.


To merge two paired data sets:


1. Choose the General tab of the Math Functions screen and select the Merge Paired Data operator.
2. From the Selected Data Set list, select the primary paired data set for merging.
3. From the Paired Data list, select the second paired data set for merging.
4. From the Select Paired Data Curve list, set the curve to be merged from the second paired data set.
5. Click Compute to merge the two data sets.

Generate Data Pairs


The Generate Data Pairs function generates a paired data set by pairing values (by time) from two time series data sets. The data pairs in the paired data set may optionally be sorted by ascending x-value. An example use of the function would be to mate a time series record of stage to one of flow to generate a stage-flow paired data set.


The times in the two time series data sets must match exactly. If a value for a time is missing in either time series, no data value pair is formed and added to the paired data set.
Units and parameter type from the primary time series data set are assigned to the paired data set x-units and x-parameter type. Units and parameter type from the second time series are assigned to the paired data set y-units and y-parameter type.


To generate a paired data set by pairing values in two time series data sets:
1. Choose the General tab of the Math Functions screen and select the Generate Data Pairs operator.
2. From the Selected Data Set list, select the primary time series data set. Time series values from this data set will comprise the x-values of the resultant paired data set.
3. From the Data Set list, select the second time series data set. Time series values from this data set will comprise the y-values of the resultant paired data set.
4. Check the Sorted box if the data pairs are to be sorted by ascending x-values.
5. Click Compute.


If time points in the two time series data sets do not match exactly, an error message will be posted and the function operation will not performed.