TSTool / Command / SetConstant
Overview
The SetConstant
command sets the values of a time series to a single or monthly constant values.
An optional flag can also be set to indicate which values have been modified. If no numerical single or monthly values are set, the flag can still be set. Currently, only a single flag value can be specified (not monthly flags).
Command Editor
The command is available in the following TSTool menu:
- Commands / Set Time Series Contents
The following dialog is used to edit the command and illustrates the syntax of the command.
SetConstant
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
SetConstant(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 |
ConstantValue |
The constant value to use as the data value. | Sepecify ConstantValue or MonthValues . |
MonthValues |
Monthly values to use as the data values:
|
Specify ConstantValue or MonthValues . |
SetFlag |
The string to use for the data flag for each value in the set period. Can be specified without ConstantValue or MonthValues to only set the flag (e.g., for testing). |
No flag is set. |
SetFlagDescription |
The description for SetFlag , which will be used in output products. |
No description is set. |
SetStart |
The starting date/time for the data set. Can set using processor ${Property} . |
Set data for the full period. |
SetEnd |
The ending date/time for the data set. Can set using processor ${Property} . |
Set data for the full period. |
Examples
See the automated tests.
A sample command file to process a time series from the State of Colorado’s HydroBase database is as follows (only the early period is set to zero):
# 08235700 - ALAMOSA RIVER BELOW CASTLEMAN GULCH NEAR JASPER
08235700.DWR.Streamflow.Month~HydroBase
SetConstant(TSList=AllMatchingTSID,TSID="08235700.DWR.Streamflow.Month",ConstantValue=0,SetEnd="1950-01")
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
AddConstant
commandFillConstant
commandSelectTimeSeries
command