powered by
Infer dimension axes from names of dimensions.
nc.get.dim.axes.from.names(f, v, dim.names)
A named character vector mapping dimension names to axes.
The file (an object of class ncdf4)
ncdf4
The name of a variable
Optionally, dimension names (to avoid looking them up repeatedly)
This function makes educated guesses as to what axes dimensions may apply to in the case of files with poor metadata.
## Get dimension axes from file by inferring them from dimension names if (FALSE) { f <- nc_open("pr.nc") dim.axes <- nc.get.dim.axes.from.names(f, "pr") nc_close(f) }
Run the code above in your browser using DataLab