bldgrds_nochannels: Total contributing area

bldgrds_nochannelsR Documentation

Total contributing area

Description

Provide a SpatRaster giving the total upslope contributing area to each cell of a DEM. D-infinity flow paths are traced upslope from each cell.

Usage

bldgrds_nochannels(
  input_file = "nofile",
  raster = "nofile",
  dem = "none",
  aspect_length = 0,
  plan_length = 0,
  grad_length = 0,
  scratch_dir = "none"
)

Arguments

input_file

Character string: a "partial" input file (optional). If no input file is specified and no other arguments are present, a Windows Explorer window opens for file selection.

raster

Character string: file name (full path) for an existing contributing-area raster to read from disk (optional).

dem

Character string: The file name (full path) of the dem (elevation raster) for construction of an input file.

aspect_length

Numeric (dbl): Length in meters over which aspect is measured.

plan_length

Numeric (dbl): Length in meters over which plan curvature is measured.

grad_length

Numeric (dbl): Length in meters over which gradient is measured.

scratch_dir

Character string: A scratch directory where temporary files are written. If an input file for program partial is created, it is written here.

Details

Contributing_area operates in one of three modes, depending on the input arguments:

  1. As a wrapper for the Fortran "bldgrds" executable, with an existing "partial" input_file.

  2. As a wrapper for program partial, but with the input file constructed by contributing_area.

  3. To read existing raster files from disk.

In modes 1 and 2, contributing_area calls program partial, which creates the requested rasters and writes them to disk as floating point binary files. These are then read and returned by contributing_area as a SpatRaster object. In mode 3, existing raster files are read directly from disk and returned as a SpatRaster object.

Value

A SpatRaster of total contributing area.


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.