Description Usage Arguments Examples
Simple drift correction of model runs given a corresponding control run
1 |
data |
(list of) input time series of type NetCDF |
ctl |
(list of) control run time series of type NetCDF |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## synthetic historical and control time series
xx <- t(rnorm(400) + c(-4,0,3,1) + seq(0,sqrt(10), length=400)**2)
attr(xx, 'time') <- seq(1900, by=0.25, length=400)
class(xx) <- 'NetCDF'
## synthetic control runs
xctl <- t(as.vector(outer(c(-5,-3,-2,-1), log(seq(1, 100, length=300)), '*')) + rnorm(1200))
attr(xctl, 'time') <- seq(1750, by=0.25, length=length(xctl))
class(xctl) <- 'NetCDF'
## without dedrifting
plot(xx, type='ts', seas=T, main='Synthetic time series (forced simulation)')
## control run
plot(xctl, type='ts', seas=T, main='Synthetic control')
## dedrifted forced run
plot(dedrift(xx, xctl), type='ts', seas=T, main='Dedrifted forced simulation')
plot(xx, type='ts', seas=T, lwd=1, lty=2, add=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.