Skip to contents

nc_variables extract all the variable names from the netCDF archive, omitting the dimensions. It also return the number of dimension and the units of each variable.

Usage

nc_variables(x)

Arguments

x

Path to netcdf file or NetCDF object.

Value

A list with name, ndims and units for each variable.

Examples

if (FALSE) {
# In the case the input object is a file:
nc_variables("extdata/conc_farm.nc")

# In the case the input object is a 'NetCDF' object:
concfile <- c("extdata/conc_farm.nc")
nc <- RNetCDF::open.nc(concfile)
nc_variables(nc)
}