Link to USGS home
Surface Water Information--Data Scripts

loadplot

Name:
loadplot - Plot annual total sediment load vs annual total discharge using tkg2 graphs.

Information:

Loadplot plots annual total sediment load vs annual total discharge for a given period at a given station. It is useful for detecting possible analysis bias in working sediment-discharge records.

For the period run a single scatterplot graph is produced as in this example: Loadplot Example in pdf

All plots generated are stored in the run directory with the name:

loadplot.ID.YEAR.tkg2
where:
ID is the station number
YEAR is the latest year plotted

The sediment data must be in stored under parameter code 80155.

Usage:

Simply type "loadplot" and answer the prompts. A menu of options is provided similar to "swreview", as in the following example.

USING:
Station ........ 11303500  SAN JOAQUIN R NR VERNALIS CA
Discharge DD.. Primary
Load DD....... Primary

Load data available in the database for this site:
Agency  Station            DD  Primary  Parm   Stat      Ndays          From            To  Begins        Ends
------  ---------------  ----  -------  -----  -----  --------  ------------  ------------  ------------  ------------
USGS    11303500            8  Y        80155  00003     15703             2         54100  01-oct-1959   30-sep-2003 

CURRENT PROGRAM OPTIONS:

--------------  Plot Options --------------------------------
1. Station ................................................. 11303500
2. Period .................................................. 10 01 1987 to 09 30 2003
3. Plot height ............................................. 8.5
   Plot width .............................................. 11
4. Plots sent to the (s)creen, (p)rinter, or (f)iles ....... s
Enter 1-4 or  to plot: 

Installation:

The script can be installed by unzipping the files in any Sun directory and making sure the scripts "loadplot" and "dvinv" are executable (ex: chmod +x loadplot).

Three files are included:

loadplot - main script
loadplot.tkg2 - tkg2 template
dvinv - a daily value inventory script used by the main loadplot script (this is the same script as exists in the ADMIN section of OSW Scripts. If the OSW Scripts install package is used then this version of dvinv is not needed as it is loaded with the package.)

If desired, the script executables can be moved or linked to a common run directory for use by multiple users. In this case, the template (loadplot.tkg2) should also be moved to a secure location and the variable "tempdir" in the script should be reset from "$PWD" to the path of the template storage directory. See line 21 (approximately) of the script.

The default printer within the script is set to each users default printer ($LPDEST). If desired, a different printer (for example, a local color printer) can be hard coded into the script by setting the printer name as variable "printer" on line 16 (approximately) of the script. The user will always be given the opportunity to set the printer when using the programs print option, however.

Script Language:
ksh

Requirements:

Original Author(s): Wade Walker, Colorado District

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:

Scripts:

Version 5.0: (posted 2/21/13)
—updated for NWIS 5.0/Oracle, added full paths to most non-system commands, added load and discharge totals to stdout.
loadplot download (Zip file = 14K)

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