Skip to content

TSTool / Command / Divide


Overview

The Divide command divides one time series by another. This is useful for comparing the relative size of time series values (see also RelativeDiff). If the divisor is zero or missing, the result is set to missing. Use the Scale command to divide by a numerical value.

Command Editor

The following dialog is used to edit the command and illustrates the syntax of the command.

Divide

Divide Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:

Divide(Parameter="Value",...)

Command Parameters

Parameter            Description Default                           
TSID
required
The time series identifier or alias for the time series to be modified. Can specify using ${Property}. None – must be specified.
DivisorTSID
required
The time series identifier or alias for the time series that is the divisor. Can specify using ${Property}. None – must be specified.
NewUnits New units to assign to the output time series. Can specify using ${Property}. Original units will remain.

Examples

See the automated tests.

A sample command file to process time series from the State of Colorado’s HydroBase database is as follows:

# 2184 - DEL NORTE 2 E
2184.NOAA.TempMean.Month~HydroBase
# 5706 - MONTE VISTA 2 W
5706.NOAA.TempMean.Month~HydroBase
Divide(TSID="2184.NOAA.TempMean.Month",DivisorTSID="5706.NOAA.TempMean.Month")

The resulting graph is as follows:

Divide Graph

Results from Divide Command (see also the full-size image)

Troubleshooting

See Also