EOF | R Documentation |
Computes EOFs (a type of principal component analysis) for combinations of data sets, typically from gridded data, reanalysis and climate models results.
EOF(
X,
...,
it = NULL,
is = NULL,
n = 20,
lon = NULL,
lat = NULL,
verbose = FALSE,
anomaly = TRUE
)
X |
a 'field' or 'pca' object |
... |
additional arguments |
it |
see |
is |
Spatial subsetting - see |
n |
number of EOFs |
lon |
set longitude range - see |
lat |
set latitude range |
verbose |
TRUE - clutter the screen with messages |
anomaly |
When TRUE, subtract the mean before SVD. |
[ref: Benestad (2001), "A comparison between two empirical downscaling
strategies", Int. J. Climatology, vol 21, Issue 13,
pp.1645-1668. DOI 10.1002/joc.703]. and mixFields
prepares for
mixed-field EOF analysis [ref. Bretherton et al. (1992) "An Intercomparison
of Methods for finding Coupled Patterns in Climate Data", J. Climate,
vol 5, 541-560; Benestad et al. (2002), "Empirically downscaled
temperature scenarios for Svalbard", Atm. Sci. Lett.,
doi.10.1006/asle.2002.0051].
Uncertainty estimates are computed according to North et al. (1982), "Sampling Errors in the Estimation of Empirical Orthogonal Functions", Mon. Weather Rev., vol 110, 699-706.
The EOFs are based on svd
.
See the course notes from Environmental statistics for climate researchers http://www.gfi.uib.no/~nilsg/kurs/notes/course.html for a discussion on EOF analysis.
The method PCA
is similar to EOF, but designed for parallel station
series (e.g. grouped together with merge
). PCA does not assume
gridded values and hence does not weigth according to grid area. PCA is
useful for downscaling where the spatial covariance/coherence is important,
e.u involving different variables from same site, same variable from
different sites, or a mix between these. For instance, PCA can be applied to
the two wind components from a specific site and hence extract the most
important wind directions/speeds. PCA.matrix
is just a wrapper function
for svd
that makes sure that the dimensions of the input are in order.
File containing an 'eof' object which is based on the 'zoo' class.
R.E. Benestad
as.eof
# Simple EOF for annual mean SST:
sst <- sst.NCEP(lon=c(-90,20),lat=c(0,70))
SST <- annual(sst, FUN="mean", nmin=12)
eof.sst <- EOF(SST)
plot(eof.sst)
# EOF of July SST:
eof.sst7 <- EOF(sst,it="Jul")
plot(eof.sst7)
# common EOF for model
# Get some sample data, extract regions:
GCM <- t2m.NorESM.M()
gcm <- subset(GCM,is=list(lon=c(-50,60),lat=c(30,70)))
t2m.dnmi <- t2m.DNMI()
dnmi <- subset(t2m.dnmi,is=list(lon=c(-50,60),lat=c(30,70)))
OBS <- annual(dnmi, FUN="mean", nmin=12)
GCM <- annual(gcm, FUN="mean", nmin=12)
OBSGCM <- combine(OBS,GCM,dimension='time')
ceof <- EOF(OBSGCM)
plot(ceof)
# Example for using PCA in downscaling
## nacd <- station(src='nacd')
## X <- annual(nacd)
X <- station(src='nacd')
nv <- function(x) sum(is.finite(x))
ok <- (1:dim(X)[2])[apply(X,2,nv) == dim(X)[1]]
X <- subset(X,is=ok)
pca <- PCA(X)
map(pca)
slp <- slp.NCEP(lon=c(-20,30),lat=c(30,70))
eof <- EOF(slp,it="Jan")
ds <- DS(pca,eof)
# ds is a PCA-object
plot(ds)
# Recover the station data:
Z <- as.station(pca)
plot(Z,plot.type='multiple')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.