ncvar_getss: Get a subset of a single netcdf variable

Description Usage Arguments

View source: R/nc_subset.R

Description

Note: collapse_degen (from ncdf4::ncvar_get is always FALSE here, in order to allow subsetting of resulting arrays.

Usage

1
2
ncvar_getss(nc, varid, indlist = NULL, verbose = FALSE,
  signedbyte = TRUE, raw_datavals = FALSE, optimize = TRUE)

Arguments

nc

An object of class ncdf4 (as returned by either function nc_open or function nc_create), indicating what file to read from.

varid

What variable to read the data from. Can be a string with the name of the variable or an object of class ncvar4 If left unspecified, the function will determine if there is only one variable in the file and, if so, read from that. If left unspecified and there are multiple variables in the file, an error is generated. This argument can also, optionally, specify the name of a dimension (usually the unlimited dimension) in order to read values from a coordinate variable. Note this is not usual practice, because the ncdim object already contains all the dimension's values in the field named "vals". However, it can sometimes be faster to turn off this automatic reading of the unlimited dimension's values by using nc_open(filename, readunlim=FALSE), then read the dimension values in later with this function.

indlist

As returned by ncss_indlist()

verbose

If TRUE, then progress information is printed.

signedbyte

If TRUE (default), then on-disk byte variables are interpreted as signed. This is in accord with the netCDF standard. If FALSE, then on-disk byte variables are interpreted as unsigned.

raw_datavals

If TRUE, then the actual raw data values from the file are returned with no conversion to NA (if equal to the missing value/fill value) or scale/offset applied. Default is FALSE.

optimize

optimize call to ncdf4::ncvar_get


markwh/subsetnc documentation built on Nov. 4, 2019, 6:15 p.m.