Read multiple variables to a 3D array

read_vars_to_cube(vardefs, attrs_to_read = as.character(c()),
  offset = NULL, count = NULL)

Arguments

vardefs

a list or vector of variable definitions as described in parse_vardef

attrs_to_read

a vector of global attribute names to be read from the first variable definition and attached as attributes to the returned array.

offset

Specifies dimension-wise (X, Y, ...) offsets from the upper-left corner of the raster (xmin, ymax) from which reading should begin. A value of c(1,1) refers to the corner cell itself (i.e., there is no offset). This follows the convention of the ncdf4 package. If offset is specified, then count must also be specified.

count

Specifies dimension-wise (X, Y, ...) numbers of cells to read, beginning at the origin cell specified by offset. A value of -1 signifies that all values after the origin cell should be read. If count is specified, then origin must also be specified.

Value

a 3D array. The dimnames of the third dimension will contain the variable names of the inputs, and the extent will be attached as an attribute.