Learn R Programming

YplantQMC (version 0.6-3)

YplantDay: Run a simulation over a day with YplantQMC

Description

Interface to daily simulations with YplantQMC. Two objects are required to run the simulation: a plant3d object, containing the plant structure information, and a met object, containing weather data, solar position, and number of timesteps. Optionally, a phy object is used which contains the leaf gas exchange model for the simulation, to calculate photosynthesis (and possibly transpiration rate) from light capture and other weather variables. Also optional is the use of a hemi object, which specifies shading by a canopy. If you don't know where to start, run the example at the bottom of this page. See the arguments list above for the functions that are used to generate each of the four objects. Note that the plant and met objects are required, and phy and hemi are optional. This function is a user-friendly wrapper for runYplant. That function should be used for all advanced simulations.

Usage

YplantDay(x, ...)

## S3 method for class 'plant3dlist':
YplantDay(x, met, phy = NULL, hemi = NULL, ...)

## S3 method for class 'stand3d':
YplantDay(x, ...)

## S3 method for class 'plant3d':
YplantDay(x, met, phy = NULL, hemi = NULL,
  quiet = FALSE, writePSR = TRUE, PSRsuffix = "", writeOUT = FALSE, ...)

Arguments

x
An object of class 'plant3d' or 'plant3dlist' (see constructplant and readplantlist).
met
An object of class 'ypmet', see setMet
phy
An object of class 'ypphy', see setPhy
hemi
An object of class 'yphemi', see setHemi
quiet
If TRUE, does not write messages to the console.
writePSR
If TRUE, writes a PSR output file.
PSRsuffix
A suffix to be added to the PSR files that are written to disk.
writeOUT
If TRUE, writes an OUT output file.
...
Further arguments passed to runYplant

Value

  • The YplantDay functions returns a list of class yplantsim, which has print and plot methods (see Examples). The list has the following components: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] The outdata dataframe in the yplantsim object lists results for individual leaves, has the following variables. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] Where PAR is photosynthetically active radiation (mu mol m-2 s-1). The absorptions reldiff and reldir are relative to an unshaded horizontal surface. To extract relative diffuse radiation absorption from an yplantsim object, for example: mysim <- YplantDay(myplant, mymet) reldif<- mysim$outdata$reldiff

References

See http://www.remkoduursma/yplantqmc

See Also

runYplant,ypreport

Examples

Run this code
# Set location,
southernfrance <- setLocation(lat=44)

# A daily weather object, use a constant beam fraction of 0.4.
sunnyday <- setMet(southernfrance, month=6, day=21, nsteps=12, Tmin=9, Tmax=29, PARday=22,
	fbeamday=0.4, fbeammethod="constant")

# Light response curve:
toonalrc <- setPhy("lightresponse",
	leafpars=list(Amax=14.5, Rd=1.4, phi=0.05, theta=0.5, reflec=0.1, transmit=0.05))

# Run YplantQMC for a day. Use the built-in 'largegap' hemiphoto.
toonarun <- YplantDay(toona, sunnyday, toonalrc, largegap)

Run the code above in your browser using DataLab