Link to USGS home
Surface Water Information--Data Scripts

measplot

Name:
measplot - Review time series data on days of discharge measurements using tkg2 graphs.

This script was retired from active support in July 2008. This page is available for historical reference and to allow access to the code in case someone wants to try his or her hand in updating it. Use of the script without extensive testing is not recommended and the consequences are your own. If you feel this script was retired prematurely and would like to see it restored send email to GS-W OSW Scripts@usgs.gov.

Information:

Measplot is basically a blown-up version of an "swreview" graph to focus on days when discharge measurements are made and is intended to make up for the fact that sometimes "swreview" plots do not show enough detail on those days.

For the period run, a single graph is produced for each measurement found in the measurement file. It contains:

  1. The discharge computed unit-values
  2. The discharge daily value
  3. The measured discharge with error bars and change in stage
  4. The data-correction unit-values
  5. The shift unit-values
  6. The optimal shift for the measurement with error bars

The first three graph elements are plotted against a discharge scale on the left axis, and the last three are plotted against a stage scale on the right axis.

Example plot: measplot.pdf

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

measplot.ID.mst.NO.tkg2
where:
ID is the station number
NO is the measurement number

Usage:

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

MEASPLOT 1.0 PROGRAM OPTIONS:
-----------------------------
1. Station ................................................. 01054200
             Wild River at Gilead, Maine
             Discharge DD .... 2
             Gage height DD .. 4
2. Period .................................................. 10 01 2003 to 09 30 2004
3. Time gap for plots (s=skip)? ............................ 15
4. Plot height ............................................. 8.5
   Plot width .............................................. 11
5. Plot days with ice msts. (control=ice or shore ice)? .... n
6. Plots sent to the (s)creen, (p)rinter, or (f)iles ....... s
Enter 1-6 or  to plot: 

Installation:

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

Two files are included:

measplot - main script
measplot.tkg2 - tkg2 template

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 (measplot.tkg2) should also be moved to a secure location and the variable "tempdir" in the script swreview should be reset from "$PWD" to the path of the template storage directory. See line 13 (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 8 (approximately) of 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 1.1: (posted 7/17/07)
Updated for NWIS 4.7 (not compatible with NWIS 4.6)
measplot download (Zip file = 15K)

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