Returns the dimension sizes of a selected variable in an open netCDF file.
Arguments
- nc
An open netCDF connection created with
ncdf4::nc_open().- varid
Variable identifier. This can be a character string giving the variable name, or an object of class
ncvar4. IfNULL, dimensions are returned for all variables in the file.
Value
A numeric vector giving the dimension sizes of the selected variable. If the file contains a single variable, that variable is used by default.