TSTool / Command / SetOutputYearType
Overview
The SetOutputYearType
command sets the global output year type for output reports and files.
The default for most operations is calendar year (January through December);
however, alternate year definitions may be useful.
The global output year type is recognized by some common tools and commands that create output. Some write commands also allow the year type to be specified for the command. Output year type choices are not consistently enabled for all commands due to the effort to create automated tests, and functionality is being phased in over time. Some commands support more output year types than this command. Refer to specific command documentation to see how the output year type is handled for those commands.
Internally, all data are managed using calendar years and are converted to different year types during output or display.
The ChangeInterval
command also allows
time series to be converted to annual values where the value corresponds to a year type.
See also the Statistic Examples documentation
for commands that create time series with different year types.
The year type for output and analysis can be defined differently than calendar year. Internally, TSTool allows the start and end year to have offsets from the calendar year. This allows the output year type to have a starting year previous to the calendar year or the same as the calendar year.
TSTool originally supported only Calendar
and WaterYear
(October 1 to September 30) year types
because of conventions used with hydrologic data.
However, over time, additional year types have been added.
To generically handle year types going forward, the following convention is being phased in:
- Year types where the ending date is the year:
- For example,
OctToSepYear
means that the year starts October 1 and ends September 30 and that the year corresponds to the ending date.
- For example,
- Year types where the starting date is the year:
- For example,
YearOctToSep
means that the year starts October 1 and ends September 30 and that the year corresponds to the starting date.
- For example,
- Custom year types:
- Some analyses may require even more granular definition of year type, for example April 15 to August 15.
- Currently this is not supported in a year type definition but can be handled
by using a time series with year interval and analysis window within the year,
for example as created by the
NewStatisticYearTS
command. - The time series identifier data type or scenario and/or alias can reflect the special year type, if necessary.
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
).
SetOutputYearType
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
SetOutputYearType(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
OutputYearType |
The output year type, one of:
In the future, more generic types like NovToOctYear may be implemented. |
If this command is not specified, Calendar is the default. |
Examples
See the automated tests.
A sample command file example is as follows:
SetOutputYearType(OutputYearType=Calendar)
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
ChangeInterval
commandSetInputPeriod
commandSetOutputPeriod
command