EOF {clim.pact} | R Documentation

## Empirical Orthogonal Functions (EOFs).

### Description

Computes EOFs (a type of principal component analysis) for combinations of data sets, typically from the NCEP reanalysis and corresponding data from climate models. Preprocessing by `catFields` allows for common EOF analysis [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.

NB: This routine may be computer-intensive! The computation of the EOFs tends to take some time, especially on computers/PCs with little memory (less than 128Mb) and slow processors less than 800MHz.

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.

### Usage

    EOF(fields,l.wght=TRUE,lc180e=FALSE,direc="data/",
                  lon=NULL,lat=NULL,l.stndrd=TRUE,las=1,
                  mon=NULL,plot=TRUE,neofs=20,l.rm.ac=TRUE,lsave=TRUE,
                  LINPACK=TRUE)

### Arguments

`fields` | A field object (eg from retrieve.nc).
`l.wght` | 'TRUE' applies a geographical weighting.
`lc180e` | 'TRUE' centers the maps on date line (180 deg E).
`direc` | Directory for the output.
`lon` | longitudinal region of interest.
`lat` | latitudinal region of interest.
`l.stndrd` | Not yet used.
`las` | Used by filled.contour, see par.
`mon` | Month (1-12) [season (1-4) for daily data] to extract.
`plot` | 'TRUE' plots the results.
`neofs` | Number of leading EOFs to retain.
`l.rm.ac` | 'TRUE' removes the annual cycle.
`lsave` | 'TRUE' dumps the results to file.
`LINPACK` | 'TRUE': svd; 'FALSE':La.svd

### Value

File containing an 'eof.c' object:

EOF | EOF patterns.
W | Eigen values.
PC | Principal components of common PCA.
n.fld | Number of different predictors (see mixFields).
tot.var | Sum of all W squared.
id.t | Time labels for the fields (see catFields) - used in DS.
id.x | Spatial labels for the fields (see mixFields) - used in plotEOF.
id.lon | Spatial labels for the fields (see mixFields) - used in plotEOF.
id.lat | Spatial labels for the fields (see mixFields) - used in plotEOF.
region | Describes the region analysed.
tim | Time information (usually redundant).
lon | Longitudes associated with EOF patterns.
lat | Latitudes associated with EOF patterns.
var.eof | Fractional variances associated with EOF patterns.
yy | years.
mm | months.
dd | days.
v.name | Name of element.
c.mon | Month-season information.
f.name | File name of original data.

The data is also saved as files.

### Author(s)

R.E. Benestad

### Examples

    # Computes a set of mixed-common EOFs (overnight work..). This takes a while...

    library(clim.pact)
    x.1 <- retrieve.nc("/home/kareb/data/ncep/ncep_t2m.nc",
                       x.rng=c(-60,40),y.rng=c(50,75))
    x.2 <- retrieve.nc("/home/kareb/data/ncep/ncep_slp.nc",
                       x.rng=c(-60,40),y.rng=c(50,75))
    print(x.1$v.name)

    print("Read GCM predictor data.")
    X.1 <- retrieve.nc("data/mpi-gsdio_t2m.nc",
                       x.rng=c(-60,40),y.rng=c(50,75))
    X.2 <- retrieve.nc("data/mpi-gsdio_slp.nc",
                       x.rng=c(-60,40),y.rng=c(50,75))
    print(X.1$v.name)
    print("Cat fields.")
    xX.1 <- cat.fields(x.1,X.1,interval.1=c(1958,1998),interval.2=c(1958,2050))
    xX.2 <- cat.fields(x.2,X.2,interval.1=c(1958,1998),interval.2=c(1958,2050))
    xX <- mix.fields(xX.1,xX.2,mon=1,
                     interval=c(1900,2050))
    print("EOF")
    eof.c <- eof(xX.1,mon=1)
    eof.mc <- eof(xX,mon=1)

[Package Contents]