Learn R Programming

RNCEP (version 1.0.10)

NCEP.bind: Bind Two 3-D Arrays of Weather Data Along the Prime Meridian

Description

This function is applied automatically by NCEP.gather whenever it is needed. It binds the results from either side of the Prime Meridian.

Usage

NCEP.bind(data.west, data.east)

Value

A 3-D array with the same latitude and datetime intervals and extent as data.west and data.east. Row names (i.e. longitudes) for data from the west of the Prime Meridian are converted from positive to negative values.

Arguments

data.west

a 3-D array of weather data, as returned by NCEP.gather , from the West side of the Prime Meridian

data.east

a 3-D array of weather data, as returned by NCEP.gather , from the East side of the Prime Meridian

Author

Michael U. Kemp mukemp+RNCEP@gmail.com

Details

This function is applied automatically by NCEP.gather whenever it is needed.

The arrays specified in data.west and data.east must have the same latitude and datetime intervals and extents.

This function depends on the package abind

The maximum longitudinal extent of the NCEP dataset is 357.5 not 360.

References

Kemp, M. U., van Loon, E. E., Shamoun-Baranes, J., and Bouten, W. 2011. RNCEP:global weather and climate data at your fingertips. -- Methods in Ecology and Evolution. DOI:10.1111/j.2041-210X.2011.00138.x.

Examples

Run this code
if (FALSE) {
library(RNCEP)
## Using NCEP.gather(), query weather data from both sides of
## the Prime Meridian ##
## NCEP.bind() is applied automatically ##
wx <- NCEP.gather(variable='air', level=925,
    months.minmax=10, years.minmax=2003,
    lat.southnorth=c(50, 52.5), lon.westeast=c(-2.5, 2.5),
    reanalysis2=FALSE, return.units=TRUE)
}

Run the code above in your browser using DataLab