nc_var_get: Get variable from netCDF file

Description Usage Arguments Value

View source: R/utils-nc.R

Description

Get variable from netCDF file

Usage

1
nc_var_get(filename, varid, is.dim = FALSE, ...)

Arguments

filename

Filename for the netCDF input (relative or absolute path).

varid

String with the main variable identifier.

is.dim

Boolean flag to indicate if the variable is a dimension (e.g. time, latitude, or longitude).

...

Arguments passed on to ncdf4::ncvar_get

start

A vector of indices indicating where to start reading the passed values (beginning at 1). The length of this vector must equal the number of dimensions the variable has. Order is X-Y-Z-T (i.e., the time dimension is last). If not specified, reading starts at the beginning of the file (1,1,1,...).

count

A vector of integers indicating the count of values to read along each dimension (order is X-Y-Z-T). The length of this vector must equal the number of dimensions the variable has. If not specified and the variable does NOT have an unlimited dimension, the entire variable is read. As a special case, the value "-1" indicates that all entries along that dimension should be read.

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.

collapse_degen

If TRUE (the default), then degenerate (length==1) dimensions in the returned array are removed.

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.

Value

List with data, filename, id, and units linked to the variable.


special-uor/codos documentation built on Jan. 7, 2022, 2:32 a.m.