Retrieving and Importing
USGS (NWIS) Data
You can retrieve and import time-series data from the USGS NWIS database via the web using
the USGS plug-in tool. The USGS occasionally updates the NWS database with
more information and the USGS plug-in may be updated to reflect changes; check the
HEC-DSSVue plug-ins web page for updates.
The USGS data retrieval plug-in will retrieve daily, hourly and annual peak flows
from the NWIS web site. Daily, real-time and peak data availability can be obtained
from the USGS water web site at: http://waterdata.usgs.gov/nwis. Hourly data
information can be obtained from the USGS IDA (Instantaneous Data Archive) at
http://ida.water.usgs.gov. The IDA is in a developmental phase and only a limited
number of stations have historical short-term data available.
To use the USGS plug-in, you must be connected to the internet and the file USGS.jar must
be located in the Plugins directory for HEC-DSSVue.
-
Open your DSS file and select USGS Web from the Import popup menu from
Data Entry on the menu bar. This will open the USGS Download plug-in
interface with an empty station identifier table.
-
You can either open a previously saved table, manually enter the station information for
the stations that you want, or automatically populate the table with a list of stations
available on a state by state basis. An example of the USGS Download window can be
seen below.

USGS Download Window
-
To open a previously saved table, select the File menu and then Open Station
Table. Browse to the directory and file that you want to access and then press the
Open button. Optionally, you can select a file from the most recently used
file list at the bottom of the File menu.
-
To save a table, select the File menu and then Save Station Table.
Browse to the directory where you want to save your table and then enter the file name
and press the Save button. . Tables are in text format and are saved with an
extension of “.usgs”.
-
To manually enter station information, select the USGS Station ID cell on a blank
row. Enter the USGS station ID number and then fill in the basin or river name,
location name, parameter and version in the subsequent columns or accept the defaults
provided after entering the station ID. If you need to add additional rows, select
the Edit menu and then Insert Rows. Fill in the identifiers for any
remaining stations that you want. Once you have completed your table, save it using
Save Station Table from the File menu.
-
You can sort the station table by pressing on the column header of the column that you
want to sort by. A second press of the column header will perform an inverse sort.
-
You may find the list of stations easier to use if you delete those stations that you are
not interested in. To do this, highlight the rows in the table that you want to
delete and then select Delete Checked Rows from the Edit menu. You
can save your table by selecting Save Station Table from the File menu.
-
You can query for the starting date and ending date of available data for selected
stations. To do this, select the check boxes for the stations that you want and
then press the Get Available Dates button. Each station has to be queried
independently, so select only those stations that you are interested in. The date
range for the selected stations will be displayed in the two right most columns of the
table.
-
To retrieve data from the USGS web site and import into HEC-DSS, select the Data
Type you want (either Daily, Instantaneous (Hourly), Real Time or Annual Peak Data)
from the drop down selector near the top panel of the screen. If you want daily,
you can enter a start date and end date for the time frame that you are interested in or
select the Retrieve Period of Record check box to retrieve the period of record
data. The date should be entered in the form of DDMMMYYYY (e.g., 03FEB2005).
Selecting the small box in the date field will provide a calendar tool to aid in setting
the date. Even though you may specify dates, only data that is available within
those dates from the web site can be retrieved. If you want real time data, enter
the number of days back that you want to retrieve data for. The USGS offers data
for the last 31 days for real time data.
-
Use caution when selecting a time period for instantaneous historical data, as you might
unintentionally request excessive number of values. For example, if data is given
in 15 minute intervals, a year’s worth of data will be 35,040 values, which can take a
long time to retrieve.
-
After the data type and time span have been set, select the stations from the table that
you want data for by checking the box in the Import Data column for those
stations. If you want to retrieve data for all stations in your table, press the
Select All button. The data retrieval process will begin when you press the
Import button. This operation will take some time, depending on your
connection speed to the internet and how much data you have requested. A
Retrieve Progress dialog box will display the progress of the process. After
data has been retrieved, the main catalog screen in HEC-DSSVue will be automatically
updated.
-
Daily data is stored with an E part of “1DAY”. The interval for real-time data will
be set based on the frequency of the data retrieved. If the frequency varies, the
data will be store in an irregular interval format. You may want to use the
interval modification functions available from the Time Functions tab in the
Math Functions screen to change the data to a desired interval.
-
Data can be directly plotted, tabulated or sent to Microsoft Excel from the plug-in by
selecting the desired data sets and then pressing the appropriate tool bar button.
You do not need to import the data first; it will be automatically imported and stored in
the HEC-DSS file for you. To send the data to Microsoft Excel, you must have
installed the Excel plug-in, available from the HEC-DSSVue plug-in web page, or you must
have an Excel capable version (currently under development) of the program.
-
Some offices require proxy information to be set to access the internet. Proxy
information can be set by selecting the Options item from the Edit
menu. This will display the screen shown shown below. Fill in the appropriate
values and then press the OK button. The information will be retained between
sessions.

Connection Settings Window
-
The USGS plug-in currently has limited error detection capabilities. If you think
that there are problems, you should check the HEC-DSSVue log screen for messages.
The log screen is usually minimized in your task bar.
The USGS plug-in will indicate when data cannot be retrieved, but it may not give the
reason why. You should check the USGS web page with a browser to ensure that what you
are requesting is available. The web address is: http://waterdata.usgs.gov/nwis
for daily and real-time data, or http://ida.water.usgs.gov/ida for hourly data.