Link to USGS home
Surface Water Information--Data Scripts

corrlist/shiftlist

Name:
corrlist/shiftlist - Admin utilities to inventory data corrections or shifts from the database

Information:

These scripts were born out of the bugs that have cropped up in ADAPS related to data corrections and shifts. They retrieve the data corrections or shifts using a direct query of the database, and are thus useful if there is any question regarding what a user is seeing from within the ADAPS programs dc_edit and sv_edit or what is being used by primary computations.

Usage:

corrlist [-z db_no] [-a agency_cd] -n site_no -d dd_nu -w water_yr [-e end_yr] [-l Oracle_time_zone] [-s y|n]
shiftlist [-z db_no] [-a agency_cd] -n site_no -d dd_nu -w water_yr [-e end_yr] [-l Oracle_time_zone] [-s y|n]

- if database number (db_no) is missing will default to db01
- if agency code (agency_cd) is missing will default to USGS
site_no is the site ID
dd_nu is the data descriptor number
water_yr is the water year desired (or starting water year)
end_yr is the ending water year (optional)
-s flags whether the list should be sorted by the desc point sequence number (Defaults to Y if omitted)
Oracle_time_zone is the time datum desired for the output - see list below (defaults to GMT if omitted)
Time zones that WILL use daylight time when appropriate
US/EASTERN
US/CENTRAL
US/MOUNTAIN
US/PACIFIC

Time zones that WILL NOT use daylight time
-04:00
-03:00
      etc

Example Output (corrlist):

agency_cd  site_no          dd_nu   corr_nu  aging start_dt              end_dt                expcd  seq         stage          corr
---------  ---------------  -----  --------  ----- --------------------  --------------------  -----  ---  ------------  ------------  
    comment
    --------------------------------------------------------------------------------------------------------------------------------
USGS       01010000             8         1  A     2001-10-01 04:00:00   2001-10-25 11:19:00   LINR     1             0             0
    prorate -.01 from 10/25 to 1/8/02                                                                                               
USGS       01010000             8         1  A     2002-01-08 18:53:00   2002-08-13 14:17:00   LINR     1             0  -0.00999999978
    DCP should have been reset -.04, not -.03                                                                                       
USGS       01010000             8         1  A     2002-08-13 14:18:00   2002-10-01 03:59:00   LINR     1             0  -0.00999999978
    hold on corr. thru year                                                                                                         
USGS       01010000             8         2  A     2001-10-01 04:00:00   2002-04-10 03:59:00   LINR     1             0             0
    no corrections needed                                                                                                           
USGS       01010000             8         2  A     2002-04-10 04:00:00                         LINR     1             0             0
    prorate -.03 due to orifice movement over rise                                                                                  
USGS       01010000             8         2  A     2002-04-13 04:00:00   2002-08-13 14:17:00   LINR     1             0  -0.0299999993
    DCP reset on 8/13 at 1017                                                   

Script Language:
ksh, accessing the database through tsql statements

Original Author(s): Scott Barthaolma, NWIS

Note the original author is noted on this page for the purposes of giving credit only. Please address questions/comments to OSW (GS-W OSW Scripts@usgs.gov).

Known Problems/Limitations/Need Improvements:

Installation:
This script is part of the OSW Scripts Installation package and should be installed as part of that package. Users needing the script outside of the package should send email to GS-W OSW Scripts@usgs.gov.

NWIS 5.00 OSW Scripts package installation instructions:
http://water.usgs.gov/usgs/osw/adaps/OSW_scripts_pkg.5.00.html

Latest Version Release Notes:

Corrlist version 5.00: Included as part of OSW Scripts package for NWIS 5.00+
-updated for NWIS 5.00+ releases (not compatible with NWSI 4.11 or prior)

Shiftlist version 5.00: Included as part of OSW Scripts package for NWIS 5.00+
-updated for NWIS 5.00+ releases (not compatible with NWSI 4.11 or prior)

Back to Scripts
[an error occurred while processing this directive]