checkinputs | R Documentation |
The function 'checkinputs' checks all the inputs into the model and returns errors and warnings
checkinputs(weather, vegp, soilc, dtm, windhgt = 2)
weather |
a data.frame of weather variables (see details) |
vegp |
an object of class vegparams as returned by [vegpfromhab()] (see details) |
soilc |
an object of class soilcharac as returned by [soilcfromtype()] |
dtm |
a SpatRaster object of elevations (see details) |
windhgt |
height above ground (m) of wind speed measurement |
precip |
a vector of daily precipitation |
daily |
optional logical indicating whether input weather data are daily |
tstep |
one of 'hour' or 'day' indicating whether data are hourly or daily |
The format and and units of 'weather' must follow that in the example dataset 'climdata'. The array of Plant Area index values in 'vegp' must of the same x and y dims as 'dtm' but can contain any number of repeated measures up to the number of entries in 'weather'. Data are interpolated to the time increment of 'weather'. Other vegetation paramaters, including vegetation height are assumed time-invarient. The SpatRaster datasets in 'soilc' must have the same x and y dims as 'dtm'. The x,y and z units of 'dtm' must be all be in metres and the coordinate reference system must be defined.
a list of checked inputs
# No warnings or errors given:
checks<-checkinputs(climdata, vegp, soilc, dtmcaerth)
# Warning given (not run)
# weather<-climdata
# weather$relhum[1]<-101
# checks<-checkinputs(weather, vegp, soilc, dtmcaerth)
# Error given (NB not run)
# weather<-climdata
# weather$pres<-weather$pres*1000
# checks<-checkinputs(weather, vegp, soilc, dtmcaerth)
# Error given for vegp (not run)
# vegp2<-vegp
# vegp2$clump<-1
# checks<-checkinputs(climdata, vegp2, soilc, dtmcaerth)
# Warning given for vegp (not run)
# vegp2<-vegp
# vegp2$pai<-vegp$pai*10
# checks<-checkinputs(climdata, vegp2, soilc, dtmcaerth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.