Description Usage Arguments Details Value Note Author(s) Examples
View source: R/singleIterationFunctions.R
Calculates raster (cell) based soil loss due to either pads or roads.
1 |
rusleIn |
List returned from |
padsIn |
List output from |
roadsIn |
Optional. List returned from |
If argument is provided to roadsIn
, output will be for roads only.
To get output for pads, roadsIn
must be omitted. Vegetative cover C
will
be changed from input classification to 0.2 to represent development. Soil loss will
be calculated for three variations of management practice P
: P = 0.1 for seeded
and sediment dentention pond; P = 0.18 for seeded and rough surface; P = 0.26 for
seeded and smooth surface. Changes in C
and P
are based on values suggested
by Linard et. al. (2014) in USGS Open-File Report 2014-1158 (https://dx.doi.org/10.3133/ofr20141158).
Total soil loss change compared to baseline.
Edited by CDMartinez 2 Feb 17
Created by CDMartinez 21 Oct 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | library(raster)
set.seed(46)
OGasmt <- continuousAssessment(auMC = 5,
auType = 'Gas',
auProbability = 1,
auAreaProductive = c(100,400,800),
auAreaDrainage = c(10,20,40),
auPercAreaUntested = c(93,96,99),
auPercAreaSweet = c(100,100,100),
auPercFutureSS = c(20,40,50),
auEURss = c(0.15,0.4,0.65),
auLGR = c(.08,.5,1),
year = 2016)
OGasmt <- convertAcre2sqMeter(OGasmt)
rBase <- raster(resolution = c(10,10), xmn = 0, xmx = 2000, ymn = 0, ymx = 2000)
values(rBase) <- sample(1:10, 40000, replace = TRUE)
points <- rbind(c(250,250),c(250,1750),c(1750,1750),c(1750,250),c(250,250))
shape <- SpatialPolygons(list(Polygons(list(Polygon(points)), 'auOutline')))
plot(rBase, xlim = c(0,2000), ylim = c(0,2000))
lines(shape)
prepSpatial <- prepareSimSpatial(surfaceRaster = rBase, shape, OGasmt)
distributionPrep <- prepareSimDistributions(prepSpatial,wellsPerPad = 3,
padArea = 500, EA = OGasmt, numIterations=5)
dxdy <- 400
# Slope-length factor
tempI <- matrix(complex( real = rep(seq(0.4, .47, length.out = dxdy), each = dxdy ),
imag = rep(seq(.3, .42, length.out = dxdy), dxdy)), ncol= dxdy, nrow = dxdy)
tempZ <- 0
for(k in 1:20){tempZ <- tempZ^2+tempI}
rLS <- raster(exp(-abs(tempZ))*20)
extent(rLS) = extent(prepSpatial$rGrid)
# Vegetative cover factor
rC <- raster(matrix(sample(seq(.001, .05, length.out = 7), size = dxdy,
replace = TRUE), nrow = sqrt(dxdy)), xmn = -500, xmx = 2500, ymn = -500, ymx = 2500)
# Soil erodibility factor
rK <- raster(matrix(sample(seq(.01, .7, length.out = 15), size = dxdy,
replace = TRUE), nrow = sqrt(dxdy)), xmn = -500, xmx = 2500, ymn = -500, ymx = 2500)
# Rainfall erosivity
rR <- raster(matrix(rep(10, dxdy), nrow = sqrt(dxdy)), xmn = -500,
xmx = 2500, ymn = -500, ymx = 2500)
# Soil Loss will be aggregated across entire area
prepRusle <- prepareRusle(prepSpatial, R = rR, K = rK, LS = rLS, C = rC)
pads <- placePads(distributionPrep, 5)
soilLoss <- rusle(rusleIn = prepRusle, padsIn = pads)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.