EOF                package:clim.pact                R Documentation

_E_m_p_i_r_i_c_a_l _O_r_t_h_o_g_o_n_a_l _F_u_n_c_t_i_o_n_s (_E_O_F_s).

_D_e_s_c_r_i_p_t_i_o_n:

     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 <URL:
     http://www.gfi.uib.no/~nilsg/kurs/notes/course.html> for a
     discussion on EOF analysis.

_U_s_a_g_e:

     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)

_A_r_g_u_m_e_n_t_s:

  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

_V_a_l_u_e:

     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.
       clim        mean values (climatology)
       attributes  Attributes

     The data is also saved as files.

_A_u_t_h_o_r(_s):

     R.E. Benestad

_E_x_a_m_p_l_e_s:

     # Computes a set of mixed-common EOFs (overnight work..). This takes a while...
     ## Not run: 
     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)
     ## End(Not run)

