combine: Combine

View source: R/combine.R

combineR Documentation

Combine

Description

combine is a S3 method for combining esd objects, e.g. into groups of stations, stations and eof object, or fields. The function is based on merge.zoo, and is also used to synchronise the esd objects.

Usage

combine(...)

Arguments

x

station, eof, or field object

all

See link{merge.zoo}

orig.format

TRUE: the result will the formatted the same way as the input.

dimension

Which dimension to combine - in time or in space

approach

How to combine

greenwich

TRUE: center map on the Greenwich line (0E)

SP2NP

TRUE: order from south pole (bottom of plot) to north pole (top of plot)

ignore

List of attributes to ignore.

Details

For fields, combine.field is used to append different data sets, e.g. for the purpose of computing common EOFs (seeo EOF or for mixing fields (coupled EOFs).

For stations, combine.station can work tow ways: (1) to combine a set of stations and group them into one data object; (2) combine series with different monthly values for one specific site into one record for the monthly data. E.g. January, February, ..., December months can be combined into one complete series of monthly data.

For DS-results, combine.ds is based on combine.station, but also takes care of the additional meta data (the original series and predictor patterns). For instance, this method can combine seperate downscaled results for each calendar months at a single location into one complete time series.

g2dl transform objects between grid starting at the grenwich (greenwich=TRUE) and the data line (greenwich=FALSE).

sp2np re-arranges field objects accroding to a grid going from 90S (South Pole) to 90N (Noth Pole) for SP2NP=TRUE. Otherwise, the object is arranged from 90N to 90S.

Other operations, such as c(...), rbind(...) (combine along the time dimension), and cbind(...) (combine along the space dimension) also work.

Value

A field object

Examples

T2m_DNMI <- t2m.DNMI(lon=c(-40,40),lat=c(30,70))
T2m_NorESM <- t2m.NorESM.M(lon=c(-40,40),lat=c(30,70))

# Combine in time to compute common EOFs:
X <- combine(T2m_DNMI,T2m_NorESM)
ceof <- EOF(X,it="Jan")
plot(ceof)

# Use combine to synchronise field and station data:
data("Oslo")
y <- combine(Oslo,T2m_DNMI)
plot(y$y)


metno/esd documentation built on March 9, 2024, 11:21 a.m.