nc_to_obj reads a netCDF file or a selection of channels of a netCDF file into a UniScript object.
Return Value
obj is an object containing the channels and three other objects: globals, channel_info and order. globals contains the global attributes of the netCDF file, channel_info contains the channel attributes for each channel and order contains the channel order of the netCDF file.
In case of an error, the function returns the value 0.
Parameters
ssFilename is the netCDF file name or any other data file. Other files will be converted to netCDF if possible.
svChannelNames is a string vector with channel names (optional). If set to 0, a selection dialog box will be displayed.
Example
* ssFile = GetRootDirectory() + "samples/test1.xls";
* o = nc_to_obj(ssFile, ["EWGFAK", "Alpha"])
* o
[.
Alpha = matrix 17 x 1 [88.7, 81.78, 82.76, 88.35, 88.7, ...]
EWGFAK = matrix 17 x 1 [0.85, 0.86, 0.86, 0.87, 0.87, ...]
channel_info = [.
Alpha = [.
C_format = "%.2lf"
add_offset = 0
datatype = "real4"
long_name = "Alpha [-]"
scale_factor = 1
title = "Alpha"
units = "-"
]
EWGFAK = [.
C_format = "%.2lf"
add_offset = 0
datatype = "real4"
long_name = "EWGFAK [GRAD]"
scale_factor = 1
title = "EWGFAK"
units = "GRAD"
]
]
globals = [.
Creator = "UniPlot Excel Converter v3"
Origin = "d:\\uniplot_du\\samples/test1.xls"
Source = "Uniplot Software GmbH (www.uniplot.de)"
__XSort__ = 0
columnseparator = "\\t"
firstdatarow = 3
missing_value = 1e+10
]
order = [.
[1] = "EWGFAK"
[2] = "Alpha"
]
]
object (obj at 0x3400C14)
History
| Version | Description |
|---|---|
| 5.14.7 | New. |
See also
id-464946