total_area_volume_patchcount: Finds total water volumes, areas and patch counts in WDPM...

View source: R/total_area_volume_patchcount.R

total_area_volume_patchcountR Documentation

Finds total water volumes, areas and patch counts in WDPM output files

Description

The total area and volume are used to find hysteresis and to determine the contributing (conencted) fraction.

Usage

total_area_volume_patchcount(
  location = ".",
  threshold = 0.001,
  filespec = "*.asc",
  outfile = ""
)

Arguments

location

Optional. Directory containing the WDPM output files. Default is the current working directory.

threshold

Optional. Threshold (in m) to determine the existence of water. The default value is 0.001 m, i.e. 1 mm.

filespec

Optional. File specification of WDPM output in current working directory. Default is *.asc.

outfile

Optional. Name of file to export values. Values are comma-delimited. If not specified, values are not written.

Value

Returns basin area, water volume, water area for each .asc file. Optionally writes values to outfile.

Author(s)

Kevin Shook

Examples

## Not run: 
setwd('./WDPM/output')
areasVolumes <- totalAreaVolume(filespec='*_d.asc', 'drainedAreasVolumes.csv')
## End(Not run)

KevinShook/WDPMr documentation built on April 23, 2022, 12:32 a.m.