.. highlightlang:: us .. index:: nc_set_option .. _nc_set_option: nc_set_option ============= .. us.tag nc_set_option ENGLISH NC New403 Changed427 Changed5145 Changed5508 Changed6200 :ref:`nc_set_option` sets an option. .. function:: ret = nc_set_option(ncid, ssPropName, prop) .. us.return **Return Value** If *ret* is -1 an error occurred. .. us.params **Parameters** .. uparam:: ncid Identifies the netCDF file. If *ncid* is set to -1 the option is set globally. .. uparam:: ssPropName *ssPropName* is one of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - ``"utf8"`` - * - ``"nocase"`` - Boolean value. TRUE (default = 1) indicates that variable and attribute names :ref:`nc_varid` and :ref:`nc_attget` should be treated case-sensitively. FALSE (0) indicates that upper- and lower-case characters should be treated equally. If set to -1 the global setting for *ncid* == -1 is used. * - ``"umlaut_to_underscore"`` - Boolean value. If set to 1 umlauts in channel- and attribute names are replaced by an underscore. If set to 0 umlauts are replaced as following: Ä->A, ä->a, Ö->O, ö->o, Ü->U, ü->u, ß->s. Default value is 0. Because of a bug in UniPlot 5.0.0 to 5.4.1 umlauts were always replaced by an underscore. With the help of this option this behavior can be reset. The option can only be set globally (ncid = -1). * - ``"allow_special_chars"`` - Boolean value (default = 1). If *prop* is 1 the following 10 charaters may occur in channel and attribute names: ``.``, ``-``, ``+``, ``$``, ``#``, ``~``, ``!``, ``^``, ``&``, ``%``. * - ``"nc2_no_write_share"`` - If *prop* is equal to 1, NC2 file are opened exclusively. In this case no other process can access the file, e.g. a virus scanner. .. us.example **Example** :: nc_set_option(ncid, "nocase", 1); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2020.0 - New Option ``"utf8"``. * - R2013.8 - New Option ``"nc2_no_write_share"``. * - 5.14.5 - New Option ``"allow_special_chars"``. * - 5.4.2 - New Option ``"umlaut_to_underscore"``. * - 4.2.7 - *ncid* can be set to -1. In this case the property is set for all *ncid*'s. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_open`, :ref:`nc_get_option` :sub:`id-244453`