2.7.40 impNetCDFEx

Menu Information

Data: Import from File: NetCDFEx (NC)

Brief Information

Import netCDF file. It supports the file version lower than 4.01.

Additional Information

Minimum Origin Version Required: 8.1 SR0

Command Line Usage

impNetCDF fname:="RUC.NC";

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

fname$
Specify the filename(s) of the file(s) to be imported. In the dialog, click the browse button beside the list box to open one or more files and the filenames will be listed in the box.
File Info And Data Selection trfiles

Input

TreeNode

<unassigned>
This is used to select the desired data channels. See more details in Description table.
Output orng

Output

Range

<active>
Specifies the range for the imported data.

See the syntax here.

Header Info trheader

Output

TreeNode

<unassigned>
This is for outputting the header information, which is hidden from the GUI. Users are not advised to use this variable.
Import Filter trFilter

Input

TreeNode

<optional>
This is the TreeNode for the import filter, which is hidden from the GUI. Users are not advised to use this variable.

Description

The Network Common Data Form (NetCDF) is a set of software libraries and data formats. These self-describing and machine-independent formats support the creation, access, and sharing of array-oriented scientific data. And it is platform independent.

This X-Function is used for importing NetCDF data files, whose version should be lower than 4.01. This X-Function supports multi-files importation. When a NetCDF file is imported, there will be at least one work book or one matrix book created. Workbooks are used to store one dimension datasets; while matrix books are used for storing datasets with two or more dimensions datasets. In the latter case, different dimensions of a dataset are saved in different channels in matrix sheets.

Details on Some Dialog Options

  • File Info And Data Selection (trfiles)
This variable is a treenode. It shows file information and allows you to choose the channels to import. The name of each sub-treenode is the name of the corresponding file. Under each sub-treenode, the file size and any available data are listed. The data are sorted by dimensions.

Examples

Suppose you have a netcdf file, C:\netcdf_test.nc. It has three 2D variables and one 3D variable. Performing the following steps will import all the variables in it into a new workbook in Origin.

  1. Select Data: Import from File: NetCDFEx(NC)... from the Origin menu. This opens the NetCDF dialog.
  2. Go to C:\ and select netcdf_test.nc. Then click the Add File(s) button. Make sure that the Show Options Dialog check box is selected.
  3. Click the OK button to close this dialog box. The impNetCDFEx dialog should be opened.
  4. In the File Info And Data Selection: netcdf_test: DataSelection branch, select all the check boxes.
  5. Change the Output to <new>.
    ImpNetCDFEx 1.png
  6. Click the OK button. The data is imported to a matrix book and a workbook.

Related X-Functions

cd, impinfo, findFiles, impFile