Skip Links

USGS - science for a changing world

Open-File Report 2008–1362

Prepared in cooperation with the U.S. Department of Transportation, Federal Highway Administration, Office of Natural and Human Environment

Computer Programs for Obtaining and Analyzing Daily Mean Steamflow Data from the U.S. Geological Survey National Water Information System Web Site

By Gregory E. Granato

Image of doorcard with link to printable doorcard (399 KB pdf)


Five computer programs were developed for obtaining and analyzing streamflow from the National Water Information System (NWISWeb). The programs were developed as part of a study by the U.S. Geological Survey, in cooperation with the Federal Highway Administration, to develop a stochastic empirical loading and dilution model. The programs were developed because reliable, efficient, and repeatable methods are needed to access and process streamflow information and data. The first program is designed to facilitate the downloading and reformatting of NWISWeb streamflow data. The second program is designed to facilitate graphical analysis of streamflow data. The third program is designed to facilitate streamflow-record extension and augmentation to help develop long-term statistical estimates for sites with limited data. The fourth program is designed to facilitate statistical analysis of streamflow data. The fifth program is a preprocessor to create batch input files for the U.S. Environmental Protection Agency DFLOW3 program for calculating low-flow statistics. These computer programs were developed to facilitate the analysis of daily mean streamflow data for planning-level water-quality analyses but also are useful for many other applications pertaining to streamflow data and statistics.

These programs and the associated documentation are included on the CD-ROM accompanying this report. This report and the appendixes on the CD-ROM describe the implementation and use of the programs and the interpretation of results from the programs. The body of this report provides an overview of the five programs included on this CD-ROM. The appendixes are the software manuals for each program. These manuals describe statistical and numerical methods used to implement each program, input-file formats, output-file formats, installation of the programs, and use of the programs. Each appendix is written as a self-contained manual because each program may have many uses alone or in tandem with other programs on the CD-ROM. Each of these programs uses graphical user interface that follows standard Microsoft Windows interface conventions.


Streamflow information is important for many planning and design activities including water-supply analysis, habitat protection, bridge and culvert design, calibration of surface and ground-water models, and water-quality assessments. Streamflow information is especially critical for water-quality assessments (Warn and Brew, 1980; Di Toro, 1984; Driscoll and others, 1989; Driscoll and others, 1990, a,b). Calculation of streamflow statistics for receiving waters is necessary to estimate the potential effects of point sources such as wastewater-treatment plants and nonpoint sources such as highway and urban-runoff discharges on receiving water. Streamflow statistics indicate the amount of flow that may be available for dilution and transport of contaminants (U.S. Environmental Protection Agency, 1986; Driscoll and others, 1990, a,b). Streamflow statistics also may be used to indicate receiving-water quality because concentrations of water-quality constituents commonly vary naturally with streamflow. For example, concentrations of suspended sediment and sediment-associated constituents (such as nutrients, trace elements, and many organic compounds) commonly increase with increasing flows, and concentrations of many dissolved constituents commonly decrease with increasing flows in streams and rivers (O’Connor, 1976; Glysson, 1987; Vogel and others, 2003, 2005).

Reliable, efficient and repeatable methods are needed to access and process streamflow information and data. For example, the Nation’s highway infrastructure includes an innumerable number of stream crossings and stormwater-outfall points for which estimates of stream-discharge statistics may be needed. The U.S. Geological Survey (USGS) streamflow data-collection program is designed to provide streamflow data at gaged sites and to provide information that can be used to estimate streamflows at almost any point along any stream in the United States (Benson and Carter, 1973; Wahl and others, 1995; National Research Council, 2004). The USGS maintains the National Water Information System (NWIS), a distributed network of computers and file servers used to store and retrieve hydrologic data (Mathey, 1998; U.S. Geological Survey, 2008). NWISWeb is an online version of this database that includes water data from more than 24,000 streamflow-gaging stations throughout the United States (U.S. Geological Survey, 2002, 2008). Information from NWISWeb is commonly used to characterize streamflows at gaged sites and to help predict streamflows at ungaged sites.


The software programs on this CD-ROM are released on condition that the U.S. Geological Survey, the Federal Highway Administration, or the U.S. Government may not be held liable for any damages resulting from their use. Please see disclaimer and license files for more details.
  • Appendixes
    There are five appendixes. Use the selector at the bottom of this web page to fetch them.
  • Materials on the CD

  • The file ReadMe.htm provides internet-style links to the report, appendixes, software intallation packages, example data and other information.
  • The CD-ROM contains five computer programs:
  • 1. Get National Water Information System Streamflow (Q) files GNWISQ (Version 1.0)—A program for downloading streamflow-gaging-station information and daily mean streamflow files from the U.S. Geological Survey National Water Information System Web Site
  • 2. Make Plotting Position MkPP (Version 1.0)—A program for generating plotting positions, percentiles and frequency factors from daily mean streamflow data
  • 3. Streamflow Record Extension Facilitator SREF (Version 1.0)—A program for extending and augmenting available streamflow data using long-term streamflow records from hydrologically similar sites
  • 4. Streamflow (Q) Statistics QSTATS (Version 1.0)—A program for calculating population statistics for dailiy mean streamflow data retrieved from the U.S. Geological Survey National Water Information System Web Site
  • 5. Make U.S. Environmental Protection Agency DFLOW3 batch-input files MkDF (Version 1.0)—A program for creating batch-input files for DFLOW3

Suggested citation:

Granato, G.E., 2009, Computer programs for obtaining and analyzing daily mean streamflow data from the U.S. Geological Survey National Water Information System Web Site: U.S. Geological Survey Open-File Report 2008–1362, 123 p. on CD-ROM, 5 appendixes


Main body of report (537 KB pdf)

Appendix 1, GNWISQ (388 KB pdf)

Appendix 2, MkPP (576 KB pdf)

Appendix 3, SREF (955 KB pdf)

Appendix 4, QSTATS (488 KB pdf)

Appendix 5, DFLOW3 (309 KB pdf)

Index of programs and other materials on the Compact Disc (cd_links)

Instructions concerning how to open and burn a CD from a disc image (ISOtoCD)

Compact Disc replicator, as International Standard Organization (iso) disc image

Template for printing out disc labels (551 KB pdf)

Template for printing out front doorcard (399 KB pdf)

Link to NWIS web portal (

Decompressors and Recorders Needed:
Parts of this report are contained in .zip folders. You will need a decompressor such as WinZip, WinRAR, PeaZip, Stuffit or similar to fetch and open the programs. You may need disc recording software such as ROXIO, Nero, Saturn, GearPro or similar to replicate the CD from the ISO. The programs on the CD are designed to run within the Windows Operating System. (Users running Macintosh, UNIX, or Linux will need a Windows emulator.)

Acquire Acrobat Reader:
Parts of this report are presented in Portable Document Format (PDF); you will need a PDF viewer or reader. You may want to download the latest version of Adobe Acrobat Reader from the Adobe website.

For additional information contact:
Director Massachusetts-Rhode Island
Water Science Center
U.S. Geological Survey
10 Bearfoot Road
Northborough, MA 01756

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo logo U.S. Department of the Interior | U.S. Geological Survey
Page Contact Information: Contact USGS
Page Last Modified: Wednesday, 07-Dec-2016 21:25:59 EST