transNcdfRotate: Transpose a NetCDF datacube

Description Usage Arguments Value Author(s)

Description

transNcdfRotate is a convenience function to transpose a datacube arranged in an arbitrary dimension order into a datacube with dimensions [ latitude (decreasing), longitude (increasing), time (increasing)].

Usage

1
2
transNcdfRotate(data.object, file.name.out = "none", file.con = c(), 
    var.name = c(), reverse.dim = TRUE)

Arguments

data.object

RNetCDF file connection or R array: data object to be transposed.

file.name.out

character string: name of the netCDF file created for the results. Default 'none' means that no results file is created.

file.con

RNetCDF file connection: link to the data object to be transposed. Supplying both data.object and file.con only makes sense if data.object is an array which saves time as the data does not have to be loaded again.

var.name

character string: name of the variable to transpose. If not gives, this name is tried to be inferred by using readNcdfVarName.

reverse.dim

logical: whether to reverse the sequence of the dimensions in case they are not in the following order : latitude: descending, longitude: ascending, time: ascending.

Value

list: data:transposed datacube and aperm.reverse: an index vector that can be supplied to aperm to reverse the transformation.

Author(s)

Jannis v. Buttlar


ncdf.tools documentation built on May 2, 2019, 4:19 a.m.