Downloading Data

Station Lists

Specific Command Line Interfaces

CDEC

usage: download_cdec [-h] [--dest DEST_DIR] [--id_col ID_COL]
                     [--param_col PARAM_COL] --start START [--end END]
                     [--param PARAM] [--stations [STATIONS ...]] [--overwrite]
                     [--freq FREQ]
                     [stationfile ...]

Positional Arguments

stationfile

CSV-format station file.

Named Arguments

--dest

Destination directory for downloaded files.

Default: 'cdec_download'

--id_col

Column in station file representing CDEC ID. IDs with > 3 characters will be ignored.

Default: 'id'

--param_col

Column in station file representing the parameter to download.

--start

Start time, format 2009-03-31 14:00

--end

Start time, format 2009-03-31 14:00

--param

Variable to download

--stations

Id or name of one or more stations.

--overwrite

Overwrite existing files (if False they will be skipped, presumably for speed

Default: False

--freq

specify the frequency. Otherwise proceeds from even to hour to day. must be H or D

USGS (NWIS)

usage: download_nwis [-h] [--dest DEST_DIR] --start START [--end END]
                     [--param PARAM] [--stations [STATIONS ...]] [--overwrite]
                     [stationfile ...]

Positional Arguments

stationfile

CSV-format station file.

Named Arguments

--dest

Destination directory for downloaded files.

Default: 'nwis_download'

--start

Start time, format 2009-03-31 14:00

--end

End time, format 2009-03-31 14:00

--param

Parameter(s) to be downloaded, e.g. 00065 = gage height (ft.), 00060 = streamflow (cu ft/sec) and 00010 = water temperature in degrees Celsius. See “http://help.waterdata.usgs.gov/codes-and-parameters/parameters” for complete listing. (if not specified, all the available parameters will be downloaded)

--stations

Id or name of one or more stations.

--overwrite

Overwrite existing files (if False they will be skipped, presumably for speed)

Default: False

NOAA

Script to download NOAA 6 minute water level data

usage: download_noaa [-h] [--start START] [--end END] [--syear SYEAR]
                     [--eyear EYEAR] [--param PARAM]
                     [--stations [STATIONS ...]] [--dest DEST_DIR] [--list]
                     [--overwrite]
                     [stationfile ...]

Positional Arguments

stationfile

CSV-format station file.

Named Arguments

--start

First date to download

--end

Last date to download, inclusive

--syear

First year to download

--eyear

Last year to download, inclusive to end of the year.

--param

Product to download: water_level, predictions, water_temperature, conductivity.

--stations

Id or name of one or more stations.

--dest

Destination directory for downloaded files.

Default: 'noaa_download'

--list

List known station ids.

Default: False

--overwrite

Overwrite existing files (if False they will be skipped, presumably for speed

Default: False

DWR-NCRO

It has traditionally been difficult to write robots to scrape data from Water Data Library. The utility download_wdl is included but is not maintained and may fail to function or to retrieve recent files. There are newer web services (public) that we are testing, but NCRO has expressed some concern about overuse during peak hours when the services are used by staff to work on data. The current interface shown here is for downloading period of record files, so its interface is simpler, less flexible and different from the others.

#.. argparse:: # :module: dms_datastore.download_ncro # :func: create_arg_parser # :prog: download_ncro.py

DWR-DES (DISE)

DWR Division of Environmental Services has been renamed but the name has not yet been updated here. These web services are internal to DWR. External users can get reformatted/screened data from our group or request data from DWR liasons who are identified on CDEC on a per-station basis.

usage: download_des [-h] [--dest DEST_DIR] [--start START] [--end END]
                    [--param PARAM] [--stations [STATIONS ...]] [--overwrite]
                    [stationfile ...]

Positional Arguments

stationfile

CSV-format station file.

Named Arguments

--dest

Destination directory for downloaded files.

Default: 'des_download'

--start

Start time, format 2009-03-31 14:00

--end

End time, format 2009-03-31 14:00

--param

Parameter(s) to be downloaded.

--stations

Id or name of one or more stations.

--overwrite

Overwrite existing files (if False they will be skipped, presumably for speed)

Default: False