Learn R Programming

medfate (version 0.7.4)

spwbgrid: Soil-plant water balance and lateral water discharge

Description

Function spwbgrid conducts daily soil and plant water balance over a grid of cells while incorporating water runoff from upperslope cells into the current cell.

Usage

spwbgrid(y, SpParams, meteo, dates, 
           summaryFreq = "years", trackSpecies = numeric(), 
           control = defaultControl())
# S3 method for spwbgrid
plot(x, type = "Runon", summaryIndex = 1, spIndex = NULL, ...)

Arguments

y

An object of class SpatialGridLandscape-class.

SpParams

A data frame with species parameters (see SpParamsMED).

meteo

A SpatialGridMeteorology-class object, a data frame with two columns: 'dir' and 'filename, to indicate the path to the meteorological data, or a data frame with meteorological data (the same for all cells).

dates

A Date object describing the days of the period to be modeled.

summaryFreq

Frequency in which summary layers will be produced (e.g. "years", "months", ...) (see cut.Date).

trackSpecies

An integer vector containing the indices of species for which transpiration and drought stress is to be tracked.

control

A list of control parameters (see defaultControl).

x

An object of class spwbgrid.

type

Type of information to be drawn.

summaryIndex

The index of the summary to be ploted.

spIndex

The index of the species to be ploted (for some types).

...

Additional parameters to function spplot.

Value

A list of class 'spwbgrid' with the following elements:

  • grid: The GridTopology object corresponding to the simulated area.

  • LandscapeBalance: A data frame with as many rows as summary points and where columns are components of the water balance at the landscape level (i.e., rain, snow, interception, infiltration, soil evaporation, plant transpiration, ...).

Then, the following matrices are included (each with as many rows as cells and as many columns as summary points):

  • Rain: Rainfall (in mm).

  • Snow: Snowfall (in mm).

  • Interception: Rainfall interception (in mm).

  • Infiltration: The amount of water infiltrating into the soil (in mm).

  • Runon: The amount of water imported from other cells via surface runoff (in mm).

  • Runoff: The amount of water exported via surface runoff (in mm).

  • DeepDrainage: The amount of water exported via deep drainage (in mm).

  • Esoil: Bare soil evaporation (in mm).

  • Eplant: Plant transpiration (in mm).

The same list contains two three-dimensional arrays (each with dimensions number of cells, number of summary layers and number of tracked species):

  • Transpiration: Total transpiration (in mm) of the tracked species for each summary period.

  • DI: Drought intensity (from 0 to 1) of the tracked species for each summary period.

Details

Function spwbgrid requires daily meteorological data over a grid. The user may supply:

  1. an object of class SpatialGridMeteorology.

  2. a data frame with information regarding where to read meteorological data.

  3. a data frame with meteorological data common for all cells of the grid.

See Also

spwb, spwbpoints, SpatialGridLandscape-class

Examples

Run this code
# NOT RUN {
# Load spatial grid landscape object
data("exampleSGL")

#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 water balance simulation over the grid for five days
# (you can test longer periods)
res <- spwbgrid(exampleSGL, SpParamsMED, examplemeteo[1:5,], 
                control = control, summaryFreq = "months")
# }

Run the code above in your browser using DataLab