Description Usage Arguments Details Value Author(s) See Also Examples
Functions spwbpoints
and growthpoints
allow calling local models spwb
and growth
, respectively, for a set of forest stands distributed in specific locations. No spatial processes are simulated.
1 2 3 4 | spwbpoints(y, SpParams, meteo, control = defaultControl(),
dates = NULL, summaryFunction = NULL, args=NULL)
growthpoints(y, SpParams, meteo, control = defaultControl(),
dates = NULL, summaryFunction = NULL, args=NULL)
|
y |
An object of class |
SpParams |
A data frame with species parameters (see |
meteo |
Meteorology data (see details). |
control |
A list of control parameters (see |
dates |
A |
summaryFunction |
An appropriate function to calculate summaries (e.g., |
args |
List with additional arguments for the summary function. |
Functions spwbpoints
and growthpoints
accept different formats for meteorological input (parameter meteo
). If a data.frame
is supplied (as in spwb
or growth
) then the same meteorology is used for all points (not recommended). To specify different meteorology for different points, the user can use an object of SpatialPointsMeteorology-class
. Alternatively, the user can supply an object of class SpatialPointsDataFrame-class
containing the meta data (columns dir and filename) of meteorological files that will be read from the disk.
Functions spwbpoints
and growthpoints
return a list with the following elements:
sp
: An object of class SpatialPoints
with the spatial coordinates of forest stands.
input
: A list of objects of class spwbInput
or growthInput
(one per forest stand). In the case of growthpoints
, the input variables will have been modified by the call to the growth
function.
result
: A list the result of calling spwb
or growth
on each forest stand. If summaryFunction
is not null, then each element of the list will contain the result of the summary function.
Miquel De Cáceres Ainsa, Centre Tecnologic Forestal de Catalunya
spwb
, growth
, SpatialPointsLandscape-class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Load spatial points forest object
data("exampleSPL")
#Load meteorological data (the same will be used for all points)
data("examplemeteo")
#Load species parameters
data("SpParamsMED")
# Deactivate extra console output
control = defaultControl()
control$verbose = FALSE
# Run simulation for the first two forest plots
# (you can run the code without subsetting 'exampleSPL')
res <- spwbpoints(exampleSPL, SpParamsMED, examplemeteo, control = control)
#Extract summaries for a given forest plot
summary(res$result$`80001`, freq="months",FUN=sum,
output="PlantStress", bySpecies = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.