predict.ds | R Documentation |
Apply an empirical-statistical downscaling model to new data
## S3 method for class 'ds'
predict(x, ..., newdata = NULL, addnoise = FALSE, n = 100, verbose = FALSE)
x |
A ds object |
newdata |
An eof object containing the new data sets on which the prediction is made. |
addnoise |
If TRUE, will add an attribute called "noise" to the ouput based on WG |
n |
Number of runs to be generated, used only if addnoise is set to TRUE |
predict
is similar to the predict function in R
project
returns projection of climate
Predicted ds values.
DS
# Get predictor
## Get reanalysis
X <- t2m.DNMI(lon=c(-40,50),lat=c(40,75))
## Get Gcm output
Y <- t2m.NorESM.M(lon=c(-40,50),lat=c(40,75))
## Combine
XY <- combine(X,Y)
# Compute common eof for January
ceof <- EOF(XY,it='jan')
# Get predictand
data(Oslo)
# Do the downscaling
ds <- DS(Oslo,ceof)
# Plot ds results
plot(ds)
# Do the prediction based on the calibration (or the fitted values)
ds.pre <- predict(ds)
# Plot predicted results based on ds object
plot(ds.pre)
# Display the attribute "aspect"
attr(ds.pre, "aspect")
## Extract the projected results
plot(project(ds))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.