TSTool / Command / Scale
Overview
The Scale
command scales each non-missing value in the specified time series.
The value to use for scaling can be specified as a constant,
monthly values, or special values that indicate to scale by the number of days in the month.
Command Editor
The command is available in the following TSTool menu:
- Commands / Manipulate Time Series
The following dialog is used to edit the command and illustrates the syntax of the command.
Scale
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
Scale(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
TSList |
Indicates the list of time series to be processed, one of:
|
AllTS |
TSID |
The time series identifier or alias for the time series to be processed, using the * wildcard character to match multiple time series. Can be specified using ${Property} . |
Required if TSList=*TSID |
EnsembleID |
The ensemble to be processed, if processing an ensemble. Can be specified using ${Property} . |
Required if TSList=*EnsembleID |
ScaleValue |
One of the following:
|
Can be specified with processor ${Property} . |
MonthValues |
Monthly scale values, the fist being for January. Can be specified using processor ${Property} . Use ScaleValue. |
|
AnalysisStart |
The date/time to start analyzing data. Can be specified using processor ${Property} . |
Full period is analyzed. |
AnalysisEnd |
The date/time to end analyzing data. Can be specified using processor ${Property} . |
Full period is analyzed. |
NewUnits |
New data units for the resulting time series. Can be specified using processor ${Property} . |
Do not change the units. |
Examples
See the automated tests.
The following example scales a precipitation time series from the State of Colorado’s HydroBase database
by a factor of 3.5
:
# 1458 - CENTER 4 SSW
1458.NOAA.Precip.Month~HydroBase
Scale(TSList=AllMatchingTSID,TSID="1458.NOAA.Precip.Month",ScaleValue=3.5)
The following example scales a monthly streamflow time series with
units of ACFT (volume per month) in order to convert the data to average
CFS flow values (note that two scale commands are required because the
DaysInMonthInverse
value cannot currently be combined with a numerical value in one command).
See also the ConvertDataUnits
command for simple units conversions.
# 06754000 - SOUTH PLATTE RIVER NEAR KERSEY
06754000.DWR.Streamflow.Month~HydroBase
Scale(TSList=AllMatchingTSID,TSID="06754000.DWR.Streamflow.Month",ScaleValue=.5042)
Scale(TSList=AllMatchingTSID,TSID="06754000.DWR.Streamflow.Month",ScaleValue=DaysInMonthInverse,NewUnits="CFS")
06754000.DWR.Streamflow.Month~HydroBase
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
ConvertDataUnits
commandSelectTimeSeries
command