weighted_CN: Calculate the Weighted CN (Curve Number)

weighted_CNR Documentation

Calculate the Weighted CN (Curve Number)

Description

This function computes the weighted CN (Curve Number) using the user-supplied unit or the default unit of an acre.

Usage

weighted_CN(
  CN = NULL,
  CN_area_table = NULL,
  CN_area_pct_table = NULL,
  area = NULL,
  area_pct = NULL,
  area_units = c("acre", "square feet", "square mile", "hectare", "square kilometer")
)

Arguments

CN

numeric vector containing dimensionless Curve Number(s)

CN_area_table

data.frame/data.table/tibble, list, or matrix containing the CN in column 1 and the area in column 2

CN_area_pct_table

data.frame/data.table/tibble, list, or matrix containing the CN in column 1 and the area_pct in column 2

area

numeric vector containing the surface land area

area_pct

numeric vector containing the surface land area, as a percent (decimal or whole number)

area_units

character vector containing the units for area (default = "acre"). The other possible units are "square feet", "square mile", "hectare", or "square kilometer". The units should be consistent and not mixed.

Value

the Weighted Curve Number as a single numeric vector, in the range [0, 100]

Note

This function was originally part of Claudia Vitolo's curvenumber package that Irucka now maintains.

Author(s)

Irucka Embry

References

  1. United States Department of Agriculture Soil Conservation Service National Employee Development Staff, "Engineering Hydrology Training Series Module 104 - Runoff Curve Number Computations Study Guide", September 1989, page 21, https://web.archive.org/web/20210414043852/https://www.wcc.nrcs.usda.gov/ftpref/wntsc/H&H/training/runoff-curve-numbers1.pdf. Retrieved thanks to the Internet Archive: Wayback Machine

  2. Dr. Clyde Munster, P.E., Texas A&M University Department of Biological and Agricultural Engineering, "Rational Method: Calculating Peak Flow Rates", https://web.archive.org/web/20180218221234/http://munster.tamu.edu/Study_Abroad/BAEN460_AGSM335/PowerPoint/RationalMethod_5.pdf. Retrieved thanks to the Internet Archive: Wayback Machine

  3. United States Department of Agriculture Natural Resources Conservation Service Conservation Engineering Division, "Urban Hydrology for Small Watersheds Technical Release 55 (TR-55)", June 1986, https://directives.sc.egov.usda.gov/OpenNonWebContent.aspx?content=22162.wba

Examples


# Note: the default area unit is an acre

# Example 1

library(iemisc)

area1 <- c(220, 150, 30)
CN1 <- c(75, 89, 80)
weighted_CN(CN = CN1, area = area1)


# Example 2

library(iemisc)

area2 <- c(220, 150, 30)
area_pct2 <- area2 / sum(area2)
CN2 <- c(80, 95, 80)
CN_area_pct_table2 <- data.frame(CN2, area_pct2)
weighted_CN(CN_area_pct_table = CN_area_pct_table2)


# Example 3

install.load::load_package("iemisc", "data.table")

CN_area_table3 <- data.table(CN = c(98, 100, 45), area = c(2.53, 453.00, 0.21))
weighted_CN(CN_area_table = CN_area_table3)


# Example 4

library(iemisc)

CN4 <- c(98, 100, 45)
area_pct4 <- c(0.15, 0.23, 0.62)
weighted_CN(CN = CN4, area_pct = area_pct4)


# Example 5

library(iemisc)

import::from(ramify, mat)


data_matrix5a <- matrix(c(98, 30, 40, 43, 57, 3.24, 1, 30, 50, 123),
nrow = 5, ncol = 2, dimnames = list(rep("", 5), c("C", "Area")))
weighted_CN(CN_area_table = data_matrix5a)


# using ramify to create the matrix
data_matrix5b <- mat("98 30 40 43 57;3.24 1 30 50 123", rows = FALSE,
sep = " ", dimnames = list(rep("", 5), c("CN", "Area")))
weighted_CN(CN_area_table = data_matrix5b)


# Example 6 - using area in square feet

library(iemisc)

data_list6 <- list(CN = c(77, 29, 68), Area = c(43560, 56893, 345329.32))
weighted_CN(CN_area_table = data_list6, area_units = "square feet")


# Example 7 - using area in whole percents

library(iemisc)

CN7 <- c(61, 74)
area_pct7 <- c(30, 70)
weighted_CN(CN = CN7, area_pct = area_pct7)



iemisc documentation built on Sept. 25, 2023, 5:09 p.m.