Office of Surface Water Data Scripts
For questions and comments, contact email: GS-W OSW Scripts@usgs.gov.
Welcome to the Office of Surface Water data scripts web site. This site is dedicated to the distribution of scripts and other programs to assist District hydrographers and database administrators in working with data. In most cases these scripts were originally written by District users, but may have been modified for general release. The programs on this site are broken into two broad categories: Supported Scripts and Scripts Under Evaluation.
- Supported Scripts: These scripts have been tested and fully documented and are released with the support of the Office of Surface Water.
- Scripts Under Evaluation: These scripts have been submitted for inclusion on this page and possible OSW Support.
New scripts are welcome at any time, as are comments or suggestions about existing scripts (GS-W OSW Scripts@usgs.gov). If you take one of these scripts and improve it, send your improvement back in for evaluation. If you have your own version of one of these scripts that does a better job, send it in so that others can share in your work.
Dates in parentheses indicate when script/package was last modified or initially released.
OSW_Scripts Software Package:
To facilitate installation of many of the OSW scripts below, OSW and NWIS have created an OSW_Scripts Software Package corresponding to NWIS software releases since NWIS 4.7.
NWIS 5.00 OSW Scripts installation package (07/20/12)
NWIS 4.11 OSW Scripts installation package (12/15/11)
Update July 2008: Because of the widespread use of the install package and the time required to maintain scripts both inside and outside the package, we have elected to remove those scripts in the package from individual download from this page. Information on each script remains, but access to the script now requires loading the package. WSCs that would like access to an individual script without loading the package should send email to GS-W OSW Scripts@usgs.gov. The scripts that are included in the package are indicated below with a
.
Supported Scripts:
Every attempt will be made to maintain these scripts as necessary to ensure that they continue to function as software and hardware changes. Although these scripts in most cases were based on ideas or scripts that developed at the District level, the scripts may have been modified from that originally submitted in order to ensure that it will run everywhere, or to add features not included in the original script. Because of this, questions on supported scripts should be sent to the Office of Surface Water (GS-W OSW Scripts@usgs.gov), NOT to the original author. Like all scripts, these can be modified at the local level once downloaded. However, user support will be EXTREMELY limited for modified scripts.
- Field Operations Scripts:
-
- AutoFF (11/8/12): A utility to automatically retrieve station information for an electronic "field folder" for each station.
- GO2 (10/04/12): A utility to automatically determine when site visits are needed.
- Graphics Scripts:
-
- Auto_review (11/8/12): Automate production of electronic time-series record packets (swreview, gwreview, and wqmreview).
- loadplot (2/21/13): Plot annual total sediment load vs annual total discharge using tkg2 graphs.
-
Monplot (7/20/12): Using tkg2 to create fancy graphs of QW monitor data outside of ADAPS.
- peakcheck (5/6/10): Graphically review peak-flow-file data.
- Quickplot (7/16/10): A utility to automatically plot unit values for a group of sites from ADAPS, one site at a time.
-
tkg2 Hydrographs (12/19/11): Using tkg2 to create fancy hydrographs outside of ADAPS.
- Data Scripts:
-
-
makegcl (09/319/17): Automatically create gcl files for import into the Graphical Constituent Loading Analysis System (GCLAS) from records in the QWDATA database.
- adaps2excel (9/27/12): Create an MS-Excel 2003 spreadsheet of ADAPS unit or daily values.
- Enter.peaks (3/18/05): Prompts for peak flow file information and automatically creates upload file.
- get.bcards (2/21/13): Quickly pull unit value bcard files for use in the Graphical Constituent Loading Analysis System (GCLAS)—or for whatever other purpose you may have for them.
- get_sv_emeas (01/31/13): Retrieve environmental air and water temperature measurements stored in Site Visit.
- meas.stats (5/18/10): Get basic measurement statistics for a given set of hydrographer initials.
- pkentry (12/10/12): A graphic user interface to editing and updating the peak-flow file.
- Quickedit (7/16/10): A utility to automatically plot unit values from ADAPS that optionally allows editing of the data in Hydra and updating of the edited data on NWISWeb.
- SMART (12/15/11): A utility to automatically determine and apply shift curves based on new discharge measurements in SiteVisit.
- SV_CSGInsp Creator (4/15/11): Enter historical CSG inspections into SiteVisit through the loader from an MS-Excel spreadsheet.
- SV_Qm Creator (12/19/11): Enter historical measurements into SiteVisit through the loader from an MS-Excel 2007 spreadsheet.
- tidal filter (11/19/12): A utility to remove tidal signals from time series data using the Godin filter.
- System Administration Scripts:
-
-
adapslog (7/20/12): A tool to review ADAPS transaction logs.
-
checkstats (7/20/12): Admin utility to check stored daily value statistics vs. processor setup for a given data descriptor.
- copy_dv_to_diff_dd (02/01/13): Move daily values and daily value summary statistics from one DD to another within a site.
-
Corrlist/Shiftlist (7/20/12): Admin utilities to inventory data corrections or shifts from the database
-
ddlist (7/20/12): List basic information about all the ADAPS data descriptors at a station.
- Decode DD (7/17/07): A utility to take the dd_id shown in Ingres error messages and display the agency code, station, DD, and parm code for that DD.
- dv_cleanup (02/01/13): Circumvent normal data-aging rules and delete old daily value statistics for any period/processor in a DD.
-
find_inconsistent (7/20/12): Admin utility to find periods of exact periods of inconsistency within a single DD.
-
getdd (7/20/12): Admin utility to get DD information for a station from the command line.
-
getddpc (7/20/12): An admin utility to list all the ADAPS data descriptors of a given parameter code.
- Group2rdb (6/6/03): Admin. utility to create an rdb control file from an ADAPS group.
-
list_age (7/20/12): Admin utility list non-approved daily value data in primary DDs.
- list_dv_aging_status (6/6/13): Admin utility to review data aging for a given water year.
- meas4meter (2/4/13): Admin utility to list all the discharge measurements that use a particular meter or meters.
-
nwgroups (7/20/12): An admin utility to summarize the NWIS/Ingres access rights of a user.
-
Prlist (7/20/12): Admin utility to list all the processors associated with a specified DD and all the other DDs involved in those processors.
-
ratlist (7/20/12): Admin utility to list all the ratings and rating dates with their data aging status for a given station or data descriptor.
- Rtegroups (8/16/05): A utility to automatically create ADAPS groups from a District's real-time sites.
- stop_maxmin_q_processing (02/01/13): Circumvent normal data-aging rules and delete old max/min daily discharge statistics in a discharge DD and prevent them from getting stored anymore by the current processor.
- stop_mean_stage_processing (02/01/13): Circumvent normal data-aging rules and delete old daily mean stage data in a stage DD and prevent them from getting computed/stored anymore by the current processor(s).
- sw_dvs_not_on_web (02/01/13): Find surface-water related daily value statistics stored in primary, official-record, DD's that are not being published on NWISWeb.
-
uvinv/dvinv/station_inv (7/20/12): Admin utilities to inventory unit or daily values for a station or list of stations.
- Review Scripts:
-
-
meas_summary (7/20/12): Create a summary of measurement counts and types.
- peakcheck (5/6/10): Graphically review peak-flow-file data.
-
Ratcheck (7/20/12): Summary report comparing highest/lowest discharge measurements vs. highest/lowest daily values for all sites.
- Rtshiftplot (11/24/04): Utility to quickly review current shifted ratings being used at real-time sites.
- sed summary (2/14/13): Summarize ADAPS and GCLAS discharge, concentration, and load data.
-
shiftcheck (7/20/12): Find questionable shift curves and report on their prevalence.
- Auto_review (11/8/12): Automate production of electronic time-series record packets (swreview, gwreview, and wqmreview).
-
Thresh.scan (7/20/12): Create summary report of non-discharge DDs without critical threshold settings.
Scripts Under Evaluation:
These scripts are not yet supported (and some may never be), but are provided in the interim because many users may find them valuable. Questions about these scripts should be referred to the script author. The status of each script is noted.
-
- compDCconfig (5/15/12): Detect and report DECODES configuration changes.
- Arkive: A utility to facilitate copying datalogger files to the ADAPS archival directory.
- bb (12/19/11): Simplified version of the pb script that should handle large numbers pb sometimes can't.
- check_junk.pl (12/19/11): Utility to notify interested parties when incoming data does not process successfully in DECODES.
- hydcheck: An Excel based utility to review daily values discharge data.
- printhydra: A utility to do screen dumps from the Hydra zoom window
- recpan: Records period analysis.
- sendrat: Email cooperators/interested parties notifications of shift/rating changes and provide access to a current shifted rating table.
- Shift Parser: A utility to parse an ADAPS Shift Analysis output into an rdb file for use in Tkg2 plots or other script applications.
- showtx (12/19/11): Quickly show last 8 hours of transmissions for an entered station/DCP ID and optionally decode pseudobinary values into readable characters (Sutron DCP's only at this point).
- tkg2 Ratings: Using tkg2 to create fancy ratings outside of ADAPS.
- USGS_provisional_unit_discharge (12/19/11): Email water managers/interested parties recent provisional unit data discharge data and provide a rough means to archiving that data (which may be used for significant operational decisions).
Retired Scripts:
These scripts have been retired from support through OSW Scripts, either because changes in the system have made them obsolete or it is simply felt there limited use does not justify ongoing maintenance and testing. Note that as it is very difficult for us to know how much use a given script is getting, we welcome any feedback if you feel we have retired these scripts prematurely, and we are willing to bring them back as needed.
-
Retired February 2013:
- sed.q.bcards (9/8/08): Quickly pull UV discharge bcard files for use in the Graphical Constituent Loading Analysis System (GCLAS).
Retired December 2011:
- setGeneric (7/16/10): Move all sensors that use a station ID as the serial number (and their readings) to the new generic sensors released with NWIS 4.10 .
- loc_sensor_list (7/16/10): Admin utility to list the SiteVisit location sensors for a station or group of stations.
- pb: A utility to convert "pseudo binary" to readable integers
- qw_uv (7/16/10): Using tkg2 to create unit values plots of water quality data from ADAPS and QWDATA.
Retired July 2010:
- float2encd (07/23/09): Move all FLOAT sensors and their readings to the new encoder (ENCD) sensor released with NWIS 4.9
Retired July 2009:
- qmeas2rdb (11/12/08): Retrieve discharge measurements from SiteVisit, including channel level data, in rdb format.
Retired December 2008:
- loadmeas (10/2/07): A utility to review discharge measurement summary information and automatically load it into ADAPS. (NWIS 4.8 version in the works, but not completed yet.)
Retired July 2008:
- lrgs_check: An admin utility to automatically report if real-time processing is behind.
- measplot: Review time-series data on days of discharge measurements using tkg2 graphs. (Swreview inspection primaries should provide similar output, just in a tabular format.)
- monitor_processes: An admin utility to automatically report if various time-series processes are not running.
- RT.Editor: A utility combining the ADAPS programs data_qa_summary and Hydra into a unit-value screening and editing tool.
- Uvmeas: A utility to automatically print edited unit-value tables for all days with measurements and inspections. (Swreview inspection primaries should provide the same output for SW sites – may be reworked as an OWQ script for QW-sampling activities at some point.)
Other sources of useful scripts and programs:
-
- Hydroacoustics Software:
- http://hydroacoustics.usgs.gov/
- Baseplot/Hydcomp (these urls go to the documentation, which contain instructions for downloading and installing the software)
- http://pubs.usgs.gov/of/2002/ofr02151/
- http://pubs.usgs.gov/of/2002/ofr02-286/
- More gunplot utilities from Lucky Sultz (the author of Quickplot):
- http://montana.usgs.gov/office/techfiles/gnuplot.htm
- All things Field Computer:
- https://collaboration.usgs.gov/wg/FCIS/SitePages/Home.aspx
- ADAPS Scripts and command line functions I'll bet you didn't know existed:
- http://wwwnwis.er.usgs.gov/currentdocs/adaps/5.command_line.pdf
Back to ADAPS