gridDataWrapper: Wrap data into a grid object

Description Usage Arguments Author(s) Examples

Description

Wrap an array in a grid object (as defined in the 'loadeR' bundle)

Usage

1
2
gridDataWrapper(data, copy_from_grid = NULL, dimNames = NULL, varname, lat,
  lon, timeVector = NULL, timeStart, intervalLength)

Arguments

data

N-dimensional Array. The number of dimensions depends on the type of gridded data: 4 in case of ensemble data, 3 in the other cases.

copy_from_grid

Existing grid object to use for the definition of all the parameters except "data"

dimNames

A vector containing the name of the dimensions contained into "data" in the right order

varname

The name of the variable contained into "data"

lat

Vector with latitude values (assuming latLonProjection)

lon

Vector with longitude values (assuming latLonProjection)

timeVector

If specified it contains all the time stamps for the "data" time dimension

timeStart

The time stamp of the first value of "data"

intervalLength

The length (e.g. "1 day") of each time step

Author(s)

M. De Felice

Examples

1
2
3
4
5
## Not run: 
# Averaging two grid data fields (g1 and g2)
g_average = gridDataWrapper(data = 0.5*g1$Data + 0.5 * g2$Data, copy_from_grid = g1)

## End(Not run)

matteodefelice/eneaR documentation built on May 21, 2019, 12:59 p.m.