TSTool / Command / NewPatternTimeSeries
Overview
The NewPatternTimeSeries command creates a new time series containing a repeating pattern of numbers.
This command is useful for generating data to test other commands.
Command Editor
The command is available in the following TSTool menu:
- Commands / Create Time Series
The following dialog is used to edit the command and illustrates the syntax of the command.
NewPatternTimeSeries Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
NewPatternTimeSeries(Parameter="Value",...)
The following older command syntax is updated to the above syntax when a command file is read:
TS Alias = NewPatternTimeSeries(Parameter=Value,…)
Command Parameters
| Parameter | Description | Default |
|---|---|---|
Aliasrequired |
The alias to assign to the time series, as a literal string or using the special formatting characters listed by the command editor. The alias is a short identifier used by other commands to locate time series for processing, as an alternative to the time series identifier (TSID). Can be specified using processor ${Property}. |
None – must be specified. |
NewTSIDrequired |
The time series identifier to be assigned to the new time series, which is useful to avoid confusion with the original time series. Can be specified using processor ${Property}. |
None – must be specified. |
IrregularInterval |
Interval to use when populating irregular interval time series. It is recommended that the newer convention interval like IrregHour is used in the NewTSID rather than generic Irregular. In any case, this parameter defines the spacing of the irregular data (e.g., 06Hour would result in 4 values per day for a time series with IrregHour interval). |
Must be specified for irregular interval time series. |
Description |
Description for the time series. Can be specified using processor ${Property}. |
None. |
SetStartrequired |
Start date/time to set data. Can be specified using processor ${Property}. |
None – must be specified. |
SetEndrequired |
End date/time to set data. Can be specified using processor ${Property}. |
None – must be specified. |
Units |
Units for the data values. Can be specified using processor ${Property}. |
None. |
MissingValue |
Value to use to indicate missing data values. -999 is the default for historical reasons; however, NaN (not a number) is being phased in and should be specified if possible. Time series can be missing and be flagged. Can be specified using processor ${Property}. |
-999 |
PatternValuesrequired |
Data values, separated by commas. Missing values can be omitted (e.g., indicate with adjacent commas). | None – must be specified. |
PatternFlags |
Short strings to assign to the values (used to annotate graphs and other output) separated by commas. Missing flags can be omitted (e.g., indicate with adjacent commas). | No flags are assigned. |
Examples
See the automated tests.
The following example command file illustrates how to create a pattern time series for testing:
NewPatternTimeSeries(Alias=”ts1”,NewTSID="ts1..Streamflow.Day",Description="Test data",SetStart="1950-01-01",SetEnd="1951-03-12",Units="CFS",PatternValues="5,10,12,13,75")
WriteDateValue(OutputFile=",Example_NewPatternTimeSeries_out.dv")
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
NewTimeSeriescommand