knitr::opts_chunk$set(echo = TRUE)

This is a simple package for converting all 109,951 Hydrologic Response Units (HRUs) that are produced by the Monthly Water Balance Model (MWBM) or the Precipitation Runoff Modeling System (PRMS) into Hydrologic Units (HUCs) 2-12.

Conversion values have been pre-calculated and are included in the dependency package "h2hData". Processing time should be under ten minutes.

More information on HRUs

More information on HUCs

Installation

devtools::install_github( repo = "ssaxe-usgs/hru2huc" )

Examples

Generate example matrix
hru <- matrix( data = rnorm( n = 109951 * 10 ),
               nrow = 10,
               ncol = 109951 )
colnames( hru ) <- as.character( 1:109951 )

# or create with real data
hru <- hru2huc::combine_hru_files( allFiles = 
                                     list.files( path       = "C:/Path/To/Containing/Folder",
                                                 full.names = T ) )
Convert to HUC 12
huc12 <- hru2huc::convert_to_huc12( hru.data = hru )
Downscale (convert) to HUCs 2-10
huc2_to_12 <- hru2huc::downscale_HUC12( HUC12_matrix = huc12 )


ssaxe-usgs/hru2huc documentation built on May 5, 2019, 2:42 a.m.