Link to USGS home

Ratcheck

Name:
Ratcheck- Summary report comparing highest/lowest discharge measurements vs. highest/lowest daily values for all sites.

Information:

This review script does a summary of the highest/lowest discharge measurement vs. the highest/lowest daily values for all real-time sites for a given water year. It is intended to be used by OSW Reviewers, Data Chiefs, or others who what to look for overall trends in how well the range of flows was covered by measurements in a given water year, or in the recent past (for high flows). The report shows a ratio of the measurements vs the daily flows and flags outliers (based on a user defined ratio) to aid in quick interpretation of the results. It also summarizes the amount of time days the flow was above the highest measurement and below the lowest measurement in order to show the opportunity that existed to check the rating extremes. Note that the "year" that is used for the highest/lowest measurements is extended three months on either side of the water year chosen (18 months total) so measurements made immediately before or after the end of the water year are included by default.

Program summary:

  1. Retrieves the maximum and minimum daily values for the specified water year, the maximum and minimum discharge measurements for the year, the maximum discharge measurement for several years, and the number of days the daily flow was above/below the max/min measurement for the specified water year.
  2. Computes the ratios maxQmsrd/maxQ for the year, maxQmsrd/maxQ for several years (maxQ is still for the year), and minQ/minQmsrd for the year.
  3. Flags ratios that are less than user-specified percentages for a user-specified number of days.
  4. Provides a summary of the percentage of total stations with each flag.

The results are printed in file ratcheck_stats_NWISHost.LIST.WY

where "NWISHost" is the name of the NWIS machine being used
"LIST" is the name of the station list file used or "ALLRT" if all real-time sites used
"WY" is the water year run

USAGE: ratcheck [water_yr] [look_back_yrs] [Qmax threshold %] [Qmin threshold %] [Days] [site_file]

Where:
water_yr = water year
look_back_yrs = number of years to look back for historic high measurement (default is 5 years)
Qmax threshold % = the % threshold for use when checking max flows (default is 50%)
Qmin threshold % = the % threshold for use when checking min flows (default is 50%)
Days = the number of days for use when checking for flags (default is 15)
site_file = an optional file of sites to use. The default is to use all configured real-time sites. The format of the site_file is tab delimited columns for station ID and discharge DD

Example Output:

                     High/low measurements vs daily discharge for 2004
                                NWIS Host sun4dmamrl

Note that the year used for measurements is extended three months before and after the water year run!

DA:  Drainage Area - helps identify small streams which can skew results.

%POR The max Daily divided by the period of record max daily (not shown) expressed as a percentage. This is
     provided as an indication of whether the year run was high or low at that station.

%%%: The (max Qm/max Daily) or (min Daily/min QM) expressed as a percent.  Percentages greater than 100 are possible
     because of the extended year used for measurements; percentages greater than 1,000 are shown as 999.

Day: The number of daily values in the water year more than twice as high as the highest measurement or half
     as low as the lowest measurement (not necessarily consecutive)

Flg: A=The maximum measurement in the year was less than 50% of the max daily and the discharge was more than
       twice as high as the maximum measurement for more than 15 days.
     B=The maximum measurement in the previous 5 years was less than 50% of the max daily in the year and the daily
       discharge was more than twice as high as the max. meas. for more than 15 days.
     C=The minimum daily in the year was less than 50% of the minimum measurement and the daily discharge was less than half of
       the minimum measurement for more than 15 days. (For flows less than 0.01, min %%% is not computed and flag C is shown as -.)


                     Summary--Total number of sites processed:  293
                              Number of those sites with usable data 276    
                               # of sites flagged A:   99  ( 36% )
                               # of sites flagged B:   13  (  5% )
                               # of sites flagged C:   47  ( 17% )

-------------------------------------------------------------------------------------------------------
                           |                       Maximum              |        Minimum         |
                           |                                            |                        |
    Station     DD      DA |  Daily  %POR QM-1yr %%% Day  QM-5yr %%% Day|  Daily   QM-1yr %%% Day|  Flg
---------------------------|--------------------------------------------|------------------------|------
01010000         6  1341.00|  23100   53   21300  92   3   21300  92   3|    223     290   77  23|     
01010070         4   171.00|   4660   69    4030  86   1    4030  86   1|   39.9    53.2   75  28|     
01010500         5  2680.00|  47300   51   39900  84   2   39900  84   2|    728     428  170   0|     
01011000         6  1478.00|  13400   42   11500  86   3   15400 115   0|    302     357   85  18|     
01011500         1   524.00|   5330   55     445   8 289    5500 103   0|    199     445   45  75|  A C

Script Language:
ksh

Original Author(s): Joe Nielsen, OSW and Ed Fischer, Iowa 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:

Installation:
This script is part of the OSW Scripts Installation package and should be installed as part of that package. Users needing the script outside of the package should send email to GS-W OSW Scripts@usgs.gov.

NWIS 5.00 OSW Scripts package installation instructions:
http://water.usgs.gov/usgs/osw/adaps/OSW_scripts_pkg.5.00.html

Latest Version Release Notes:

Version 5.00: Included in part of OSW Scripts package for NWIS 5.00+
—updated for NWIS 5.00+ releases (not compatible with NWIS 4.11 or prior)

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