predict.ds: Prediction based on DS or CCA model

View source: R/predict.R

predict.dsR Documentation

Prediction based on DS or CCA model

Description

Apply an empirical-statistical downscaling model to new data

Usage

## S3 method for class 'ds'
predict(x, ..., newdata = NULL, addnoise = FALSE, n = 100, verbose = FALSE)

Arguments

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

Details

predict is similar to the predict function in R

project returns projection of climate

Value

Predicted ds values.

See Also

DS

Examples


# 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))


metno/esd documentation built on April 29, 2024, 3:34 p.m.