## Introduction

HEC-HMS uses the same zonal statistics algorithm throughout the program to sample average raster values for polygons. Applications include the Expression Calculator, the Hypothetical Storm, and the Frequency Storm. In this tutorial we will use GIS tools to perform zonal statistics calculations for a grid, then we will use the Frequency Storm Calculator and Hypothetical Storm with a Precipitation Frequency grid to do the same calculations. We will compare the results from the different methods. This exercise was completed using HEC-HMS 4.10 and requires the users to have access to this version or newer to complete the Frequency Depth Calculator portion of this tutorial.

NOAA Atlas 14 Precipitation Frequency grid depths are in units of thousands of inches. A Unit Scale Factor correction must be applied when importing NOAA Atlas 14 grids into your model.

## Extracting the average raster value for a subbasin polygon in ArcMap

ESRI ArcGIS is a geographic information system that has a variety of tools to perform spatial statistics on raster data. For this step we will be using subbasin shapefiles to determine the spatially averaged 100-YR precipitation depth for the 6-hour storm within each subbasin with ArcMap geoprocessing tools.

2. Click and drag the sw100yr06ha.asc and CottonwoodCkSubbasins datasets, one at a time into the data view window. You can also add data by clicking the Add Data button from the toolbar ribbon and navigate to your downloaded materials.

3. Click on the ArcToolbox button on the toolbar ribbon. Navigate to Spatial Analyst | Zonal. Double click on Zonal Statistics As Table to open the tool. The tool will open in its own dialog window.

ArcToolbox button:

4. Select CottonwoodCkSubbasins from the Input raster or feature zone data dropdown. Select "Name" from the Zone field dropdown. Select sw100yr06ha.asc from the Input value raster dropdown.
5. For Output table, browse to your folder directory and name the output table ZonalStatsGIS.
6. Select MEAN for Statistics type.
7. Click OK. Once computed, the results table will be added to Table of Contents window. Right-click on the table and select Open Attribute Table to view results. Remember, results will display in units of thousands of inches.
8. Select File | Save as and save your save the map as CottonwoodCk_100YRDepth.mxd.

## Extracting the average raster value for a subbasin polygon in QGIS

QGIS is a free and open-source geographic information system that offers much of same functionality as ArcMap. For this step we will be using subbasin shapefiles to determine the spatially averaged 100-YR precipitation depth for the 6-hour storm within each subbasin with QGIS geoprocessing tools.

1. Open QGIS and click the Open Data Source Manager button.

Open Data Source Manager button:

2. Select Vector to add the vector data. Set Source Type to File and Encoding to System. Browse to the downloaded materials and select the CottonCkSubbasins.shp file. The .shp extension must be selected in order to add the shapefile to the QGIS project.

3. Click Add. You will see the subbasins shapefile has now been added to the Layer List window. Do not close the Data Source Manager window yet.
4. Select Raster to add the raster data.  Set Source Type to File. Browse to the downloaded materials and select the sw100yr06ha.asc file.
5. Click Add. You will see the sw100yr06ha has now been added to the Layer List window. Click Close to close the Data Source Manager window.
6. Find the Locator search bar in the lower left of the QGIS window. Type Zonal into the search bar and double-click on Zonal Statistics. The tool will open in its own dialog window.
7. Select sw100yr06ha from the Raster layer dropdown. Raster band will automatically be set to Band 1 as this precipitation depth grid has only one band.
8. Select CottonCkSubbasins from the Vector layer containing zones dropdown.
9. In the Output column prefix field, type 100YRDEPTH_. This defines the name of the field to be appended to the shapefile attribute table which will contain selected zonal statistics.
10. In the Statistics to calculate field select Mean. Deselect any other selected statistics.
11. Click Run. The status bar will display 100% once the process has finished. Click Close to close the Zonal Statisitics dialog window. Right-click on the CottonCkSubbasins and select Open Attribute Table to view results. Remember, results will display in units of thousands of inches.
12. Select File | Save as and save your save the map as CottonwoodCk_100YRDepth.qgz.

## Using the Frequency Depth Calculator to extract a depth value for a subbasin polygon

The Frequency Depth Calculator is a feature introduced in HEC-HMS version 4.10. It requires a model with georeferenced subbasins and imported precipitation frequency grids. You can find a more detailed walk-through of importing frequency precipitation grids in the Applying New Frequency Storm Enhancements tutorial. The 100-YR precipitation grids have already been imported into the model provided in the downloaded materials.

1. Start HEC-HMS (version 4.10 or newer) and open the Cottonwood Creek project. We will increase the precision of calculated values in our HMS model to further validate results between methods.
2. Select Tools | Program Settings | Compute.  Increase Expression calculator precision to 5. Click OK to close the Program Settings window.
3. Open the meteorologic model by expanding the meteorologic model folder in the Watershed Explorer and expand the A14_100yr - Frequency Depth meteorologic model.
4. Click on Frequency Storm to open the Frequency Storm Component Editor.
1. Storm Duration: 6 Hours
2. Intensity Duration: 15 Minutes
3. Intensity Position: 50 Percent
4. Area Reduction: --None-- (We are comparing unreduced depths, so Area Reduction is not necessary for this exercise)
5. Spatial Distribution: Variable By Subbasin
5. Click the Frequency Precipitation Calculator button. Set the Basin to Cottonwood Creek. Select the corresponding grid for 15 Min, 1 Hr, 2 Hr, 3 Hr and 6 Hr Grids

Frequency Precipitation Calculator button:

6. Click Calculate to view results in the Precipitation-Frequency Depths dialog window.
7. Click Apply and then Close to close the Precipitation-Frequency Depths dialog window.

## Using the Hypothetical Storm to extract a depth value for a subbasin polygon

1. Open the Cottonwood Creek HMS Model. We will increase the precision of depth result values in our HMS model to further validate results between methods.
2. Select Tools | Program Settings | Results.  Increase Depth digits to 4. Click OK to close the Program Settings window.
3. Open the meteorologic model by expanding the meteorologic model folder in the Watershed Explorer and expand the A14_100yr - Hypothetical Storm meteorologic model.
4. Click on Hypothetical Storm to open the Hypothetical Storm Component Editor.
1. Method: User-Specified Pattern
2. Storm Pattern: SW6hr_20%_1Q
3. Storm Duration (HR): 6
4. Precipitation Method: Precipitation-Frequency Grid
5. Grid: 100 YR 6hr
6. Computation Point: Outlet
7. Area Reduction: --None--
5.  Compute the 100YR Hypothetical Storm Depth-Area Analysis run by selecting the 100YR Hypothetical Storm run in the dropdown menu and clicking Depth Area Analysis Compute button. The depth area analysis is used in this example so we can simultaneously get precipitation depths averaged over each subbasin's drainage area within a single simulation.

Depth Area Analysis Compute button:

6. Click on the Results tab of the Watershed Explorer. Expand the Depth-Area Analyses and navigate down to the S1 subbasin within the S1 folder. Click the Summary Table to view Precipitation Volume results. This is the 100-YR precipitation depth extracted from subbasin S1.
7. Repeat step 6 for each of the remaining subbasins.

## Comparing Results

Compare your results and confirm that all four methods yield the same results for the 6-hour 100-Year precipitation depth for each of the Cottonwood Creek subbasins.

SubbasinArcMapQGISHMS Frequency Depth CalculatorHMS Hypothetical Storm
S13.57153.57153.57153.5715
S23.70763.70763.70763.7076
S32.94032.94032.94032.9403
S43.02723.02723.02723.0272
S53.31163.31163.31163.3116
Validation