genInputList: Model Input

View source: R/genInputList.R

genInputListR Documentation

Model Input

Description

Create a list gathering the required model input.

Usage

genInputList(..., Tol.Zero = FALSE)

Arguments

...

optional arguments containing pre-defined model input:

Class-Interval

a data.frame as generated by genInterval containing the Interval input.

Class-Sensors

a data.frame as generated by genSensors containing the Sensors input.

Class-Sources

a data.frame as generated by genSources containing the Sources input.

Class-Model

a list as generated by genModel containing the Model parameter input.

Class-Tolerances

a data.frame as generated by genTolerances containing the Tolerances input.

Tol.Zero

logical. If TRUE, all touchdown catalog selection tolerances will be set to zero.

Value

a list containing all necessary model input.

Author(s)

Christoph Haeni

See Also

genInterval, genSensors, genSources, genModel, genTolerances, runbLS, bLSmodelR-package.

Examples

## Not run: 
## generate source areas:
Sources <- genSources("Circle 1" = list("c", M = c(0,0), R = 10),
  "Circle 2" = list("c", M = c(0,30), R = 20, N = 50))

## generate sensors:
Sensors <- genSensors(LineSensor1=list(x=-30,y=c(-10,50),z=1.25,n=40)
  ,LineSensor2=list(x=30,y=c(-10,50),z=c(1.05,1.25),d=0.5))

## look at site map:
siteMap(Sensors,Sources,PolyArgs=list(col="darkgreen")
  ,PtArgs=list(pch=3,cex=0.8,lwd=2),SourceTextArgs=list(cex=1,col="navyblue")
  ,SensorTextArgs=list(cex=0.7,pos=3),xlim=c(-60,60))
addScaleBar()
addWindrose(WD = 270)

# generate interval data:
Int <- genInterval(WD=270,N0=1E4,SensorNames="LineSensor2",SourceNames="Circle 1,Circle 2")

## generate List of model input:
Model <- genModel(TDwrite=FALSE)
InputList <- genInputList(Int, Sources, Sensors, Model)

## run bLSmodelR (takes 2 to 5 mins):
Run <- runbLS(InputList,Cat.Path=getwd())

# switch names to "informative" and extract specific results (Source column is sorted accordingly)
switchNames(Run,simple=FALSE)
extractResult(Run,list(Source=c("Circle 2","Circle 1")),keep=c("Sensor","Source","C/E","C/E SE"))

## clean up TD catalogs
cleanTemporary()

## End(Not run)



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