2.7.49 impNetCDF

Menu Information

Data: Import from File: NetCDF (NC)

If you do not see this file type, choose Data: Import from File: Add/Remove File Types...

File Import Add Menu.png

To add drag & drop support for a file type, see Import Filter Manager.

Brief Information

Import netCDF file up to version 4.7.0. There is no DAP support.

Command Line Usage

1. fname$=RUC.nc; impNetCDF;

2. impNetCDF fname:="RUC.NC";

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script


File Name fname




Filename(s) of the file(s) to be imported. 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




This is used to select the desired data channels. See Description part of this document for details.
See more details in Description table

Output orng




Specifies the range for the imported data. See the syntax here.

Header Info trheader




This is for outputting the header information, which is hidden from the GUI. Users are not advised to use this variable.
See more details in Description table

Import Filter trFilter




This is the TreeNode for the import filter, which is hidden from the GUI. Users are not advised to use this variable.
See more details in Description table


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, up to and including version 4.7.0. There is no DAP support.

This X-Function supports multi-file import. 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 dimensional datasets; while matrix books are used for storing datasets with two or more dimensions. 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.
  • Save File Info. in Workbook (bSaveFileInfo)
This variable is a checkbox. If selected, the file information will be saved to the workbook. If not selected, the file information will not be saved in Organizer and the reimport will not work, but the import speed can be improved.


1. The following example imports an NetCDF(NC) data file with the dialog:

a. From the Origin menu, select Data: Import from File: NetCDF (NC) or type impNetCDF -d in command window. This will open the NetCDF dialog for you to choose the import file.
b. Browse to the folder where your data file is. Select the file and click the Add File(s) button. Click OK to close the dialog box.
c. In the impNetCDF dialog box, expand Data Selection and select the proper channels. Click Ok to close the dialog and import the file.

2. The following script command imports a NetCDF file (C:\Sample.NC) without opening the dialog:


3. The following example will use script to import all NetCDF files under a specific folder (assume it is C:\NetCDFData\).

cd C:\NetCDFData;
findFiles ext:="*.nc";

Related X-Functions

cd, impinfo, findFiles, impFile