Skip to contents

Simulates the spread of the inoculum in surface water flow

Usage

mec_surfacewater(dem, mec_soilwater, poi, buffer = 50, quiet = FALSE)

Arguments

dem

a single-band SpatRaster with a digital elevation model

mec_soilwater

the result of mec_soilwater

poi

a single-point sf object denoting the point of interest to run the simulations

buffer

a buffer in meters to extend the spread in every direction

quiet

if TRUE, suppress any message or progress bar

Value

A list with the surface flow risk (SpatRaster), and the surface water (sf)

Details

This function models inoculum movement in downslope streams using the natural drainage network and wetlands. It creates a binary raster for the closest stream to the foci and selects associated downslope streams. The topographic water index (TWI) is used as a proxy for soil moisture to identify wetlands, creating a binary raster for pixels above the 90th percentile of TWI. The wetland raster is then combined with the stream raster to define potential areas for inoculum spread.

References

Li, A.Y., Williams, N., Fenwick, S.G., Hardy, G.E.St.J., Adams, P.J., 2014b. Potential for dissemination of Phytophthora cinnamomi by feral pigs via ingestion of infected plant material. Biol. Invasions 16, 765–774. doi:10.1007/s10530-013-0535-7

Ruiz-Gómez, F.J., Pérez-de-Luque, A., Navarro-Cerrillo, R.M., 2019. The involvement of Phytophthora root rot and drought stress in holm oak decline: from ecophysiology to microbiome influence. Curr. For. Rep. 5, 251–266.

Examples

## load packages
library(sf)
library(terra)

## load data
poi_sf <- st_read(system.file("spatial/poi.geojson", package = "phytorisk"))
#> Reading layer `poi' from data source 
#>   `/home/runner/work/_temp/Library/phytorisk/spatial/poi.geojson' 
#>   using driver `GeoJSON'
#> Simple feature collection with 1 feature and 0 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 332973.8 ymin: 4206649 xmax: 332973.8 ymax: 4206649
#> Projected CRS: ETRS89 / UTM zone 30N
dem_sr <- rast(system.file("spatial/dem_light.tiff", package = "phytorisk"))
trees_sr <- rast(system.file("spatial/trees_light.tiff", package = "phytorisk"))

## simulate mechanism
mec_soilwater_sr <- mec_soilwater(dem_sr, poi_sf)
#>  Filling DEM...
#>  DEM filled [27ms]
#> 
#>  Filling basins...
#>  Basins filled [31ms]
#> 
#>  Removing depressions...
#>  Depressions removed [19ms]
#> 
#>  Filling depressions...
#>  Depressions filled [19ms]
#> 
#>  Getting flow directions...
#>  Flow directions [19ms]
#> 
#>  Calculating flow accumulation...
#>  Flow accumulation calculated [38ms]
#> 
#>  Delineating streams...
#>  Streams delineated [33ms]
#> 
#>  Determining the wet front
#>  Wet front determined [882ms]
#> 
mec_surface_sr <- mec_surfacewater(dem_sr, mec_soilwater_sr, poi_sf)
#>  Calculating natural drainage network...
#>  Natural drainage network calculated [71ms]
#> 
#>  Identifying surface water close to foci...
#>  Surface water close to foci identified [72ms]
#> 
#>  Finding connected pixels...
#>  Finished [873ms]
#>