# This example computes the REOFs 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 <- LoadSampleData(sdates = startDates,
leadtimemin = 1,
leadtimemax = 4,
output = 'lonlat')
# }
ano <- Ano_CrossValid(sampleData$mod, sampleData$obs)
ano <- MeanDims(ano$exp, c('dataset', 'member'))
res <- REOF(ano, lat = sampleData$lat, lon = sampleData$lon, ntrunc = 5)
eof_to_plot <- array(res$REOFs[1, , , 1],
dim = c(length(sampleData$lat), length(sampleData$lon)),
dimnames = list(lat = sampleData$lat, lon = sampleData$lon))
# \donttest{
PlotEquiMap(eof_to_plot, sampleData$lat, sampleData$lon)
# }
Run the code above in your browser using DataLab