Link to USGS home

stop_maxmin_q_processing

Name:
stop_maxmin_q_processing - Circumvent normal data-aging rules and delete old daily max and min discharge data in a discharge DD and prevent those stats from getting computed/stored anymore by the current processor(s).

Information:
This cleanup script was written to help those needing to cleanup bad daily max and min discharge daily values from DD's (and prevent them from being stored into the future with the current processor(s)). It is meant to delete all traces of max and min daily discharge data from a DD (including from any current processor(s)), circumventing data-aging rules in the process to simplify and speed up the cleanup process. Script is primarily meant to be used to cleanup old max and min daily discharge statistics that were stored in a DD, but were never appropriately QA/QC'd and likely never should have been stored in the first place (person setting up DD thought they may be useful, but individuals working/publishing record had no intentions of ever working that data up and publishing it). It is very useful in the cleanup tasks associated with the NWISWeb daily values project and recent OSW reviews. Note that this tool is very powerful and must be used with caution as it can delete good data if not used carefully. A new database checkpoint is recommended prior to using this or any extensive database cleanup activity (manually making backup files of the data to be deleted and watching your typing very carefully are also good ideas). It can only be run as user "nwis."

For a more general cleanup utility that can handle any parameter and statistic see the dv_cleanup script. A specialized utility for mean daily stage (stop_mean_stage_processing) is also available. Note that these specialized cleanup scripts should be safer to use when cleaning up the data they are intended for than the more generic dv_cleanup script.

Usage:

Usage: stop_maxmin_q_processing [-z db_no] [-a agency_cd] -n site_no -d dd_nu

Where:
db_no is database number (if omitted will default to database 01)
agency_cd is agency code (if omitted will default to USGS)
site_no is the 8-15 digit site ID (required)
dd_nu is the data descriptor (DD) number (required)

Max and min daily discharge values for the specified DD will be deleted for the period of record and any processors tied to that DD will have the max and min stat codes removed, if present, so that daily maxes and mins will no longer be stored in the DD.

For example for a station number 12345678, to delete max and min discharge data from DD5 for the period of record and prevent them from being stored into the future:
stop_maxmin_q_processing -n 12345678 -d 5

—Must be run as user "nwis"

Installation:
The scripts can be installed by unzipping the files in any Sun directory and making sure the script is executable (chmod +x stop_maxmin_q_processing).

Script Language:
ksh

Requirements:

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).

Scripts:

Version 5.0: (Posted 02/01/13)
—Updated for NWIS 5.0/Oracle and a few minor other minor tweaks
stop_maxmin_q_processing download (Zip file = 3.4K)

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