| run_sl | R Documentation |
This function computes light interception and radiative balance for a forest stand using the SamsaRaLight ray-tracing engine.
run_sl(
sl_stand,
monthly_radiations,
sensors_only = FALSE,
detailed_output = FALSE,
parallel_mode = FALSE,
n_threads = NULL,
verbose = TRUE
)
sl_stand |
An object of class |
monthly_radiations |
A data.frame of monthly horizontal radiation
( |
sensors_only |
Logical.
If |
detailed_output |
Logical.
If |
parallel_mode |
logical. If TRUE, ray–target computations are parallelised
using OpenMP. If FALSE, the model runs in single-thread mode. SamsaRaLight uses OpenMP for ray–target parallelisation. To avoid competition
between OpenMP and BLAS (matrix algebra libraries), BLAS is automatically forced
to single-thread mode during the simulation. Using |
n_threads |
integer or NULL. Number of CPU threads to use when
|
verbose |
Logical; if |
It is the standard user interface of SamsaRaLight. Advanced ray-tracing and sky discretization parameters are internally set to robust defaults and do not need to be provided.
Internally, run_sl() calls the advanced engine
run_sl_advanced() with fixed ray-tracing and sky discretization.
You should normally not use SamsaRaLight:::run_sl_advanced() directly unless you
are developing new ray-tracing configurations or doing methodological work.
An object of class "sl_output", containing:
A list of data.frames with simulated light interception:
trees: light intercepted by trees
cells: light received by ground cells
sensors: light received by sensors
A list of metadata about the simulation (latitude, sky type, torus use, etc.).
(only if detailed_output = TRUE) Discretization of monthly radiations
(only if detailed_output = TRUE) interception matrices between trees and rays for each cell/sensor
create_sl_stand, check_inventory, check_sensors, get_monthly_radiations, check_monthly_radiations
data_prenovel <- SamsaRaLight::data_prenovel
stand <- create_sl_stand(
trees = data_prenovel$trees,
sensors = data_prenovel$sensors,
cell_size = 10,
latitude = data_prenovel$info$latitude,
slope = data_prenovel$info$slope,
aspect = data_prenovel$info$aspect,
north2x = data_prenovel$info$north2x
)
out <- run_sl(
sl_stand = stand,
monthly_radiations = data_prenovel$radiations
)
str(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.