Skip Navigation Linkwww.nws.noaa.gov 
NOAA logo - Click to go to the NOAA homepage National Weather Service   NWS logo - Click to go to the NWS homepage
Threshold Runoff
 



Workshop 3: Advanced Av-ThreshR Scenarios, Displaying FFG XMRG Files

(Workshop developed for FFG/ThreshR training course, July 25-27, 2000)


INTRODUCTION

Purpose:
 

  • Learn advanced features of Av-ThreshR by running different scenarios.
  • Learn how to display XMRG files used in FFG with Av-ThreshR data sets.


This is the last in a series of 3 tutorials prepared for the FFG/ThreshR/ArcView Workshop held in Silver Spring, MD in July, 2000.
 

Getting Started

  • Open your Project file that you saved from Workshop 2.
  • Open the View that you were working with and remove all check marks in the Table of Contents so that no Themes are visible.


Compute Q2, Unit Graph Peaks, and ThreshR Values for an entire RFC

For this workshop, subbasin and parameter output from Av-ThreshR Steps 2, 3, and 4 have been pre-computed for all of MARFC.  This section is included to demonstrate that it is relatively quick and easy to calculate threshold runoff values for an entire RFC given pre-computed subbasin parameters.  Of course, it is still necessary to have reasonable estimates for Snyder coefficients (which we don't have in a database for many locations).

  • Load the file shd1.shp from ~/marfc/workshop3


The file shd1.shp contains 1310 basins with drainage areas ranging from 20 - 35 mi2.
 

  • Click ThreshR --> Compute Q2, Q5, etc.
    • Choose a 2-year return period.
    • Enter shd1.shp as the Subbasin Theme
    • Enter rfcbound.shp as the Analysis Area Theme
    • Click Calculate (Calculations may take about 1-2 minutes) The Q2_1 field is added to shd1.shp
  • Click ThreshR --> UG Peak Flow
    • Click Snyder as the UNIT GRAPH METHOD
Since we only have Cp and Ct grids for Pennsylvania, we cannot use the "Snyder Cp and Ct from Grids" option for the entire RFC.  To keep things simple in this example, we will choose to "Specify Snyder Cp and Ct" as constants for the whole area.  For lack of better information, use the average values from the Pennsylvania Grids: Cp = 0.43 and Ct = 2.36 ( a gross approximation).
 
    • Click "Specify Snyder Cp and Ct" and enter Cp = 0.43 and Ct=2.36.
    • Make sure the "Subbasin Theme" is shd1.shp and Click Calculate (calculations should take less than 1 minute)
  • Click ThreshR --> Subbasin Threshold Runoff
    • Select Shd1.shp as the Subbasin Theme
    • Select Q2_1 as the Flooding Flow Field
    • Select Qsd1_1 (only) as the UGPeaks field
    • Click Calculate (Estimated run time: 20 seconds)
  • Display the results in the field tr1h_1 by editing the legend for theme "shd1.shp" to display this field using the "Graduated Color" option.  Choose a "Color Ramp" that you like.  I like Green Monochromatic for threshold runoff.


Isolating the Cause of Errors

Several subbasins have been assigned the value -1 for tr1h_1.  The code "-1" indicates that there was an error in calculating threshold runoff.  This type of error is more often caused by an error in calculating flooding flow (Q2_1) than in calculating the unit graph peak flow (Qsd1_1), but either of these inputs could be the culprit.

  • View the attribute table for shd1.shp and select all records with Q2_1 values equal to -1 (tr graphic).  Promote the selected records to the top of the Table tr graphic.  You should see 20 selected records.
There are actually 3 different reasons why the threshold runoff values for these 20 subbasins could not be computed.
 
  • Reason 1.  Look in the "stateabbr" field.  Notice anything missing?  The state abbreviations were not recorded for 4 of these 20 subbasins.  Look at the locations of these 4 subbasins in the View relative to state boundaries (statekey.shp) and you will see why.  You might need to zoom in close.  Hint:  If your still not 100% sure why, try loading the center points file cntp1.shp from your workshop3 directory.
  • Reason 2.  For the other 16 problem basins, take a look at the chsl field.  You will see that chsl is 0 for 10 of these subbasins.  This is true because these basins have low relief and the DEM does not resolve elevation variations very well.
  • Reason 3.  What about the  other 6 subbasins?  These subbasins are all in the state of Maryland and in Region 3.  Look in regequat.dbf and you will see that the parameters required (terms field) for Maryland Region 3 are ARM, CHSL, STRP_MD, FRP_MD, SA_MD, and SD_MD.  Note: some entries in regequat.dbf are partly lowercase -- this is not the problem.  Check the values of these fields in "Attributes of Shd1.shp" for the 6 basins in question.  You will see that FRP_MD, SA_MD, and SD_MD have no data!!  The reason is that there are errors in the input data layers for Maryland.  If you look in parcode.dbf you will see that the data source for FRP_MD is a grid (srctype) called "frp_md" (srcfile) in the subdirectory "md" (srcdir).   Load the grid ~/md/frp_md into your View and you will see the problem.  The only solution for this is to replace the corrupt input data sets.
  • The procedure ThreshR --> Interpolate to HRAP has been run for you.  A grid file called of the interpolated results trgrid1 can be loaded into your project for display.


Display Existing Gridded Runoff Values and Compare with Computed Values.
 

Existing ThreshR grids and FFG grids are stored in the directories "../ffg/<rfc_name>/grro" and "../ffg/<rfc_name>/grff" respectively.  Within these directories, you will typically find files with names xhr1, xhr3, and xhr6 respectively which correspond to the grids for 1, 3, and 6 hour periods.  These data files are stored in the XMRG file format and data are spatially referenced to the HRAP (Hydrologic Rainfall Analysis Project) coordinate system.
 

  • Copy the existing 1 hr ThreshR file for MARFC from the directory /fs/awips/rfc/ffg/files/marfc/grro/xhr1 to your workshop3 directory.
% cd workshop3
% cp /fs/awips/rfc/ffg/files/marfc/grro/xhr1 .
There is an executable program in your ~/marfc/workshop3 directory called "xmrgtolist".  This is a program which will read the xhr1 file in XMRG format and create an ASCII file in a comma delimited format that can be loaded into ArcView as a table and joined to the shapefile "hrappts.shp".
  • Type the following at the UNIX prompt to run the program:
% xmrgtolist xhr1 xhr1
In this case the output file will be named the same as the input file but with a ".txt " extension.
  • Load the xhr1.txt file into ArcView (In the project Window, click once on tr graphic and then click the Add button.  In the Add Table dialog, choose to list files of type "Delimited Text (*.txt)".)


The "Id" field in xhr1.txt corresponds directly to the "Id" field in the hrappts.shp attribute table.  This unique ID number for each of the HRAP points in xhr1.txt and hrappts.shp comes about simply by numbering the hrap cells in an RFC consecutively from the the lower left corner, across columns, up one row, across columns, etc.  The lower left corner HRAP coordinates, and the number of columns and rows for creating the IDs in xhr1.txt are obtained from the xhr1 XMRG header.  This same information was used to create the ID field in "hrappts.shp", thus, these ID values correspond to the same points.

IMPORTANT NOTE:  The hrappts.shp file has already been projected from the HRAP coordinate system into the Albers Equal-Area coordinate system used in AV-ThreshR.  The "ID" for individual HRAP cells in hrappts.shp provides a link so that cell values from the XMRG file can be positioned correctly in Albers space.
 

  • Create a new View and Load a copy of hrappts.shp from the ~/marfc directory.
  • Join the table xhr1.txt to the attributes of hrappts.shp in this new View.  To do this, arrange your windows so that you can View both the "xhr1.txt" table and the "Attributes of Hrappts.shp" table.  Make the "Id" field in xhr1.txt active.  Then make the "Id" field in "Attributes of Hrappts.shp" active.  Click Table --> Join.  This may take a few seconds for such big files.
  • Now display the 1 hr gridded runoff values  from the xhr1 XMRG file by double-clicking on "hrappts.shp", selecting Graduated Color as the Legend type,  selecting "Val (in)" as the Classification Field.  This may take several seconds.  Click apply and place a check mark next to hrappts.shp to display the values.
Displaying a point file with 52,000 points is inefficient.
  • Convert hrappts.shp to a Grid for faster display and analysis.  To convert only points within valid values
    • first query "hrappts.shp" to select all points that have positive values for "Val(in)" tr graphic.
    • Add the "Mask" grid from the ~/marfc data directory to your new view with hrappts.shp.  Modify the Analysis --> Properties for your new View containing hrappts.shp.  Set Analysis Extent to "Same as Mask".  Set Analysis cell size to 4000.  Set Analysis Mask to mask and click ok.
    • Interpolate the values in the "Val(in)" field of hrappts.shp to a 4 km grid by clicking Surface --> Interpolate Grid. Set the method as IDW, choose "Val(in)" as the Z Value Field, and enter 4 as the "No of neighbors."  This may take a few minutes.
The interpolation result will be named "Surface from Hrappts.shp".
 
  • Compare this result with trgrid1 in your other View.  (Using a consistent legend will make visual comparison easier.)
 Differences in these grids can be a point for discussion in the next lecture.

Statistical comparison:

"Surface from Hrappts.shp" -- Existing 1 hr runoffs (inches):  mean=0.84, min=0.5, max=1.4
"Trgrid1" -- ThreshR computed values (inches):  mean=1.04, min=0.02, max=2.7
The same procedure described here can be used to display one of the FFG results grids from the /fs/awips/rfc/ffg/files/marfc/grff directory.  Alternative procedures for displaying XMRG/HRAP grids in ArcView are discussed at http://hsp.nws.noaa.gov/oh/hrl/distmodel/hrap.htm.

That's all for Workshop 3!!



Main Link Categories:
Home | OHD

US Department of Commerce
National Oceanic and Atmospheric Administration
National Weather Service
Office of Hydrologic Development
1325 East West Highway
Silver Spring, MD 20910

Page Author: OHD webmaster
Page last modified: October 14, 2008
Disclaimer
Credits
Glossary
Privacy Policy
About Us
Career Opportunities