.. highlightlang:: us .. index:: nc_varinq_info .. _nc_varinq_info: nc_varinq_info ============== .. us.tag nc_varinq_info NOTREADYENGLISH NC_Var New5400 Changed5704 :ref:`nc_varinq_info` returns information about a channel. (Minimum, Maximum, Monotonic, channel contains missing values). .. function:: value = nc_varinq_info(ncid, varid, ssInfo) .. us.return **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 :ref:`nc_last_error`. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. .. uparam:: varid *varid* is the ID of a variable. .. uparam:: ssInfo *ssInfo* is one of the following strings: .. list-table:: :header-rows: 1 * - 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. .. us.comment **Comment** The function can only be used for UniPlot data files. See :ref:`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. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2015.4 (5.70.4) - Reduced data ("reduced"). * - R2012 (5.40.0) - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_open`, :ref:`nc_create`, :ref:`nc_last_error`, :ref:`nc_varinq_changed` :sub:`id-1516507`