# This example computes the EOFs along forecast horizons and plots the one
# that explains the greatest amount of variability. The example data has low
# resolution so the result may not be explanatory, but it displays how to
# use this function.
# \dontshow{
startDates <- c('19851101', '19901101', '19951101', '20001101', '20051101')
sampleData <- s2dv:::.LoadSampleData('tos', c('experiment'),
c('observation'), startDates,
leadtimemin = 1,
leadtimemax = 4,
output = 'lonlat',
latmin = 27, latmax = 48,
lonmin = -12, lonmax = 40)
# }
ano <- Ano_CrossValid(sampleData$mod, sampleData$obs)
tmp <- MeanDims(ano$exp, c('dataset', 'member'))
ano <- tmp[1, , ,]
names(dim(ano)) <- names(dim(tmp))[-2]
eof <- EOF(ano, sampleData$lat, sampleData$lon)
if (FALSE) {
PlotEquiMap(eof$EOFs[1, , ], sampleData$lon, sampleData$lat)
}
Run the code above in your browser using DataLab