wetland_pond_size: Estimates pond area, depth and perimeter (circular)

View source: R/wetland_pond_size.R

wetland_pond_sizeR Documentation

Estimates pond area, depth and perimeter (circular)

Description

Estimates pond area, depth and perimeter (circular)

Usage

wetland_pond_size(
  CRHM_output = NULL,
  HRU_name = NULL,
  HRU_SD_max = NULL,
  HRU_area = NULL,
  wetland_HRU = NULL,
  area_p_vals = NULL,
  logfile = ""
)

Arguments

CRHM_output

Required. Data frame of CRHM outputs including Sd values for all wetland HRUs.

HRU_name

Required. Names of all HRUs. Can be obtaibes using readPrjParameters.

HRU_SD_max

Required. SDmax values for all HRUs. Can be obtaibes using readPrjParameters.

HRU_area

Required. Areas of all HRUs. Can be obtaibes using readPrjParameters.

wetland_HRU

Optional. A vector of the number of each wetland HRUs.

area_p_vals

Optional. A data frame containing two columns. The first column is the a wetland area (in m^2), the second column is the corresponding value of p to use. If this parameter is not specified, then the default values will be used. The default is to use p = 1.72 for areas greater than 0 and smaller than 10,000 m^2, and p = 3.3 for areas greater than or equal to 10,000 m^2. These values were estimated for Smith Creek basin.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns a data frame consisting of the datetime (or date), and the pond area (m^2), depth (m), and perimeter (m) (assuming the pond is circular) for each time step in CRHM_output.

Note

Because this function may be slow and generates a very large quantity of output, it is a good idea to restrict the range of CRHM_output before calling the function.

Author(s)

Kevin Shook

See Also

Other wetland_functions: wetland_h_s(), wetland_pond_area(), wetland_pond_depth()

Examples

## Not run: 
CRHM_output <- readOutputFile("CRHM_output_1.txt", "Etc/GMT+6")
HRU_name <- readPrjHRUnames("SmithCreek.prj")
HRU_SD_max <- readPrjParameters("SmithCreek.prj", "Sdmax")
HRU_area <- readPrjParameters("SmithCreek.prj", "hru_area")
area <- c(0, 5000, 10000)
p <- c(1.4, 1.7, 3.3)
area_p_vals <- data.frame(area, p)
pond_sizes <- wetland_pond_size(CRHM_output, HRU_name, HRU_SD_max, HRU_area, area_p_vals)
## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.