plot.spwb_day {medfate}R Documentation

Plots simulation results for one day

Description

Functions to plot the sub-daily simulation results of spwb_day, growth_day or the transpiration calculations of transp_transpirationSperry or transp_transpirationSureau.

Usage

## S3 method for class 'spwb_day'
plot(
  x,
  type = "PlantTranspiration",
  bySpecies = FALSE,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)

## S3 method for class 'growth_day'
plot(
  x,
  type = "PlantTranspiration",
  bySpecies = FALSE,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)

## S3 method for class 'pwb_day'
plot(
  x,
  type = "PlantTranspiration",
  bySpecies = FALSE,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)

Arguments

x

An object of class spwb_day, growth_day or pwb_day.

type

The information to be plotted (see details).

bySpecies

Allows aggregating output by species, before drawing plots. Aggregation can involve a sum (as for plant LAI or transpiration) or a LAI-weighted mean (as for plant stress or plant water potential).

xlim

Range of values for x.

ylim

Range of values for y.

xlab

x-axis label.

ylab

y-axis label.

...

Additional parameters for function plot.

Details

The following plots are available for spwb_day and pwb_day:

And the following plots are additionally available for growth_day:

Value

An ggplot object

Note

Only for soil plant water balance simulations using transpirationMode = "Sperry" or transpirationMode = "Sureau". This function can be used to display subdaily dynamics of corresponding to single days on spwb runs, if control option subdailyResults is set to TRUE. See also option subdaily in plot.spwb.

Author(s)

Miquel De Cáceres Ainsa, CREAF

See Also

spwb_day, growth_day, plot.spwb

Examples

#Load example daily meteorological data
data(examplemeteo)

#Load example plot plant data
data(exampleforest)

#Default species parameterization
data(SpParamsMED)

#Define soil with default soil params (2 layers)
examplesoil <- defaultSoilParams(4)

#Switch to 'Sperry' transpiration mode
control <- defaultControl("Sperry")

#Simulate one day only
x2 <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
d <- 100
date <- examplemeteo$dates[d]
meteovec <- unlist(examplemeteo[d,])
sd2 <- spwb_day(x2, date, meteovec,
              latitude = 41.82592, elevation = 100, slope= 0, aspect = 0)

#Display transpiration for subdaily steps
plot(sd2, "PlantTranspiration")


[Package medfate version 4.4.0 Index]