TSTool / Command / SetOutputPeriod
Overview
The SetOutputPeriod
command sets the output period for time series.
See also the SetInputPeriod
command.
The period for a time series when read or created will be set to the maximum of the following periods,
in order to satisfy output and data filling requirements:
- available data
- output period (if specified)
- input period (if specified)
Specifying the output period is necessary when creating model files or filling an extended period (time series will not automatically be extended by fill commands).
Command Editor
The command is available in the following TSTool menu:
- Commands / Output Time Series
The following dialog is used to edit this command and illustrates the syntax of the command.
Note that the output period should always use calendar month and year,
even if other than calendar year are used for output (see SetOutputYearType
).
SetOutputPeriod
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
SetOutputPeriod(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
OutputStart required |
The date/time to for the output start:
|
None – must be specified. |
OutputEnd required |
The date/time to for the output end. See the description for OutputStart . |
None – must be specified. |
The CurrentToYear
and other special date/time values can be followed by modifiers,
which can be chained together in any order.
For example, the following will adjust the current time rounded to 5 minutes into the future and set the time zone to blank:
CurrentToMinute.Round(5min).RoundDirection(>).TimeZone()
CurrentTo*
Modifiers
Modifier | Description |
---|---|
Round(interval) |
Round the current date/time to the specified interval (e.g., 5min , 6hour ). No rounding occurs if the current date/time exactly matches the requested rounding interval. The default is to round back but see the RoundDirection() modifier. |
RoundToDayOfWeek(Day) |
Round the current date/time to the specified day of the week (Monday , Tuesday , Wednesday , Thursday , Friday , Saturday , or Sunday ). The day is rounded and the month and year are adjusted accordingly. No rounding occurs if the current date/time matches the requested day of the week. The default is to round back but see the RoundDirection() modifier. |
RoundDirection(<) RoundDirection(>) |
Indicate which way the Round() modifier should round the date/time, one of:
|
TimeZone(tzToSet) |
Set the time zone for the date/time to the specified time zone string. This does not shift the time value. It simply assigns the time zone string. Blank (no value) can be used to set the time zone to blank. Note that other commands may handle time zone in a specific way, for example when reading and writing data. |
Examples
See the automated tests.
A sample command file example is as follows:
SetOutputPeriod(OutputStart="1950-01",OutputEnd="2002-12")
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
SetInputPeriod
commandSetOutputYearType
command