This software is used for calculating peak flow at given points (typically, inlets/catch basins) over a hydrologically-corrected DEM.
This software encompasses work originally developed by the Cornell Soil & Water Lab (on GitHub @ github.com/SoilWaterLab). see Credits/Contributors, below.
This repository represents a hard fork of the Water Lab's Culvert_Beta repository. Code from the original repository is limited primarily to equations found in /core/logic/calc.py
.
In summary, this toolset will determine the runoff peak discharge of given point's watershed using the SCS graphical curve number method. For more information on this method, see Technical Release 55.
This toolbox relies on:
As ArcGIS Pro is Windows-only software, this works only on Windows (see Plans, near the end of this Read Me)
There are a few ways to install. If you're unfamilar with Python Conda environments and plan on using this stricly within ArcGIS Pro, then start here:
Download (or clone) the contents of this repository to your computer.
First, start with these instructions for creating and activating an environment on Esri's help site.
Then, move on to the instructions for installing available packages.
Following those instructions, you'll need to install four packages:
Once those are installed, make sure your new environment is active. You will likely need to restart ArcGIS Pro.
(skip this if you installed per the instructions in the previous section)
requirements.txt
file to the environment.In your ArcGIS Pro project connect to a toolbox (follow these instructions if you haven't done it before).
The Peak Flow calculator takes several inputs:
/sample_data/noaa_precip_table.csv
for the duration and frequencies expected by this tool)From these, it calculates peak flow for every input point. Peak flow results are reported in cubic feet/second for every storm frequency from 1 to 1000 year storm.
An ArcToolbox is provided for running these scripts in ArcGIS Pro, PeakFlow.tbx
.
Two scripts are used to build and/or prep a curve number raster, which is a prerequisite for running the tool.
CSV
file. A sample of the lookup table, which maps landcover class values to soil values and TR55 curve numbers, is available in /sample_data/urbantreecanopy_curvenumber_lookup.csv
.Three scripts run the Peak Flow Calculator:
You can run the toolbox outside of ArcGIS Pro from the command line, as long as ArcGIS Pro is installed/licensed on your machine.
Currently, the CLI exposes a few, slightly different versions of the tools described above:
Available commands will likely coorespond with available ArcToolbox tools in future iterations of this codebase.
core/
root provide interfaces between the business logic contained in core/logic/
and the ArcToolbox; Those suffixed by _tbx
are referenced directly by tools in PeakFlow.tbx
core/logic/
contains the business logic. The logic
module itself contains one function, main
, which handles orchestrating the various underlying components end-to-end.core/logic/calc.py
contains the equations used to calculate peak flow.core/logic/data_io.py
is used for reading in preciption tables (and is where to park other custom data ingest routines)core/logic/gp.py
contains all functions that perform geoprocessing using the ArcPy package, including reading and writing spatial datasetscore/logic/utils.py
contains utilty functions.See the wiki for more information on the business logic.