Description Usage Arguments Details Value Examples
Creates certain key inputs for crop model weather data files and write them to appropriate format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
xy |
vector giving longitude then latitude (degrees) |
srad |
Solar radiation (mj/m^2/day) |
tmax |
Maximum temperature (deg C) |
tmin |
Minimum temperature (deg C) |
prec |
Daily rainfall (mm) |
ea |
Vapor pressure (mb, optional) |
rh |
Relative humidity (%, optional) |
tmu |
Average temperature (deg C, optional) |
sh |
Specific humidity (kg/kg, optional) |
pres |
Surface pressure (mb, optional) |
tdew |
Dewpoint temperature (deg C, optional) |
sdate |
Start date for range in WTH file |
edate |
End date for range in WTH file |
name |
Name prefix for output weather data file |
outdir |
Output directory for weather file |
model |
Crop model type, default = "DSSAT" |
This is currently only works for the DSSAT model, but is intended to be expanded to other models (e.g. APSIM). Note that this function assumes that daily data given to it will be the same date as UTC. This might be problematic in Australasia.
An output crop model weather file for a single location
1 2 3 4 5 6 7 8 9 10 11 | sdate <- "19790701"
edate <- "20100630"
xy <- c("y" = -16.2783358, "x" = 27.4738917)
load("data/sp-clim-dat.rda")
elev <- 1120
srad <- swv
name <- "ZASP"
outdir <- "external/ext_data"
weather(xy, elev, srad, tmax, tmin, prec, wind = wind, sh = sh,
pres = pres, sdate = sdate, edate = edate, name = name,
outdir = outdir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.