A guide for using HydroDesktop to discover and access water data for Texas
Water Data for Texas: A One Stop Shop
Texas GIS Forum
October 26, 2010
by Tim Whiteaker
Center for Research in Water Resources
The University of Texas at Austin
Copyright © 2010, The University of Texas at Austin.
All rights reserved.
Funding for this document was provided by the Texas Water Development Board under contract number 1000011103.
page intentionally left blank)
The Consortium of Universities for the Advancement of Hydrologic Science, Inc. (CUAHSI) Hydrologic Information Systems project (CUAHSI-HIS) has developed a standard Web service called WaterOneFlow for publishing hydrologic time series information. WaterOneFlow defines a set of simple queries to use when asking for data and returns the data in a standard language called WaterML. While the details of WaterOneFlow and WaterML are beyond the scope of this document, it is important to note that WaterOneFlow establishes a universal mechanism for accessing time series data, greatly simplifying the previously laborious task of getting the data you need to do your analysis. But a standard is most beneficial if the community knows how to use it. That’s where HydroDesktop comes in.
HydroDesktop is a free and open source Geographic Information Systems (GIS) application that helps users discover, use, and manage hydrologic time series data published with WaterOneFlow. It handles the details of how to work with WaterOneFlow and WaterML so that you don’t have to. HydroDesktop includes data query, download, visualization, graphing, analysis and modeling capabilities. The result is a spatially-enabled system that facilitates the aggregation of observational data describing the water environment.
This document presents an exercise that shows how to use HydroDesktop to find water data for Texas. The procedure is designed such that it can be replicated without the assistance of an instructor and with your own Windows computer.
HydroDesktop - http://hydrodesktop.codeplex.com/
CUAHSI Hydrologic Information System - http://his.cuahsi.org/
The goal of this exercise is to introduce you to the tools and functions available in HydroDesktop that allow you to search for and synthesize hydrologic time series data in an area of interest. This exercise will teach you how to find and obtain data for the San Marcos River Basin in Texas and compare data characteristics using the analysis capabilities of HydroDesktop.
Objectives for this exercise include:
· Find where streamflow and temperature are measured in the San Marcos River Basin in Texas.
· Download data for a few key sites in the study area.
· Visualize time series data in graphs.
· Export time series data for use in other programs.
HydroDesktop is currently designed to run only on a Windows operating system such as Windows XP or Windows 7. To carry out this exercise, you will need the latest version of HydroDesktop, which is HydroDesktop 1.1 Beta 294 at the time of this writing. Because HydroDesktop’s functionality continues to grow, the installer is periodically updated. Check back often for the latest version of HydroDesktop.
You will also need an Internet connection since you will be accessing live online data.
To install HydroDesktop:
1. In a Web browser, navigate to http://hydrodesktop.codeplex.com/.
2. Click the Download link on the right to download the latest installer.
3. Read the license and agree to it.
4. Save and run the installer, accepting all defaults. The installer will guide you through the rest.
HydroDesktop is an open source product, which means that anyone can see the source code used to create the program and contribute to its development. Even if you aren’t a programmer, you can still participate in the discussion forums and post bugs or feature requests in the issue tracker.
The home for HydroDesktop is on CodePlex, a Web site for open source software. To add to the discussions or post a bug, you must first register for your free CodePlex account. Once you have a CodePlex account, you can log in at http://hydrodesktop.codeplex.com/ and start contributing. The community is really what drives open source software development, so this is an exciting opportunity to make your voice heard.
You are encouraged to provide feedback on any issue or problem you may encounter throughout this exercise. Feel free to utilize online resources such as the issue tracker on the HydroDesktop Web site when providing feedback. In this exercise you’ll learn how to access these resources directly through HydroDesktop.
Suppose you have been commissioned with protecting the water environment of the San Marcos River Basin in Texas. To get a sense of the hydrology of this region, you’ll want to find information such as how much water flows through the rivers or how water temperature varies in time. In this exercise, you’ll use HydroDesktop to download streamflow and temperature data in this basin and plot a graph of the result.
Let’s open HydroDesktop and get to know its user interface.
1. Open HydroDesktop (Start l All Programs l CUAHSI HIS l HydroDesktop l HydroDesktop).
2. Take a moment to explore the user interface.
As you can see, HydroDesktop looks much like a typical GIS interface. It supports complex layer symbologies, access to online map services, and custom programmed tools and plugins. It even comes with some basemap shapefile data which are already added to the map. What sets HydroDesktop apart from other GIS applications, is the ability to query for hydrologic time series data.
Notice that HydroDesktop presents many of its controls on a ribbon, much like modern versions of Microsoft Office. The ribbon is organized into tabs which contain groups of buttons and tools. There is also an orb for accessing basic functions like saving and printing.
Figure 1 HydroDesktop User Interface
If you have comments or issues as you work through this exercise, you can find helpful resources on the Help tab. The buttons on this tab let you view documentation, jump to the discussion forums or issue tracker, email for help, or submit a comment.
3. Click the Help tab in the ribbon to view the buttons available on that tab.
4. Click the Issues button to open the issue tracker on the HydroDesktop Web site.
Figure 2 Using the Help Tab To Open the Issue Tracker
5. Close the Issue Tracker Web page.
HydroDesktop manages your work within projects. A HydroDesktop project file (.hdprj) contains
information about what geospatial layers you have in your map and how those
layers are symbolized. These layers are
stored in shapefiles, a widely available GIS data format. The shapefiles such
as state boundaries that are included with HydroDesktop are located in its
installation folder, e.g.,
C:\Program Files\CUAHSI HIS\HydroDesktop\maps\BaseData-MercatorSphere.
The HydroDesktop project file also connects your work to a database (.sqlite file) where temporal data are stored. This is where the time series data that you download through HydroDesktop is saved. A relational database is much more efficient at storing time series data than shapefiles, and HydroDesktop uses a free database called SQLite for this purpose.
You can create projects to organize your work, and you can save the project so that you can open it again later. When you first open HydroDesktop, it sets up a clean map and loads the default system database. In order to better manage the work in this exercise, you will create a new project and database.
To create a new project and database:
1. Click the HydroDesktop Orb button.
2. In the Orb menu, click New Project.
Figure 3 Creating a New Project
3. Choose a location to save your project such as your desktop.
4. Name the project “workshop” and then click Save. Click Yes if prompted about overwriting the database.
HydroDesktop will notify you that the project was created successfully. The text in the title bar of the HydroDesktop window should now include the name of your project. HydroDesktop has also created a database for your project named workshop.sqlilte. This database is saved in the same location as your project file.
You are now ready to work within your newly created project and database. To save your project after performing some work, click on the Save Project button in the Orb menu. To open a project, click on the Open Project button in the Orb menu.
When searching for data in HydroDesktop, you can specify the following filters: region of interest, time period of interest, data source and variables of interest. HydroDesktop then searches the CUAHSI-HIS national catalog of known time series data to find locations of time series that match your search. Search results showing locations of time series data that match your search are presented in the map. These results include information that HydroDesktop can use to connect to each individual data provider’s WaterOneFlow Web service for data access. You can further filter the results and then choose which data you want to actually download and store in your database.
When you save data to your database, it is stored as a theme. A theme is a collection of hydrologic time series data that share a common relationship. A theme can be anything from a geographic space (e.g., Texas, Colorado) to a hydrologic event (e.g., flood, hurricane) to a combination of both (e.g., Texas Flood). Simply put, a theme organizes a collection of related time series. HydroDesktop can save data to a new theme or append data to an existing theme. The workflow for finding data and saving it to a theme is shown in Figure 4.
Figure 4 Workflow for Searching for Hydrologic Data
In this exercise, you will locate streamflow and temperature data from the past water year located within the San Marcos River Basin in Texas. The outline of the basin is included in the U.S. HUC layer that is already in the map. You’ll use this boundary to restrict the area being searched.
1. Click the Home tab in the ribbon to activate it.
2. In the Search Panel on the right, under the Area tab, choose U.S. HUC in the list of Active Layers. The map zooms to the extent of this layer while the Search Panel shows the fields in this layer.
3. Under Select Field, select CATNAME.
4. Under Select Search Parameter, scroll through the state names until you find San Marcos. Click San Marcos to select it. The map zooms to the basin and highlights it in blue.
Figure 5 Choosing a Search Area
Next you will tell HydroDesktop the date range of time series that you want. You will also restrict which data sources are acceptable. Restricting the search to one or two data sources improves search performance. The United States Geological Survey’s (USGS) National Water Information System (NWIS) is a great source for water data. For this exercise, you’ll access their WaterOneFlow Web service which provides time series on a daily time step.
5. In the Search Panel, click the Options tab to activate it.
6. Specify the Start Date and End Date. For this exercise, search for data available in the last water year (i.e., 10/1/2009 to 9/30/2010).
7. Place a check next to Show Web Service Selection Panel. This shows the list of available data sources.
8. Click Select None.
9. Scroll through the Web services until you find NWIS Daily Values, and place a check next to it.
Figure 6 Setting the Date Range and Data Source to Search
Next you will tell HydroDesktop what hydrologic variable you want. To help you in this regard, HydroDesktop employs a list of official CUAHSI-HIS keywords for hydrologic variables. Data providers use this list when registering with CUAHSI-HIS. This is a lot easier than typing whatever term the data provider may have chosen on their own. For example, the USGS uses the term “00060” to describe streamflow.
10. In the Search Panel, click the Keywords tab to activate it.
11. Start typing “streamflow” in the Keywords text box. The list of keywords automatically selects keywords that match your search.
12. Click Streamflow in the list of keywords.
Figure 7 Choosing a Hydrologic Variable Keyword to Search
When you click Streamflow, the keyword list automatically jumps to the term “Discharge, stream.” It just so happens that “Discharge, stream” is the official keyword for what we think of as streamflow. However, the keyword list also includes synonyms like “streamflow” to make it easier to find the variable you’re after. To the right of the keyword list, you can see where stream discharge fits within the overall hierarchy of hydrologic variables.
Now that you’ve identified the right keyword, you’ll tell HydroDesktop add that keyword to the list of variables for which it will search.
13. In the Search Panel, Click the Add button to add “Discharge, stream” into the Selected Keywords box.
Now you will repeat the process to add the water temperature keyword.
14. In the Keywords text box, start typing “temperature.”
15. Click Temperature, water in the list of keywords.
16. In the Search Panel, Click the Add button to add “Temperature, water” into the Selected Keywords box. Notice that the current search parameters are shown in the Search Summary at the bottom of the Search Panel.
With search parameters set, you will now tell HydroDesktop to run the search for data.
17. In the Search Panel, click Run Search.
When you run a search, HydroDesktop asks the CUAHSI-HIS national catalog for descriptions of time series that match your search criteria. At this point, your software is using a remote online resource and bringing back data to display in your map. After HydroDesktop has finished searching for time series, it displays the locations of time series that fit your search in a map layer called “Search Results.” Note that there will be several “dots” at a single location in the map if the site represented by a given dot measures more than one time series that matches your search. In other words, each dot in the map represents a time series of data.
Figure 8 Locations of USGS Streamflow and Water Temperature Observations in the San Marcos River Basin
Now you can begin to refine these search results to locate time series that you actually want to download and save to your database.
To help you identify time series of streamflow in the San Marcos River Basin, HydroDesktop includes data and tools to give you a spatial context for the data. One of these is the ability to display online basemaps from ESRI, Bing, and OpenStreetMap. These are beautiful cartographic maps cached at multiple scales which are accessed in real time as you move around in the HydroDesktop map. For this exercise, you will enable the ESRI Hydro Basemap. This map shows rivers and watershed boundaries in the USA.
To enable the ESRI Hydro Basemap:
1. On the Home tab in the ribbon, find the Online Basemap group. Click the drop down list of basemaps and choose ESRI Hydro Base Map.
2. Select an opacity of 70 so that you can see some of the map layers under the basemap.
3. Click Enable Basemap.
Figure 9 Enabling an Online Basemap
In addition to providing spatial context, you can see that this basemap can help you produce a more aesthetically pleasing printed map.
Let’s zoom in to the north-central part of the basin where we will focus our attention for this exercise.
4. In the ribbon, click the Zoom In tool to activate it.
5. Zoom in to the north-central part of the basin by clicking with the left mouse button and drawing a box to roughly cover the area shown in Figure 10.
Figure 10 Region of Interest within the San Marcos River Basin
For this exercise, you will work with the sites and variables shown in Table 1. You will select the features that represent these time series so that HydroDesktop knows which time series you want to download. These time series are located in the north-central part of the basin.
Table 1 Selected Time Series in the San Marcos River Basin
Blanco Rv nr Kyle, TX
Discharge, cubic feet per second, , DataType=Average
Jacobs Well Spg nr Wimberley, TX
Discharge, cubic feet per second, , DataType=Average
Jacobs Well Spg nr Wimberley, TX
Temperature, water, degrees Celsius, , DataType=Average
Blanco Rv at Halifax Rch nr Kyle, TX
Temperature, water, degrees Celsius, , DataType=Average
To select time series for download:
1. In the Map Contents on the left, right-click on the Search Results layer name and click View Attributes.
Figure 11 Viewing the Search Results Layer Attributes
The Attribute Table Editor opens showing you descriptions of time series in the Search Results layer. You can scroll through the table and resize columns to see the information.
2. In the Attribute Table Editor, use the values in the SiteName and VarName columns to locate rows that match the values in Table 1. While holding down the CTRL key, left click on these rows to select them.
Figure 12 Selecting Time Series for Download
3. Close the Attribute Table Editor.
HydroDesktop currently has a bug where you must refresh the table within the Search panel in order for it to recognize the feature selection. This can be accomplished simply by clicking between the field names in the table as if you were going to resize the field widths. Be careful to not click the field names themselves or click any rows within the table, or else you may lose your selection.
4. In the Search Panel, under the Results tab, click between one pair of field names in the table as if you were going to resize the field widths.
Figure 13 Refreshing the Selection
With the items properly selected, you are ready to download the data.
Recall that when you save data, it is organized into a Theme and stored in the database associated with your HydroDesktop project. You’ll now download the data that you selected in the north-central part of the San Marcos River Basin.
To download data:
1. In the Search Panel, in the Results tab, type “San Marcos” in the New Theme text box.
2. Click Download Data.
At this point, HydroDesktop connects to the WaterOneFlow Web services associated with each time series you selected in the map. In this case, there is only one service, the USGS NWIS Daily Values service. HydroDesktop retrieves the requested time series data from this service and stores the data in your new San Marcos theme.
Figure 14 Saving a Theme
Once the download is complete, the new theme is shown under the Themes group in the Map Contents. If you create additional themes, they will also appear in the Themes group. At this point, you could view the attributes of this theme just like the other layers you’ve viewed in this exercise.
Now that you’ve downloaded the data, you can view the data in both tabular and graph form in HydroDesktop.
HydroDesktop takes a series-centric view of temporal data, meaning that it provides access to the data at the time series level. An example of a time series is all of the temperature values measured at a certain point on the San Marcos River. Let’s take a look at the time series that you just downloaded.
To visualize time series data in HydroDesktop:
1. Click the Graph tab in the ribbon to activate it.
On the left you will see a list of all the time series in your database. You could use filters to restrict the time series that are shown, but you only retrieved a handful in this exercise so it’s fine to leave the default view.
2. Click to place a check next to Temperature at the Blanco River at Halifax Ranch.
From the graph you can see how the temperature in the water changes with the seasons throughout the year. Now let’s compare this time series with the one for Jacob’s Well Spring.
3. Place a check next to Temperature at Jacob’s Well Spring.
HydroDesktop allows you to visualize multiple time series on the same graph. The plot axes automatically adjust to fit your data. In this example, there is a dramatic difference between the two temperature time series. The one for Jacob’s Well Spring shows much less variation throughout the year than the one for the Blanco River at Halifax Ranch.
Figure 15 Comparing Temperature Time Series
4. In the ribbon, click Probability to show a probability plot of the data, further illustrating the difference between the two time series.
5. Click Time Series to restore the time series view.
The dramatic difference in the shapes of the two time series plots is caused by the source of water for these two rivers. The Blanco River at Halifax is largely a surface water system while Jacob’s Well Springs is fueled by groundwater. While the groundwater system does maintain a much more steady temperature than the surface water system, notice how jumps still exist, such as the sudden decrease in temperature in mid-January, 2010. Let’s plot flow on this graph to see why this might be happening.
6. Place a check next to Discharge at Jacob’s Well Spring.
Notice the sharp increase in streamflow around the same time that the water temperature dropped. It seems like the system is experiencing a large influx of surface water, which is colder than the groundwater in the winter. Similarly, you can see an increase in streamflow in late summer, 2010, which results in an increase in water temperature.
Figure 16 Examining Changes in Flow and Temperature
7. Uncheck the two temperature time series, and place a check next to Discharge at the Blanco River near Kyle.
The flow of the Blanco River dwarfs that of Jacob’s Well Spring, but you can still see increases in flow in the Blanco River at about the same time as those observed in the spring. Also notice the 4000 cfs flow in September, 2010. This flow is the result of tropical storm Hermine as it swept through Texas.
While HydroDesktop does contain additional analysis capabilities, it can also export data to a text file for use in other programs.
HydroDesktop can export data to a variety of output file types for further study and analysis. For example, you can export individual time series by placing a check next to them and then right-clicking them in Table or Graph view. For this exercise, you will export all time series for an entire theme.
To export time series data for a theme:
1. Click the Table tab in the ribbon to activate it.
2. In the Data Export group, click Export.
Figure 17 Exporting Data
This tool exports all data in a theme to a delimited text file. In the Export To Text File dialog, notice that your theme name is already selected by default. You can also control the fields that are included in the export and choose a delimiter. For this exercise, you will accept all defaults to produce a comma delimited text file.
3. In the Export To Text File dialog, specify the output file location and name.
4. Click Export Data.
5. Close the Export To Text File dialog when it is finished.
Figure 18 Setting Export Options
6. Find the file on your computer and open it to verify that the data were exported.
Congratulations! With your theme data in hand, you have completed the exercise and learned how to use HydroDesktop to discovery and access water data for Texas. Feel free to experiment with other functionality such as creating and printing a map, and be sure to leave us feedback using the Help tab. This concludes the exercise.