runbLS: Run bLSmodelR

View source: R/runbLS.R

runbLSR Documentation

Run bLSmodelR

Description

Run ‘bLSmodelR’ using the specified model input.

Usage

runbLS(ModelInput, Cat.Path = NULL, ncores = NULL, TDonly = NULL, asDT = TRUE, 
    simpleNames = asDT, memory_limit = NULL, show_progress = TRUE, variables = "CE")

Arguments

ModelInput

a list of data.frames defining the model input as generated by genInputList.

Cat.Path

optional. Character string specifying the path to the touchdown catalogs folder.

ncores

integer. Number of cores used for parallel processing.

TDonly

logical. Skip calculation of C/E etc., only simulate touchdown catalogs? Default is FALSE.

asDT

logical. If TRUE, the Output will be a data.table. The default FALSE returns a data.frame.

simpleNames

logical. Use simple column names for Output, if TRUE. Default FALSE provides more descriptive column names.

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.

Details

It is possible to integrate the entire function in parallel calculation, i.e. on different nodes. The results from different calls can afterwards be merged using the function join.bLSresult.

Value

A data.frame (or data.table) of class bLSresult containing the results of the model run. The following attributes are additionally attached:

CalcSteps

a data.table containing the individual model calculation intervals. Keys: rn,Sensor

CatPath

path to catalog folder

Catalogs

a data.table containing the catalog names. Keys: rn,Sensor,Cat.Name

ModelInput

the ModelInput as supplied.

Author(s)

Christoph Haeni

References

Flesch, T. K., J. D. Wilson, et al. (1995). “Backward-time Lagrangian stochastic dispersion models and their application to estimate gaseous emissions.” Journal of Applied Meteorology 34(6): 1320-1332.

See Also

bLSmodelR-package, genInputList, coreModel, join.bLSresult.

Examples

## Not run: 
# Example Run with default values:
Sensor <- genSensors(PointSensor=list(x=0,y=0,z=2))
Ints <- genInterval(N0=1E4)
InputList <- genInputList(Sensor,Ints)

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

## get catalog
TDcat <- readCatalog(getCatalogs(Run))

# look at TD catalog:
TDcat
plot(TDcat)


## End(Not run)

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