Get layer
Obtains a project raster layer for further analysis.
## S4 method for signature 'RPhosFate'
getLayer(x, i, j = NULL)
## S4 method for signature 'RPhosFate,ANY,ANY'
x[i, j]
Arguments
x
: An S4 RPhosFate
river catchment object.
i
: A character string specifying a layer name. Substance related layers whose names start with xx are treated differently. They have to be queried by their name (not filename), for example, "xxc"
in combination with "PP"
in argument j
queries the particulate phosphorus concentrations in top soils. See subdirectory sections for further information.
j
: A character string specifying a substance if applicable.
Returns
A terra::SpatRaster
object.
Input subdirectory
This directory holds all possible user input raster data (flow obstacles like roads must be considered during the generation of the flow accumulation layer and must also be cut out from it in order to be properly respected):
- acc_inf: D-infinity flow accumulations in number of upslope grid cells required for everything.
- CFa: (R)USLE C-factors required for
erosion
.
- cha: Channel cells required for everything (
1
: channel cell, NA
: no channel cell).
- clc: Clay contents of top soils in % required for substance
emission
s.
- dem: Digital elevation model in m a.s.l. (optional).
- dir_inf: D-infinity flow directions in azimuth degrees measured from north (0 to 360 clockwise) required for
transportPrerequisites
and substance transport
.
- fid: Field IDs (optional).
- KFa: (R)USLE K-factors required for
erosion
.
- lue: Land use classes (optional).
- man: Manning's roughness coefficients required for substance
transport
.
- xxc: Substance contents of top soils in mg/kg required for substance
emission
s, for example, ppc for PP top soil contents.
- rds: Road cells required for
transportPrerequisites
(0
: road cell without subsurface drainage, 1
: road cell with subsurface drainage, NA
: no road cell).
- RFa: (R)USLE R-factors required for
erosion
.
- slp_inf: D-infinity slopes in % required for everything.
- wsh: Watershed (optional).
Intermediate subdirectory
This directory holds intermediate calculations:
- inl: Cells representing inlets at roads (storm drains).
- LFa: L-factors.
- rip: Cells representing the riparian zones within channel cells.
- SFa: RUSLE S-factors.
- slp_cap: Capped slopes in %.
Result subdirectory
This directory holds the model results:
- ero: Erosion in t/cell/yr.
- xxe: Substance emissions in kg/cell/yr, for example, ppe for PP emissions.
- xxr: Substance retentions in t/cell/yr (SS) or kg/cell/yr, for example, ppr for PP retentions.
- xxt: Substance transports in t/cell/yr (SS) or kg/cell/yr, for example, ppt for PP transports.
- xxt_cld: Substance cell loads in t/cell/yr (SS) or kg/cell/yr, for example, ppt_cld for PP cell loads.
- xxt_ctf: Substance cell transfers in t/cell/yr (SS) or kg/cell/yr, for example, ppt_ctf for PP transfers.
- xxt_inp: Substance inputs into surface waters in t/cell/yr (SS) or kg/cell/yr, for example, ppt_inp for PP inputs into surface waters.
- xxt_out: Substance outlet loads of subsurface drainages in t/cell/yr (SS) or kg/cell/yr, for example, ppt_out for PP outlet loads.
Examples
# temporary demonstration project copy
cv_dir <- demoProject()
# load temporary demonstration project
x <- RPhosFate(
cv_dir = cv_dir,
ls_ini = TRUE
)
# presupposed method call
x <- firstRun(x, "SS")
getLayer(x, "dir_inf")
getLayer(x, "xxt", "SS")
getLayer(x, "xxe", "PP")