windDisp: Dispersal of seeds by wind

Description Usage Arguments Details Value Author(s)

Description

Disperses seeds from a matrix by using a 2 dimensional dispersal kernel

Usage

1
windDisp(SD2D, SEEDS, MASK, zeroToNULL)

Arguments

SD2D

Sedd Dispersal kernel 2D - matrix defining the 2D seed dispersal kernel

SEEDS

matrix specifying the number of seeds to be dispersed

MASK

matrix defining the area in which processing takes place (!is.na(MASK))

zeroToNULL

boolean if TRUE replace 0 with NA in the returned matrix, otherwise all NA will be replaced with 0

Details

This function uses a 2D seed dispersal kernel in form of a matrix to disperse seeds from a seed source in form of a matrix and returns a matrix of the same size containing the seed distribnution after the seeds in the original seed matrix are dispersed.

The function uses an inverse approach, by going over all cells and determining the number of seeds dispersed into the cell from all the cells under the dispersel kernel. To calculate the number of seeds dispersed into each cell, the foolowing steps are done:

1) The dispersal kernel is centered over the for which the number of seeds to be dispersed into will be calculated

2) for each cell under the dispersal kernel SD2D the following is done

2.1) if the corresponding cell in MASK is NA, no seeds are dispersed into this cell

2.2) for each cell under the kernel SD2D for which the underlying MASK is not NA a binominal distributed random number is drawn with

rbinom(1, noOfSeeds, prob)
noOfSeeds : number of seeds in the cell from which the seeds orriginate
prob : probability from SD2D kernel of the corresponding cell

and summed up for the whole kernel.

This function is implemented in C (windDispCpp)

The C function requires the seed raster to be buffered by half the width of the seed dispertsal kernel SD2D which is done in the function before calling the C function.

Value

matrix of same size as SEEDS containing the dispersed seeds

Author(s)

Rainer M Krug Rainer@krugs.de


rkrug/seedDisp documentation built on July 6, 2019, 4:37 p.m.