nc_varinq_info¶
nc_varinq_info returns information about a channel. (Minimum, Maximum, Monotonic, channel contains missing values).
-
value = nc_varinq_info(ncid, varid, ssInfo)
Return Value
value is the value for the given element of ssInfo.
In case of an error the function returns a value < 0. To check if this is a valid min/max value invoke nc_last_error.
Parameters
-
ncid
Identifies the netCDF file.
-
varid
varid is the ID of a variable.
-
ssInfo
ssInfo is one of the following strings:
Value Description "min"
value is the smallest channel value (minimum). "max"
value ist the greatest channel value (maximum). "monotone"
value is 1, if the values are monotonically increasing such that x[i] <= x[i+1].
value is 2, if the values are strictly monotonically increasing such that x[i] < x[i+1].
value is 0, if the values are not monotonic.
"has_missings"
value is 1, if the channel contains at least one missing value and 0, if the channel contain no “missing values”.
If all values are “missing values” the return value is 2. In this case “min” and “max” are 1e10 and “monotone” returns the value 1. If all values except for one value are “missing values”, “min” and “max” return the value of the non missing value and “monotone” returns the value 1.
"reduced"
value is an array of reduced data (NC_DOUBLE). For blocks of 2000 data points the minimum and maximum is calculaed. A channel with 10 million data points is reduced to 10,000 points. The reduced data will be created for channels with more than 2,000,000 data points only.
Comment
The function can only be used for UniPlot data files. See nc_create.
The function will create the channel attributes nc_min
, nc_max
,
nc_monotone
, nc_has_missings
and nc_change_counter
if they do not
already exists. For channels with more than 2,000,000 points the attribute
nc_reduced
is created.
The change counter is used to update the values if necessary. To do so the
attribute nc_change_counter
and the channel change counter are compared. If
different, the values are updated. To update the values the file must be
opened with write access.
History
Version | Description |
---|---|
R2015.4 (5.70.4) | Reduced data (“reduced”). |
R2012 (5.40.0) | New. |
id-1516507