# NOT RUN {
# See examples on Load() to understand the first lines in this example
# }
# NOT RUN {
data_path <- system.file('sample_data', package = 's2dverification')
expA <- list(name = 'experiment', path = file.path(data_path,
'model/$EXP_NAME$/$STORE_FREQ$_mean/$VAR_NAME$_3hourly',
'$VAR_NAME$_$START_DATE$.nc'))
obsX <- list(name = 'observation', path = file.path(data_path,
'$OBS_NAME$/$STORE_FREQ$_mean/$VAR_NAME$',
'$VAR_NAME$_$YEAR$$MONTH$.nc'))
# Now we are ready to use Load().
startDates <- c('19851101', '19901101', '19951101', '20001101', '20051101')
sampleData <- Load('tos', list(expA), list(obsX), startDates,
leadtimemin = 1, leadtimemax = 4, output = 'lonlat',
latmin = 20, latmax = 90, lonmin = -80, lonmax = 40)
# }
# NOT RUN {
# }
# NOT RUN {
# Now ready to compute the EOFs and project on, for example, the first
# variability mode.
ano <- Ano_CrossValid(sampleData$mod, sampleData$obs)
# Note that computing the NAO over the region for which there is available
# example data is not the full NAO area: NAO() will raise a warning.
nao <- NAO(ano$ano_exp, ano$ano_obs, sampleData$lon, sampleData$lat)
# Finally plot the NAO index
# }
# NOT RUN {
PlotBoxWhisker(nao$NAO_exp, nao$NAO_obs, "NAO index, DJF", "NAO index (PC1) TOS",
monini = 12, yearini = 1985, freq = 1, "Exp. A", "Obs. X")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab