NC_TimeInterpolation

NC_TimeInterpolation interpolates the channels of an NC file with different time channels onto one time base.

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)

Return Value

ncid of the open NC file or -1. The file must be closed with nc_close. See also NC_Interpolation. NC_Interpolation will close the file and return a bool value.

Parameters

Parameter

ncid

ncid is the handle of an open netCDF file returned by a call of nc_open.

ssNCName

ssNCName is the name of a netCDF file. Instead of the name ncid can be used.

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.
ssTimeName

ssTimeName is the name of a time channel in the source file. The data must be monoton increasing.

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.

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.

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);
}

History

Version Description
5.20.0 New

id-1833573