transNcdfRotate: Transpose a NetCDF datacube

Description Usage Arguments Value Author(s)


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)].


transNcdfRotate(data.object, = "none", file.con = c(), = c(), reverse.dim = TRUE)



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

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


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.

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


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


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


Jannis v. Buttlar

Search within the package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.