Description Usage Arguments Value Author(s) References See Also
To run Yplant, a weather object needs to be constructed, that contains solar position data, radiation, air temperature, and so on. This function generates a daily diurnal weather dataset using a fairly standard weather generator, or constructs the weather object with user-specified data. See Details.
A built-in weather generator simulates the following variables:
Position of the sun (degrees).
Photosynthetically active radiation (mu mol m-2 s-1).
Fraction direct beam of PAR (-).
Air temperature (deg C).
Vapor pressure deficit.
The following two variables are user input, and have no within-day variation:
Atmospheric CO2 concentration (ppm). (Default = 390ppm).
Atmospheric pressure (kPa). (Default = 1.01kPa).
If you are curious about the algorithm, please check the code (type
setMet
).
To generate a weather dataset, simply use this command:
1 | aprilday <- setMet(richmond, nsteps=12, Tmin=9, Tmax=25, month=6, day=21)
|
Where richmond
is a Yplant location object, generated with
setLocation
.
The weather object can be plotted: the following command produces a simple built-in graph of PAR, Tair, VPD and fbeam:
1 | plot(aprilday)
|
Alternatively, the user can input a dataframe (or CSV file) that contains the weather variables (or a subset of them). For example,
1 2 | mymet <-
data.frame(Tair=20, PAR0=seq(5,1000,length=10), fbeam=0, Ca=400)
|
The names of the variables need to be *exactly* as described above (and are case-sensitive!).
If solar altitude and azimuth are not provided, they will be calculated from
the location object. In the case that fbeam = 0
, though, the solar
position has no effect and is ignored, and not calculated.
1 2 3 4 |
location |
A Yplant location object (class 'yplocation', see
|
metdat |
Optionally, a dataframe (or name of CSV file) with standard weather variables. |
year |
Optional (slight effects on solar path). |
month |
1-12 |
day |
day of month |
nsteps |
number of steps (will affect number of simulation steps in
|
PARday |
Total daily PAR on a horizontal surface (MJ m-2 d-1). |
AtmTrans |
Atmospheric transmission. |
fbeamday |
Daily beam fraction. |
fbeammethod |
If 'Spitters', uses the Spitters algorithm to estimate
fbeam by timestep, otherwise it is constant (and given by |
Tmin, Tmax |
Daily minimum and maximum temperature (deg C). |
VPDmax |
Optional. Daily maximum VPD (if not given, estimated from
|
maxlag |
Lag of temperature maximum behind solar maximum (fraction of day). |
Ca |
Atmospheric CO2 concentration (ppm). |
Patm |
Atmospheric pressure (kPa). |
An object of class 'ypmet', a list with the following components:
A dataframe with the weather variables (see Details for a description).
Either 'generated' (weather generator was
used), or 'input' when user provided metdata
.
in hours
in hours
A Yplant location object (class 'yplocation', see setLocation
Remko Duursma. Solar path and diffuse partitioning code borrowed from Maestra (thanks to Belinda Medlyn).
For fraction diffuse radiation, uses the 'Spitters algorithm':
Spitters, C.J.T., Toussaint, H.A.J.M., Goudriaan, J., 1986, Separating the diffuse and direct component of global radiation and its implications for modeling canopy photosynthesis. Part I. Components of incoming radiation, Ag. For. Meteorol., 38:217-229.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.