by Steve Malers, Open Water Foundation, last updated 2016-02-11
Index of Open Water Foundation gists
This example shows how to use the TSTool software to retrieve Colorado ditch diversion time series data from various sources, and save in various formats.
- The example requires installation of the TSTool software
- A basic understanding of the TSTool software is helpful.
Files in this gist are as follows:
- -owf-example-tstool-diversions-co.md - example summary (this file)
- co-download-diversions-dwr-ws-tsids.TSTool - a TSTool command file to download diversion data from Colorado Division of Water Resources web services and save in useful formats
- KML-style.xml - provides styles for the KML output file
- .gitattributes and .gitignore - these are used by the repository to allow proper editing of files on a file system
Diversion data in this example are retrieved from the State of Colorado's HydroBase web services. Diversion data are recorded at structures (headgates, pipes, etc.), each of which have a "water district identifier" (WDID). A WDID is a combination of the two-digit water district number and structure identifier number, each part padded with zeros.
TSTool uses time series identifiers (TSIDs) to uniquely identify time series. Selecting the ColoradoWaterHBGuest datastore in TSTool will allow reading data from the CO DWR web services. Processing time series with specific TSIDs allows for fine control over the data that are downloaded. To download and save the diversion data using TSIDs:
- Download the co-dwr-diversions-dwr-ws-tsids.TSTool command file from this gist and save on the computer where TSTool is installed.
- Start TSTool
- Open the command file with File / Open / Command file...
- Run the commands by pressing the Run All Commands button. This will save several files in the same folder as the command file. This command file performs the following steps
Multiple output files are created to allow use of the data in Excel, other modeling tools, Google Earth (kml) and other software.