# Load sample data as in Load() example:
example(Load)
clim <- Clim(sampleData$mod, sampleData$obs)
ano_exp <- Ano(sampleData$mod, clim$clim_exp)
runmean_months <- 12
smooth_ano_exp <- Smoothing(ano_exp, runmeanlen = runmean_months)
smooth_ano_exp_m_sub <- smooth_ano_exp - InsertDim(MeanDims(smooth_ano_exp, 'member',
na.rm = TRUE),
posdim = 3,
lendim = dim(smooth_ano_exp)['member'],
name = 'member')
suppressWarnings({
spread <- Spread(smooth_ano_exp_m_sub, compute_dim = c('member', 'sdate'))
})
if (FALSE) {
PlotVsLTime(Reorder(spread$iqr, c('dataset', 'stats', 'ftime')),
toptitle = "Inter-Quartile Range between ensemble members",
ytitle = "K", monini = 11, limits = NULL,
listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE,
hlines = c(0))
PlotVsLTime(Reorder(spread$maxmin, c('dataset', 'stats', 'ftime')),
toptitle = "Maximum minus minimum of the members",
ytitle = "K", monini = 11, limits = NULL,
listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE,
hlines = c(0))
PlotVsLTime(Reorder(spread$sd, c('dataset', 'stats', 'ftime')),
toptitle = "Standard deviation of the members",
ytitle = "K", monini = 11, limits = NULL,
listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE,
hlines = c(0))
PlotVsLTime(Reorder(spread$mad, c('dataset', 'stats', 'ftime')),
toptitle = "Median Absolute Deviation of the members",
ytitle = "K", monini = 11, limits = NULL,
listexp = c('CMIP5 IC3'), listobs = c('ERSST'), biglab = FALSE,
hlines = c(0))
}
Run the code above in your browser using DataLab