startDates <- c('19851101', '19901101', '19951101', '20001101', '20051101')
sampleData <- LoadSampleData(startDates,
leadtimemin = 1,
leadtimemax = 4,
output = 'lonlat')
# No example data is available over NAO region, so in this example we will
# tweak the available data. In a real use case, one can Load() the data over
# NAO region directly.
sampleData$lon[] <- c(40, 280, 340)
sampleData$lat[] <- c(20, 80)
# Now ready to compute the EOFs and project on, for example, the first
# variability mode.
ano <- Ano_CrossValid(sampleData$mod, sampleData$obs)
ano_exp <- array(ano$exp, dim = dim(ano$exp)[-2])
ano_obs <- array(ano$obs, dim = dim(ano$obs)[-2])
nao <- NAO(exp = ano_exp, obs = ano_obs, lat = sampleData$lat, lon = sampleData$lon)
# Finally plot the nao index
nao$exp <- Reorder(nao$exp, c(2, 1))
nao$obs <- Reorder(nao$obs, c(2, 1))
PlotBoxWhisker(nao$exp, nao$obs, "NAO index, DJF", "NAO index (PC1) TOS",
monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X")
Run the code above in your browser using DataLab