This App connects the Origin project to NetCDF files (*.bin).
This App is not pre-installed with Origin. To install, click Data: Connect to File: Add New.... The App Center opens listing only Connector Apps. Click the Download and Install button beside NetCDF Connector to install the App.
- With a worksheet or a matrix sheet active, click on the Data menu.
- To connect to a local file, click Data: Connect to File: NetCDF File and select the file. To connect to web data, click Data: Connect to Web and enter the URL.
- In the data selection dialog, you can add/remove datasets to be connected, then click OK to connect to the selected ones.
Multiple datasets are supported when importing to a worksheet.
Only one dataset is supported when importing to a matrix sheet.
- Once a connector is added, click the connector icon in the upper-left corner of the book to open a popup menu with various commands.
- By default, connector-imported data are NOT saved with the project file. To save a book's data with the project file, click the connector icon in the upper-left corner for that book and uncheck Exclude Imported When Saving. Note that each book has its own Exclude setting.
This app is capable of loading particular slices of a dataset.
In the following image, the dataset ua is a 5D dataset: time * plev * lat * lon. Once the dataset is selected, you can double-click into cell in the lower panel to specify the slices:
It means, the process will create 17 matrices for each z = plev value, which contains 256 columns for y = lat each and 128 rows for x = lon each.
While only x, y and z are supported, it does not mean you have to specify all of them. The one omitted is equivalent to 1.
- ua[y][x] creates 1 matrix of y (lat = 128) rows, x (lon = 256) columns.
- ua[z][x] creates z (plev = 17) matrices of 1 row, x (lon = 256) columns.
This syntax is also supported in LabTalk for this very data connector. Take the above as example, the selection could be
wks.dc.sel$ = ua[z][y][x]
A full example:
newbook mat:=1; // create a matrix book
wbk.dc.add("NETCDF"); // initialize data connector for the matrix book
wks.dc.source$=fname$;// connect to the file
wks.dc.sel$=ua[z][y][x];// dataset selection
wks.dc.import(); //import data