TSTool / Command / WriteStateMod
WriteStateMod command writes the time series in memory to the specified StateMod format file.
See the StateMod Input Type Appendix for more information about the file format.
It is expected that the time series have the same interval.
The time series identifier location part is written as the identifier,
even if an alias is assigned to a time series.
The following dialog is used to edit the command and illustrates the syntax of the command.
WriteStateMod Command Editor (see also the full-size image)
The command syntax is as follows:
||Indicates the list of time series to be processed, one of:
||The time series identifier or alias for the time series to be processed, using the
|The StateMod file to write. The path to the file can be absolute or relative to the working directory (command file location).||None – must be specified.|
||The date/time for the start of the output.||Use the global output period.|
||The date/time for the end of the output.||Use the global output period.|
||The value to write for missing data.||
||The number of digits to use after the decimal point, for data values. A negative number indicates that if the formatted number is larger than the allowed output width, adjust the format accordingly by truncating fractional digits. A special value of
||The default output precision if not specified is
See the automated tests.
A sample command file to process time series from the State of Colorado’s HydroBase database is as follows:
SetOutputPeriod(OutputStart="1950-01",OutputEnd="2002-12") # 08213500 - RIO GRANDE RIVER AT THIRTY MILE BRIDGE NEAR CREEDE 08213500.DWR.Streamflow.Month~HydroBase # 08217000 - RIO GRANDE AT WASON, BELOW CREEDE, CO. 08217000.USGS.Streamflow.Month~HydroBase WriteStateMod(TSList=AllTS,OutputFile="RioGrande.rih")