Retrieving and Importing
California CDEC Data
You can optionally retrieve and import time-series data from the California CDEC database
via the web using the CDEC plug-in tool. It can retrieve a variety of
hydro-meteorological and environmental data from CDEC for stations throughout the state of
California. You must enter the station information (station ID, sensor,
duration code, and time window) manually into the plug-in table. The plug-in has no
capability to identify which stations and what data is available from CDEC. Station
ID and data availability can be obtained from the CDEC web site at:
http://cdec.water.ca.gov.
To use the CDEC plug-in you must be connected to the internet and the file CDEC.jar
must be located in the Plugins directory for HEC-DSSVue.
-
Open your DSS file and select CDEC (Web) from the Import popup menu from
Data Entry on the menu bar. This will open the CDEC Download plug-in
interface with an empty station identifier table.
-
You can either open a previously saved table or manually enter the station information
for the stations that you want. The CDEC plug-in cannot populate the table; you
must manually enter the station information.

Retrieving and Importing CDEC Data
-
To open a previously saved table, select the File menu and then Open.
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. 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 “.cdec”.
-
To manually enter station information, select the CDEC Station ID cell on a blank
row. Enter the ID and then fill in the basin or river name, location name and
sensor number. For each sensor, a default C part will be provided; you can change
the C part, if desired. Enter the duration code, which may be “Monthly”, “Hourly”,
“Daily” or “Event”. The duration code must match the data set offered by CDEC for
that location and sensor; it will not retrieve data that does not have that duration
code. (You need to access the CDEC web site at http://cdec.water.ca.gov to determine what
data sets are offered with what duration codes.) A default F part of “CDEC” will be
set but you can change that, if desired. 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 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 can get a list of all sensor numbers, PE Codes and other information that CDEC has
available by selecting Stations Definitions from the Options menu, as shown
below. These are the codes that CDEC uses, not necessarily what is available for
each station.

List of Station Definitions
-
To retrieve data from the CDEC web site and import into HEC-DSS, open or fill-in the
station table as describe above, and then enter the start date and end date for the time
frame that you want data for. (The date boxes cannot be empty like they can for the
USGS plug-in.) The date should be entered in the form of DDMMMYYY
(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.
You should check the CDEC web site (at http://cdec.water.ca.gov) to verify what data is
available for the stations that you are interested in.
-
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 Get 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
Get Data 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.
-
Monthly, daily and hourly data will be stored with an E part of “1MON”, “1DAY”, or
“1HOUR”, respectively. Event data will be stored in an irregular-interval format
with an E part of “IR-MONTH”. 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.
-
The CDEC plug-in currently has limited error detection capabilities. If you think
there are problems, you should check the HEC-DSSVue log screen for messages. The
log screen is usually minimized in your task bar.
The CDEC plug-in will indicate when data cannot be retrieved, but it may not give the
reason why. You should check the CDEC web page with a browser to ensure that what you
are requesting is available. The web address is: http://cdec.water.ca.gov.