nc_varget_missing

nc_varget_missing reads data values from a netCDF variable of an open netCDF file. The file must be in data mode.

values = nc_varget_missing(ncid, varid)
values = nc_varget_missing(ncid, varid, rvStart, rvCount)
values = nc_varget_missing(ncid, varid, rvStart, rvCount, bCharAsByte)

Return Value

values is a vector with data values if the dimension of the variable is 1. values is a matrix with data values if the dimension of the variable is 2. If the dimension of the variable is of higher order, values is a vector with data values.

Parameters

ncid

Identifies the netCDF file.

varid

varid is the ID of a variable.

rvStart

rvStart is a vector of values specifying the multidimensional index of the corner of the hyperslab where the first of the data values will be read from. The size of start must be the same as the number of dimensions of the specified variable. The elements of start must correspond to the variable’s dimensions in order.

rvCount

rvCount is a vector of values specifying the multidimensional edge lengths from the corner of the hyperslab where the first of the data values will be read. To read a single value, for example, specify rvCount as [1,1,…,1]. The size of rvCount is the number of dimensions of the specified variable. The elements of rvCount correspond to the variable’s dimensions.

bCharAsByte

If bCharAsByte is TRUE (1) characters will be returned as byte values (data type = NC_CHAR). For other data type this parameter has no meaning. Default value is FALSE (0).

Comment

Except for the handling of missing values the function is identical to nc_varget.

It converts missing values specified by the attribute missing_value to the value MISSING_VALUES.

id-1255526