Skip to main content
U.S. flag

An official website of the United States government

New Open-Source Projects Using NHDPlus

April 14, 2021

Two new open-source projects, Xstrm and FCPGtools, have been released that provide functionality based on versions of the NHDPlus. Both projects provide tools to summarize landscape characteristics using the older NHDPlus V2, and also will work with NHDPlus HR. Both projects are Python-based, and work on Linux-based High Performance Computing platforms and on Windows systems.

Xstrm

Contact: Daniel Wieferich (dwieferich@usgs.gov)

The xstrm Python package and associated command line tool, 'network_calculator', is intended to assist with up and down stream network summarization of variables assigned to a stream segment. Methods are built in a generalized way and are intended to support efforts for any stream network having general topology i.e. to and from nodes. Specifically, this package was built to support fisheries based analyses using multiple versions of the National Hydrography Database Plus (NHDPlus) that represent streams within the United States along with HydroBasins which represent global drainage areas. The package currently includes the following:  

  • Python methods (build_network.py, network_calc.py, xstrm.py) and command line tool (network_calculator.py) to support upstream or downstream summaries of information attributed to local stream segments or drainages. Summary types currently supported include sum, min, max, or weighted average. 

  • Ability to export a complete network to hdf5 file format. Note, networks are exported using index values to improve processing efficiency and reduce size of the hdf5 file. 

  • For a given network return all upstream or downstream segment or drainage identifiers. 

  • A mock network is included in tests folder for convenience of testing and understanding functionality. An image of the network, diagram_of_test_data.JPG, along with network data, test_local_data.csv, are included. 

  • common_networks folder, contains processing steps for commonly used stream networks such as NHDPlusV2.1. 

► This tool can be used to summarize catchment or stream channel characteristics throughout a network. For complete information, see:  

Wieferich, D.J., Williams, B., Falgout, J.T., Foks, N.L. 2021. xstrm. U.S. Geological Survey software release. https://doi.org/10.5066/P9P8P7Z0

 

FCPGtools

Contact: Theo Barnhart (tbarnhart@usgs.gov)

The Flow-Conditioned Parameter Grid (FCPG) Tools are a Python 3 library to make FCPGs for either two-digit Hydrologic Unit Code (HUC2) regions, four-digit Hydrologic Unit Code (HUC4) regions, or other geospatial tiling schemes. It relies on a raster represenation of the stream network. These tools can be used in a Linux-based high performance computing (HPC) environment or locally on your system. 

FCGPs combine flow-direction and flow-accumulation rasters (from NHDPlus or another source) with parameter rasters, such as elevation, slope, land cover or any other parameter that can be represented in raster format. In this way, an FCGP can provide the mean value of a parameter over the entire upstream drainage area, evaluated for every raster grid cell. For example, an FCGP of slope contains the mean slope of over the entire upstream drainage area. This value can be queried very rapidly, and parameters represented in such a way are ideal for use in Machine Learning applications.  

For complete information on the FCPGtools see:  

Barnhart, T.B., Sando, R., Siefken, S.A., McCarthy, P.M., and Rea, A.H., 2020, Flow-Conditioned Parameter Grid Tools: U.S. Geological Survey Software Release, DOI: https://doi.org/10.5066/P9W8UZ47

The FCPGtools have been used on the USGS Yeti High Performance Computing environment to produce FCGPs for several parameters for the Conterminous United States (CONUS). FCPGs have been generated describing upstream basin mean elevation, slope, land cover class, latitude, and 30-year climatologies of mean total annual precipitation, minimum daily air temperature, and maximum daily air temperature. These data are provided as virtual raster tile (vrt) mosaics of cloud optimized GeoTIFFs to allow point queries of the data (see Distribution Information) without requiring downloading the whole dataset. 

For complete information on the CONUS FCPGs, see:  

Barnhart, T.B., Schultz, A.R., Siefken, S.A., Thompson, F., Welborn, T., Sando, T.R., Rea, A.H., McCarthy, P.M., 2021, Flow-Conditioned Parameter Grids for the Contiguous United States: A Pilot, Seamless Basin Characteristic Dataset: U.S. Geological Survey Data Release, https://doi.org/10.5066/P9HUWM6Q

Get Our News

These items are in the RSS feed format (Really Simple Syndication) based on categories such as topics, locations, and more. You can install and RSS reader browser extension, software, or use a third-party service to receive immediate news updates depending on the feed that you have added. If you click the feed links below, they may look strange because they are simply XML code. An RSS reader can easily read this code and push out a notification to you when something new is posted to our site.