.. highlightlang:: us .. _nc_timeinterpolation: NC_TimeInterpolation ==================== .. index:: NC_TimeInterpolation .. us.tag NC_TimeInterpolation ENGLISH nc.misc New5200 :ref:`NC_TimeInterpolation` interpolates the channels of an NC file with different time channels onto one time base. .. function:: ncid = NC_TimeInterpolation(ncid, ssNewNCName, ssTimeName) ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeName) ncid = NC_TimeInterpolation(ncid, ssNewNCName, ssTimeName, svChannelList) ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeName, svChannelList) ncid = NC_TimeInterpolation(ncid, ssNewNCName, ssTimeName, svChannelList, rvTimeDef) ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeName, svChannelList, rvTimeDef) .. us.return **Return Value** ncid of the open NC file or -1. The file must be closed with :ref:`nc_close`. See also :ref:`NC_Interpolation`. :ref:`NC_Interpolation` will close the file and return a bool value. .. us.params **Parameters** **Parameter** .. uparam:: ncid *ncid* is the handle of an open netCDF file returned by a call of :ref:`nc_open`. .. uparam:: ssNCName *ssNCName* is the name of a netCDF file. Instead of the name *ncid* can be used. .. uparam:: ssNewNCName *ssNewNCName* is the name of an netCDF file to save the interpolated data. The file will be saved in the NC format of the source file. .. uparam:: ssTimeName *ssTimeName* is the name of a time channel in the source file. The data must be monoton increasing. .. uparam:: svChannelList Is a vector with channel names to be saved in the destination file. If *svChannelList* is an empty string all channels will be saved. .. uparam:: rvTimeDef The parameter *rvTimeDef* contains the delta value in seconds for the destination file, e.g. 0.1 for 10 Hz. Instead of the step with a vector with three elements can be specified: [Start Value, End-Value, Delta-Value]. Example: [0, 100, 0.1]; from 0 seconds to 100 seconds in steps of 0.1 seconds. If the parameter is not given the channel specified in the parameter *ssTimeName* is used instead. If the parameter only contains the Delta-Value the start and end value (range) is used from the given time channel *ssTimeName*. .. us.example **Example** **Example** :: ssNCName = auto_ImportData("d:/Inca_file.dat"); ssNewNCName = auto_ImportData("d:/Inca_file_interpol.dat"); ssTimeName = "time"; ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeName) if (ncid != -1) { nc_close(ncid); } ssNCName = auto_ImportData("d:/Inca_file.dat"); ssNewNCName = auto_ImportData("d:/Inca_file_interpol.dat"); ssTimeName = "time; svChannelList = "" // alle Kanäle rvTimeDef = 0.1 // 10 Hz ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeNamesv, ChannelList, rvTimeDef) if (ncid != -1) { nc_close(ncid); } ssNCName = auto_ImportData("d:/Inca_file.dat"); ssNewNCName = auto_ImportData("d:/Inca_file_interpol.dat"); ssTimeName = "time; svChannelList = ["ENG_N", "Fuel", "ATL_Drz", "VFzg"] // Kanalauswahl rvTimeDef = 0.1 // 10 Hz ncid = NC_TimeInterpolation(ssNCName, ssNewNCName, ssTimeNamesv, ChannelList, rvTimeDef) if (ncid != -1) { nc_close(ncid); } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.20.0 - New .. seealso:: :ref:`overview-netcdf-files`, :ref:`fileexport-data`, :ref:`NC_Interpolation`, :ref:`nc_create` :sub:`id-1833573`