This project is read-only.
NetCDF (network Common Data Form) is a set of software libraries and machine-independent data formats developed by University Corporation for Atmospheric Research and Unidata that support the creation, access, and sharing of array-oriented scientific data. Support of NetCDF format ensures great interoperability between Scientific Dataset and vast amounts of existing scientific applications and data archives.

This provider requires the unmanaged netcdf4.dll library. The current Scientific DataSet release runtime package includes netcdf4.dll built from Unidata's source codes for NetCDF Release 4.0.1 with statically linked satellite libraries (including HDF5).

Both 32-bit and 64-bit versions of pre-built netcdf4.dll are included in the source code tree. For information, see NetCDF license here.

The provider NetCDFDataSet supports variables of any non-negative rank.

The provider is associated with the provider name "nc" and the extension ".nc".

NetCDFDataSet accepts the following parameters in the URI (see also DataSet Uri):
  • file Specifies the file to open or create.
  • openMode=createNew|create|open|openOrCreate|readOnly Specifies how the DataSet should open a file. Possible values for the flag are:
    • createNew Specifies that the DataSet should create a new resource. If the resource already exists, an exception IOException is thrown.
    • open Specifies that the DataSet should open an existing resource. If the resource does not exist, an exception ResourceNotFoundException is thrown.
    • readOnly Specifies that the DataSet should open an existing resource for reading only. If the resource does not exist, an exception ResourceNotFoundException is thrown.
    • create Specifies that the DataSet should create a new resource. If the resource already exists, it will be created again.
    • openOrCreate Specifies that the DataSet should open an existing resource. If the resource does not exist, a new resource will be created.
  • deflate=off|store|fastest|fast|normal|good|best Defines the data compression level. Affects only new variables that are added to the DataSet. The default is normal. Example:
msds:nc?file=output.nc&openMode=create&deflate=good
  • trimZero=true|false Indicates whether the provider should trim trailing zeroes (\x00 symbol) when it reads attribute values. Set this to true to correctly read attributes from NetCDF files that were created by C code with \x00 appended. Default is false.
  • enableRollback=true|false Indicates whether rollback is enabled. When rollback is enabled, a backup is made of the underlying file each time a transaction occurs, so that it is possible to restore the file later. When rollback is disabled, an exception occurs if you attempt to invoke rollback. The default is true. Consider setting it false to significantly increase performance. Enable rollback for datasets that do not have only NetCDF variables.
  • include Includes variables as references from another dataset, defined as a URI, into this dataset. Example:
msds:memory?include=msds%3Acsv%3Ffile%example.csv%23lat%2Clon
(This is the escaped version of "msds:memory?include=escape[msds:csv?file=example.csv#lat,lon]".) This URI includes the variables lat and lon from msds:csv?file=example.csv. If no variable names are specified, all variables are included.
The NetCDFDataSet provider supports URIs that contain a path and additional parameters that are appended following a question mark. For example:
c:\data\air0.nc?openMode=open&enableRollback=false
Names. If a variable name does not comply with NetCDF naming rules, the NetCDF layer uses its simplified version, but you can still see its original name through the DataSet.

DateTime type support. The unmanaged NetCDF4 does not support a date/time type, the NetCdfDataSet stores date/time data internally stored as a double variable with the following special attribute:
Units = "100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001"
NetCDF variables with this attribute are loaded as DateTime variables. The current release does not consider any other unit descriptions as a date/time value, so the variable's final type of data is Double.

Examples
The following example creates an empty NetCDFDataSet for a new data file:

using (DataSet ds = DataSet.Open("msds:nc?file=example.nc&openMode=create"))
{
    // Working with ds . . .
}

Last edited Apr 21, 2010 at 10:05 PM by pennyo, version 9

Comments

No comments yet.