.. highlightlang:: us .. _nc_mapinterpolation: NC_MapInterpolation =================== .. index:: NC_MapInterpolation .. us.tag NC_MapInterpolation ENGLISH nc.tools New590 :ref:`NC_MapInterpolation` calculates new channels by map interpolation and adds the new channels to an NC file. .. function:: bool = NC_MapInterpolation(ssNCMap, ssXMap, ssYMap, svZMap, ssNCFile, ssXChanName, ssYChanName) .. us.return **Return Value** bool .. us.params **Parameters** .. uparam:: ssNCMap *ssNCMap* is the name of the netCDF file containing the maps. This file will be opened with read access. .. uparam:: ssXMap *ssXMap* is the channel name with the map x coordinates. .. uparam:: ssYMap *ssYMap* is the channel name with the map y coordinates. .. uparam:: svZMap *svZMap* is a vector with the channel names with the map z coordinates. .. uparam:: ssNCFile *ssNCFile* is the netCDF file name. The interpolated channels will be added to this file. This file will be opened with write access. .. uparam:: ssXChanName *ssXChanName* is the channel name with the x coordinate. .. uparam:: ssYChanName *ssXChanName* is the channel name with the x coordinate. .. us.comment **Comment** The function calculates a map for *ssYMap*, *svZMap* and each channel in *svZMap*, using the Thin-Plate-Spline interpolation method. The channels *ssXChanName* and *ssYChanName* are loaded from the file *ssNCFile*. These channels must have the same physical unit and approx. the same data range as the map channels *ssXMap* and *ssYMap*. If the coordinates are outside the map, the z-coordiantes are calculated by an extrapolation. The calculated vector with z-coordinates will have the same length as the channe *ssXChanName*. The data will be saved in the *ssNCFile* file using the names in *svZMap*. If a map cannot be interpolated, the channel in *ssNCFile* is filled with missing_values (1e10). .. us.example **Example** :: ssNCMap = "c:/program files/uniplot/samples/kennfeld.nc"; // map ssXMap = "N" ssYMap = "EWGMOM" svZMap = ["BEEWG", "Pans"] ssNCFile = "c:/program files/uniplot/samples/vollast.nc"; ssXChanName = "N" ssYChanName = "MEFF" NC_MapInterpolation(ssNCMap, ssXMap, ssYMap, svZMap, ssNCFile, ssXChanName, ssYChanName) .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.9.0 - New function. .. seealso:: :ref:`overview-netcdf-files`, :ref:`nc_create`, :ref:`auto_ImportData`, :ref:`XYZGetInterpolZValues` :sub:`id-301498`