Link to USGS home

find_inconsistent

Name:
find_inconsistent - Admin utility to find periods of exact periods of inconsistency within a single DD

Information:

With the release of the new ADAPS data aging system in NWIS4.6 many users are finding errors like the following when trying to set data to "in-review" in setstatus:

Error 667 on operation "date chk"
in module "chk_db_consistency"
while checking DB Date consistency - found Computed UV dates younger than DVs for:
DD# X at STN USGS YYYYYYYY - Check Processor State Codes for consistency!

These error messages are reporting that for one part of the time series computation process, an earlier processing step has a modification date that is later than one of the later processing steps. This implies that a change was made to the earlier step and that change has not been propagated through the system with a primary computation. In many cases the condition can be fixed simply by rerunning the primary, however there are times when the user would like more detailed information on the exact period that is causing the error. This script provides that information.

The script simply performs the same consistency checking within a single DD that setstatus does (setstatus performs other checks as well). Rather than give a general error message like setstatus however, it reports the exact date and time and type of each consistency error. Note that this can be a long report at times.

Usage:

find_incosnistent [-z db_no] [-a agency_cd] -n site_no -d dd_nu
        [-b begin_date (yyyymmdd)] [-e end_date (yyyymmdd)]

If -z is omitted, db_no defaults to 01
If -a is omitted, agency_cd defaults to "USGS"
If -b is omitted will default to the beginning of period
If -e is omitted will default to the end of period

Example output:

In this example output, the first section of dates is reporting that the some shifts are older than the computed discharge (meaning a shift change has not be processed through to the UVs). In the second section it is reporting that some DVs are younger than the UVs (meaning a change to the UVs has not been processed through to the DVs). Note that the comparison is on the Mod1 and Mod2 columns, which show the dates of the actual edits.

Agency  Station            DD  SecIden  Date        Type1   Mod1                  Type2   Mod2
------  ---------------  ----  -------  ----------  ------  --------------------  ------  --------------------
USGS    01010000            6           2000-09-01  shift   2002-10-07 18:59:55   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-02  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-03  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-04  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-05  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-06  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-07  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-08  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-09  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6           2000-09-10  shift   2002-10-07 18:59:56   comp    2001-03-29 16:00:38 
USGS    01010000            6  00003    1992-10-01  dv      1999-08-11 08:21:49   comp    2002-09-25 11:46:31 
USGS    01010000            6  00003    1992-10-02  dv      1999-08-11 08:21:49   comp    2002-09-25 11:46:31 
USGS    01010000            6  00003    1992-10-03  dv      1999-08-11 08:21:49   comp    2002-09-25 11:46:31 
USGS    01010000            6  00003    1992-10-04  dv      1999-08-11 08:21:49   comp    2002-09-25 11:46:31 
USGS    01010000            6  00003    1992-10-05  dv      1999-08-11 08:21:49   comp    2002-09-25 11:46:31 

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

Script Language:
ksh

Original Author(s): Scott Bartholoma, 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).

Latest Version Release Notes:

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

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