Learn R Programming

dynatopmodel (version 1.2.1)

build_layers: Construct basic landscape layer data for Dynamic TOPMODEL run

Description

Given an elevation raster this function will create a basic multi-band raster that can be used to run Dynamic TOPMODEL after applying a suitable discretisation. It comprises the supplied elevations with the addition of upslope contributing area and topographic wetness index (TWI).

Usage

build_layers(dem, fill.sinks = TRUE, deg = 0.1)

Arguments

dem

Elevation raster using a projected coordinate system (e.g UTM) and regular grid spacing. Should have a resolution of a least 30m for the TWI to be meaningful.

fill.sinks

If TRUE (default) then run a sinkfill before calculating the upslope area and TWI.

deg

Threshold intercell slope to determine sinks (degrees).

Value

A multi-band raster (stack) comprising, in order, the elevations, upslope area and topographic wetness index values.

Examples

Run this code
# NOT RUN {
require(dynatopmodel)
data("brompton")

# Upslope area and wetness index for Brompton catchment
layers <- build_layers(brompton$dem)

sp::plot(layers, main=c("Elevation AMSL (m)", "Upslope area (log(m^2/m))", "TWI ((log(m^2/m))"))
# }

Run the code above in your browser using DataLab