Package: dem2basin
DEM to basin preprocessingThis preprocessing library takes source 1-meter digital elevation model (DEM) data and splits, crops, buffers, and reprojects it to individual hydrologic basins (identified by their unique identifier, the "HUC12" ID).This preprocessing script also produces ancillary data products corresponding to each new HUC12 DEM raster to describe their sub-basins (ie "catchments"), their streams  (ie "flowlines"), and the roughness of each streambed.Taken together, these are the major inputs needed to runGeoFlood, which creates short-term flood projections.Alpha-release Python libraryThe underlying Python library is available on PyPi and can be installed by:pip install dem2basinMain Python scriptThe recommended way to rundem2basin.py:python3 dem2basin.py \
    --shapefile study_area_polygon.shp \
    --huc12 WBD-HUC12s.shp \
    --nhd NHD_catchments_and_flowlines.gdb/ \
    --raster TNRIS-LIDAR-Datasets/ \
    --availability TNRIS-LIDAR-Dataset_availability.shp \
    --directory HUC12-DEM_outputs/ \
    --restart dem2basin-study_area.pickleRequired source data inputsThere are 5 required inputs.--shapefileStudy area polygon vector GIS file:a vector GIS file of a single polygon which defines the study area--huc12USGS Watershed Boundary Dataset (WBD):a HUC12 vector GIS file from USGS's WBD or a subset of the WBD--nhdNHD Medium Resolution (MR):a GeoDataBase of NHD MR catchments and flowlines--rasterTNRIS Lidar:the parent directory to a collection of TNRIS Lidar datasets--availabilityTNRIS Lidar availability:a vector GIS file of TNRIS Lidar availability, provided by TNRIShereOptional parameters--directoryOutputs directory:a directory to store outputs, which will each be sorted by HUC12--restartRestart file:aPython Pickle filefrom which you can restart the preprocessing if it's interrupted--overwriteOverwrite flag:optional flag to overwrite all files found in output directory--overwrite_rastersOverwrite rasters flag:optional flag to overwrite just the raster outputs--overwrite_flowlinesOverwrite flowlines flag:optional flag to overwrite just the flowline outputs--overwrite_catchmentsOverwrite catchments flag:optional flag to overwrite just the catchment outputs--overwrite_roughnessesOverwrite roughness table flag:optional flag to overwrite the roughness table--logLog file:a file to store runtime logDescription of outputsThere are 4 outputs per HUC12.Cropped & buffered DEM:buffered 500mcropped to each HUC12 intersecting the study areaat least 1m resolutionmosaicked with preference for lowest resolution tilesreprojected to the study area's projectionscorresponding NHD MR flowlines:subset of NHD MR flowlineseach flowline's median point along the line lies within the HUC12reprojected to the study area's projectionscorresponding NHD MR catchments:subset of NHD MR catchmentscorrespond with the NHD MR flowlines abovereprojected to the study area's projectionsManning's n roughness table:organized by flowline using theirComIDsvary by stream orderHere is an example of these outputs, originally visualized byProf David Maidment.Already preprocessed DEMsAlready preprocessed DEMs are now available for the vast majority of Texas's HUC12s if you are aTACC user. You can request a TACC accounthere.Notes about preprocessed DEMsThe DEMs are not provided for any HUC12s that have any gap in 1m resolution data.All of the DEMS are reprojected toWGS 84 / UTM 14N, even if the HUC12 is outside of UTM 14.Where to find themThe DEMs are located onStampede2at/scratch/projects/tnris/dhl-flood-modelling/TX-HUC12-DEM_outputs.If you run into troublePleasesubmit a ticketif you have trouble accessing this data. You may also contact me directly at@dhardestylewisordhl@tacc.utexas.eduAvailable preprocessed HUC12sThese HUC12 DEMs are available right now onStampede2.Confirmed successfully preprocessed HUC12sThese HUC12 DEMs have been successfully preprocessed in the past, and will soon be available once again onStampede2. If you need any of theseright now, please contact me.Preprocessing workflowIf you would like an understanding of the preprocessing workflow, I provide a simplified but representative example in thisJupyter notebook. This Jupyter notebook was presented at the inauguralTACC Institute on Planet Texas 2050 Cyberecosystem Toolsin August, 2020. Please contact me if you would like a recording.