.. highlightlang:: us .. index:: nc_convert_units .. _nc_convert_units: nc_convert_units ================ .. us.tag nc_convert_units NOTREADYENGLISH nc.tools New5511 :ref:`nc_convert_units` convert the channel units to SI units or common units. .. function:: bool = nc_convert_units(ssFilename, bSIUnits) bool = nc_convert_units(ncid, bSIUnits) .. us.return **Return Value** *bool* is TRUE (1) if the units could be converted and otherwise FALSE (0). .. us.params **Parameters** .. uparam:: ssFilename *ssFilename* is the file name of a UniPlot data file (.nc2). .. uparam:: ncid *ncid* is the id of a UniPlot data file (see :ref:`nc_open` or :ref:`nc_create`). Use :ref:`nc_close` to close the file. Instead of *ncid* the file name *ssFilename* can be used. .. uparam:: bSIUnits If *bSIUnits* is TRUE, the channels will be converted to SI units. If FALSE (0) the channels will be converted to commond units. .. us.comment **Comment** Only units that are specified in unit table can be converted. To convert from SI units to common units, the channel name with the common unit must be specified the the channel sheet of the unit table. If the channel is not specified the preferred unit is used if specified. If the unit is not found in the unit table the channel will not be converted. See :ref:`unit-converter`. .. us.example **Example** :: * ssFile = auto_ImportData(GetRootDirectory() + "samples/test1.xls") * nc_convert_units(ssFile, TRUE); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.11 - New. .. seealso:: :ref:`overview-netcdf-files`, :ref:`unit-converter`, :ref:`nc_from_obj`, :ref:`NC_Edit`, :ref:`NC_GetVarNames` :sub:`id-1039787`