deposition: Dry Deposition Post-Processing

View source: R/deposition.R

depositionR Documentation

Dry Deposition Post-Processing

Description

Run the ‘bLSmodelR’ dry deposition post-processing function.

Usage

deposition(x, vDep, rn = NULL, Sensor = NULL, Source = NULL, vDepSpatial = NULL, 
    ncores = 1, memory_limit = NULL, show_progress = TRUE, variables = 'CE')

Arguments

x

A data.frame (or data.table) of class bLSresult output by runbLS containing the results of a model run.

vDep

either a numeric vector providing the model surface deposition velocity (at height d + z0) for the rows specified by argument index or a character string specifying the column that contains the vDep values.

rn

integer. Subsetting by column ‘rn’. Only matching rows will be post-processed.

Sensor

character. Subsetting by column ‘Sensor’. Only matching rows will be post-processed.

Source

character. Subsetting by column ‘Source’. Only matching rows will be post-processed.

vDepSpatial

a list with two entries (this argument is still experimental!). First list entry is a named list or named vector that defines area names with corresponding deposition velocities. Second list entry is an object of class Sources (see genSources) that defines the geometry of those areas (see example below). Note: Areas should not overlap each other!

ncores

integer. Number of cores used for parallel processing.

memory_limit

character. Maximal vector heap size (memory limit) specified via 'R_MAX_VSIZE' (see also ?Memory). This has only an effect if R is running in a bash environment.

show_progress

logical. Show progress when computing output variables in prallel. Defaults to TRUE.

variables

character vector specifying the output variables of line sensors to calculate (any combination of "CE", "wCE", "uCE", "vCE"). Defaults to "CE" only which can reduce calculation time significantly.

Value

A data.frame (or data.table) of class bLSresult and deposition containing the results of the model run and the deposition post-processing. The following attribute is additionally attached to the existing bLSresult attributes:

vDep

vector of surface deposition velocities

Author(s)

Christoph Haeni

See Also

bLSmodelR-package, genInputList, coreModel.

Examples

## Not run: 
# Example Run with default values:
Sensor <- genSensors(
  PointSensor1=list(x=0,y=0,z=2)
  ,PointSensor2=list(x=10,y=0,z=2)
  )
Sources <- genSources("Circle 1" = list("c", M = c(0,50), R = 10))
Ints <- genInterval(MaxFetch=70)
InputList <- genInputList(Sensor,Ints,Sources)

## run model
Run <- runbLS(InputList,Cat.Path=getwd())

## dry deposition post-processing:
RunDep <- deposition(Run,vDep=0.035,Sensor='PointSensor1')

## spatially inhomogeneous deposition velocity (still experimental!)
DepAreas <- genSources(
	"Circle 2" = list("c", M = c(0,30), R = 10)
	,"Circle 3" = list("c", M = c(0,10), R = 10)	
)
DepVel <- list("Circle 2" = 0.005,"Circle 3" = 0.01)
plot(Sensor,join(Sources,DepAreas),SourceTextArgs=list(labels=paste0('vDep = ',c(0,0.005,0.01))))
RunDep2 <- deposition(Run,vDep=0.035,Sensor='PointSensor1',vDepSpatial=list(DepVel,DepAreas))



## End(Not run)

ChHaeni/bLSmodelR documentation built on Dec. 5, 2024, 8:47 a.m.