Learn R Programming

medfate (version 0.2.2)

swbpoints: Soil water balance model for spatially-distributed forest stands

Description

Function swbpoints allows calling local models swb for a set of forest stands distributed in specific locations. No spatial processes are simulated.

Usage

swbpoints(y, SpParams, meteo, dates = NULL, control = defaultControl(),
       summaryFunction = NULL, args=NULL)

Arguments

y

An object of class SpatialPointsForest-class.

SpParams

A data frame with species parameters (see SpParamsMED).

meteo

Meteorology data (see details).

dates

A Date object with the days of the period to be modeled. If NULL, then the whole period of meteo is used.

control

A list of control parameters (see defaultControl).

summaryFunction

An appropriate function to calculate summaries (e.g., summary.swb).

args

List with additional arguments for the summary function.

Value

Function swbpoints returns a list with the result of calling swb on each forest stand. If summaryFunction is not null, then each element of the list will contain the result of the summary function.

Details

Function swbpoints accepts different formats for meteorological input (parameter meteo). If a data.frame is supplied (as in swb) 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.

See Also

swb, SpatialPointsForest-class

Examples

Run this code
# NOT RUN {
#Load forest data
data(exampleSPF)

#Load species parameters
data(SpParamsMED)

#Load meteorology
data(examplemeteo)

##Example using the same meteorology for all points
a = swbpoints(exampleSPF, SpParamsMED, examplemeteo)

# }

Run the code above in your browser using DataLab