|
This script is not yet supported (and may never be), but is provided in the interim because many users may find it valuable. Questions about this script should be referred to the script author. The status of the script is noted.
Name:
USGS_provisional_unit_discharge - Emails water managers/interested parties recent provisional unit discharge data and provides a rough means of archiving that data (which may be used for significant operational decisions).
Information:
This utility provides cooperators or other interested parties a copy of a user-definable number of days' of provisional unit data in an email and optionally provides them with access to an ftp/web area with a small archive of those original provisional data via a link (the user must set up a web-accessible area for those files to be stored... the script just creates files/directories there and provides a link to them in the email). Provisional data (or operational data) are often used for critical water management decisions (water rights, minimum in-stream flows, etc...) and obtaining a snapshot of the data used for those decisions can be very important for water managers as those data will often change during our record computation process.
Usage:
USGS_provisional_unit_discharge #days
#days is optional and is the number of previous days' UV's to include in the files - defaults to 1 (the current day) if not included.
Script is designed to be run as a regularly scheduled cron process. A file called sta.list must be included in the directory where run (cron user's home area if run as a cron process) that just includes a column of station ID's followed by a space or tab-separated column of station names as they are desired to be displayed to those receiving the emails.
Example email content (includes optional link to web/ftp archive area which would contain pdf files of recent provisional unit data):
Current Provisional Discharge Data for Stations:
09402500 Colorado River near Grand Canyon
09423000 Colorado River below Davis Dam
Please note that these data represent PROVISIONAL data obtained Nov 29, 2011 at 13:57 .
For additional information on provisional data, please see:
http://waterdata.usgs.gov/co/nwis/help/?provisional
Files of original provisional unit discharge data sent via these emails can be obtained
from this URL:
ftp://ftpext.cr.usgs.gov/pub/cr/co/lakewood/wsc/nv_test
Thank you for your use and support of USGS water data!
========================================================================================
Data for station 09402500 Colorado River near Grand Canyon
Current real-time data for station are available here:
http://waterdata.usgs.gov/nwis/uv/?site_no=09402500&PARAmeter_cd=00065,00060
Date_Time TZ Discharge Q_cd
---------------- ---- ---------- ----
2011-11-28 00:00 MST 21900 P
2011-11-28 00:15 MST 21900 P
2011-11-28 00:30 MST 21900 P
2011-11-28 00:45 MST 21900 P
2011-11-28 01:00 MST 21900 P
2011-11-28 01:15 MST 21900 P
2011-11-28 01:30 MST 21900 P
2011-11-28 01:45 MST 21900 P
2011-11-28 02:00 MST 21900 P
2011-11-28 02:15 MST 21900 P Additional stations/data would be listed below this point.
The email ID's the script sends email to as well as the location and URL of the optional web archive area are set via settings at the top of the script. Note that the archive area is optional and if not set up within the script (settings left blank), that link will just be omitted from the email and parties will only have access to the data contained in the email. Most WSC servers already have web-accessible area set up on their NWIS servers, so script can usually just use one of those existing web/ftp areas already set up (ask your WSC NWIS SA/webmaster...).
Script Language:
ksh
Requirements:
Author(s): (for unsupported scripts, please address questions/comments to the author)
Original author Wade Walker (walker@usgs.gov)
Installation:
Latest Version Release Notes: