Learn R Programming

Rwofost (version 0.8-7)

predict: Spatial WOFOST model predictions

Description

Make spatial predictions with a WOFOST model. First create a model, then use the model with a SpatDataSet of weather and a SpatRaster of soil properties to make spatial predictions.

Usage

# S4 method for Rcpp_WofostModel
predict(object, weather, mstart, soils=NULL,
     soiltypes=NULL, filename="", overwrite=FALSE, ...)

Value

SpatRaster with a layer for each element in mstart

Arguments

object

WOFOST model

weather

SpatRasterDataset with weather data. The must be six sub-datasets with daily weather data for the same days and these names: tmin, tmax, prec, srad, wind and vapr

mstart

Date. The dates to start the model

soils

SpatRaster with one or two layers. Only required when computing water-limited yield. There must be a layer called index, that has positive integers with the ID for the soil type to use for a grid cell (index in the soiltypes list. If there is another layer called "depth", this layer is used to set the soil depth for each grid cell

soiltypes

list of wofost soil types

filename

character. Output filename. Optional

overwrite

logical. If TRUE, filename is overwritten

...

list. Options for writing files as in writeRaster