Skip to content

TSTool / Command / ReadWaterML


The ReadWaterML command reads one or more time series from a WaterML XML time series file (see the WaterML Input Type Appendix). WaterML version 1.1 is supported. WaterML files can be created using the ReadUsgsNwisDaily, ReadUsgsNwisGroundwater, ReadUsgsNwisInstantaneous, ReadWaterOneFlow, and WriteWaterML commands, and can be saved from web sites that provide WaterML using the WebGet command. This command may be enhanced in the future to read a subset of the time series in the WatermL file (currently all time series in the file are read), and additional WaterML versions may be supported.

See also the ReadWaterML2 command, which reads newer WaterML 2 format.

Command Editor

The following dialog is used to edit the command and illustrates the command syntax.


ReadWaterML Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:


Command Parameters

Parameter                          Description Default                           
InputFile The name of the WaterML file to read. The path to the file can be absolute or relative to the working directory. None – must be specified.
Alias 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). No alias is assigned.
Interval The data interval for the file, necessary because WaterML 1.1 does not have a data element indicating the interval (time step for the data) and using irregular by default would be inefficient for data management. This issue is being further evaluated. None – must be specified.
RequireDataToMatchInterval Indicate whether the date/time for each data value must align with the interval:
  • True – For example, if Interval=15Min for USGS instantaneous data, then values a warning will be generated.
  • False – Date/times that do not align result in time series values being assigned using a truncated date/time. For example, USGS groundwater web service values read with Interval=Day will be assigned to the nearest day (by ignoring more precise time information).

This parameter and the Interval parameter will continue to be evaluated.
Parameter is not used for irregular data.
InputStart The start of the period to read data – specify if the period should be different from the global query period. Use the global query period.
InputEnd The end of the period to read data – specify if the period should be different from the global query period. Use the global query period.


See the automated tests.


See Also