|
Name:
list_dv_aging_status - Admin utility to review data aging for a given water year.
Information:
In NWIS 4.5 there was a command-line function called 'list_data_aging_status' that could be used to review the data aging of all the sites in the database for a given year. The output of this script was a list of all the site/DD pairs in the database for a given year, and the data aging status of the ratings, processors, and daily values. There were two problems with this program. For one, there was no way to limit the output to just primary DDs. Second, it only listed sites when they actually have all three components (ratings, processors, and daily values) and as many published sites do not have ratings, the function was not useful for reviewing those sites. The program was removed from the NWIS 4.6 release, in part because of these limitations and in part because the data aging changes in that release broke it.
This script is a modified version of that original NWIS program. This version only looks at daily values and allows the user to restrict the output to just primary DDs. It also includes the user ID of the last person to modify the data aging of each DD. Note that starting with NWIS 4.6 there can be several entries for a given DD in the same water year because parts of the water year might be in different data aging statuses, or there might be different periods in the same status but were set to that status by different users. This script lists all the distinct combinations of DD/data aging status/user combinations that have any part of the aging period in the water year specified.
The starting and ending date of each DV aging period is shown for approved and in-review periods.
Note that working periods are not actually defined data aging records but rather reflect the lack of a data aging record. Thus these periods (1) do not have starting and ending dates shown, and (2) the user ID shown for working records is the user who last modified the data itself, not the data aging (thus the listing of user "satin" in the example below when the last access was storing real-time data).
Usage: list_dv_aging_status DB WY output_file_path [-p]
Example Output (using -p option)
============================================
=== DV Aging Status Listing ===
=== ===
=== Water Year: 2005 ===
=== Database Number: 01 ===
============================================
====================================================================
=== The table below shows, for each station/DD, the current ===
=== Data Aging status code (W, R, or A) for the Daily Values. ===
=== Since the Unit Values, Summary Statistics, Rating Dates, ===
=== etc., are all aged as a unit, the Daily Values are ===
=== used to represent the entire collection's status. ===
====================================================================
AGENCY STATION_ID DD_NUMBER PARAMETER_CD PRIMARY_DD AGING LAST_MOD_BY START END
------ --------------- --------- ------------ -------------- ----- ----------- ---------- ----------
USGS 12340500 2 00060 Y A hunrichs 2004-10-01 2005-09-30
USGS 12340500 16 00060 N W jfinley
USGS 12340500 23 00065 N A hunrichs 2004-10-01 2005-09-30
USGS 12340500 37 00010 N W satin
USGS 12340500 38 00021 N W emitton
USGS 12340500 40 00060 N A hunrichs 2004-10-01 2005-09-30
USGS 12370000 1 00065 N R lgsultz 2004-10-07 2004-10-09
USGS 12370000 5 00060 Y R lgsultz 2004-10-07 2004-10-09
USGS 12391400 1 00060 Y A transfer 2004-10-01 2005-09-30
Script Language:
ksh, accessing the database through tsql statements
Requirements:
Original Author(s): Original NWIS script by Jim Cornwall. Modifications by Joel Johnson, California District, and Joe Nielsen, Office of Surface Water
Known Problems/Limitations/Need Improvements:
Latest Version and Release Notes: