RAnEn::readNc reads an NetCDF file as a list with ncdf4
interface.
readNc(
file,
root_group_only = T,
var_names = NULL,
include_root_attrs = F,
return_class = NULL
)
The file to read
Whether to read only root group variables
By default, var_names
are set to NULL
and this function
reads all variables from the file. Set this argument if you only want to
read a subset of variables from the NetCDF file. If this argument is set,
root_group_only
will be ignored. To read variables from a sub group,
you need to also include the group name as if it was a folder,
for exmple, group_name/variable_name
. If var_names
is a named vector,
the names will be used in the list.
Whether to read the root group attributes.
Setting this argument to simply change the class
of the returned list to support formatted output, e.g. AnEn
.