My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

netCDF version 4 has many features not found in earlier versions of the library and is implemented on top of HDF5. This module can read and write files in both the new netCDF 4 and the old netCDF 3 format, and can create files that are readable by HDF5 clients. The API modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.

Most new features of netCDF 4 are implemented, such as multiple unlimited dimensions, groups and zlib data compression. All the new numeric data types (such as 64 bit and unsigned integer types) are implemented. Compound and variable length (vlen) data types are supported, but the enum and opaque data types are not. Mixtures of compound and vlen data types (compound types containing vlens, and vlens containing compound types) are not supported.

Quick Links:

Documentation

Changelog

README

News:

20110512: version 1.0fix1 replaces 1.0 on the download page (fixes a python 3 incompatibility in setup.py reported in issue 125).

20110511: version 1.0 released.

20111212: version 0.9.9 released. Mainly unicode bug fixes. Default unicode encoding was changed to utf-8 from latin-1, since this is the default encoding in python3 and the only encoding that appears to work in netCDF variable and dimension names.

20111020: version 0.9.8 released.

20110817: version 0.9.7 released. Printing of Variable, Group and Dataset objects now provides useful ncdump-like information.

20110804: New windows installers with opendap support, courtesy of Christoph Gohlke.

20110720: version 0.9.6 released. Bugfixes - default unicode encoding changed from ascii to latin-1.

20110704: version 0.9.5 released. This release is included in Enthought Python release 7.1. version 0.9.4 is included in pythonxy distribution, version 2.6.6.1.

20110405: version 0.9.4 released. Some bug fixes, first release with python 3 support. The netCDF3 module has been removed.

20101102: version 0.9.3 included in Enthought Python release 6.3. version 0.9 is included in pythonxy distribution, version 2.6.5.6.

20101023: version 0.9.3 bug fix release (see Changelog).

20100820: version 0.9.2 bug fix release. Tested with netcdf 4.1.1 and netcdf 4.1.2-beta.

20100411: version 0.9.1 released with several bug fixes.

20100226: There is a bug writing netCDF-4 files on big-endian platforms with more than 8 attributes attached to a variable or group. It is described here:

http://www.hdfgroup.org/HDF5/release/known_problems/index.html

That bug is fixed by release HDF5 1.8.4 Patch 1, available from the HDF5 downloads page:

http://www.hdfgroup.org/downloads/index.html

Building any version of netcdf-4 with HDF5 1.8.4 Patch 1 fixes that bug.

A separate, unrelated bug in netcdf-4.1 requires the conditions described here:

http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2010/msg00070.html

That bug is fixed in the forthcoming netcdf-4.1.1 release.

20100209: Version 0.9 released (bugfixes, netcdf-4.1 compatibility).

20090818: Version 0.8.2 released. vlen and compound types fully supported with netcdf-4.1-beta2 or higher.

20090621: Version 0.8.1 released with experimental variable-length (vlen) data type support.

20090603: Compound types now work properly since the netcdf-4.1-beta-20090603 snapshot. I've disabled the compound types tests until 4.1 is released.

20090421: The initial compound data type support is 0.8 is broken (it only works correctly if all the members of the compound type have the same bit width). I'm trying to figure out if this is a bug in the netcdf library, the extension module, or both. So, if you are concerned about the test failures, just move tst_compoundvar.py out of the way.

20090418: version 0.8 released with support for compound data types (which map to numpy structured, i.e. 'record', arrays).

20090402: tst_dap.py in version 0.7.7 will fail due to a bug in the newly released netcdf-4.0.1 final. To skip the dap test, just rename test/tst_dap.py to test/tst_dap.py.skip and run test/run_all.py again.

20090217: version 0.7.7 released. David Huard has re-worked 'fancy indexing', adding new features and making it less of a memory hog. However, it is now no longer compatible with numpy fancy indexing - 1d arrays of boolean or integer indices work independently on each dimension (similar to the way vector subscripts work in fortran). This enables things like:

>>> tempdat = temp[[0,1,3],lats>0,lons>0]

(retrieves 1st, 2nd and 4th levels, all Northern Hem. and Eastern Hem. grid points - note that this would raise an error in numpy).

20090124: netcdf4-python now included in the Enthought Python Distribution (v4.1.30101).

20081223: If built against netcdf-4.0.1-beta2 (compiled with --enable-dap), you can access remote opendap datasets by specifying a URL instead of a filename when creating a Dataset instance.

20080922: Version 0.7.6 released. See Changelog.

20080801: Version 0.7.5 released. Bugfixes, mainly in MFDataset. Some new features in MFDataset.

20080508: Version 0.7.4 released. Use with netcdf-4.0 and HDF5 1.8.1.

20080414: Version 0.7.3.1 does not work with recent snapshots of the netCDF4 library. Click the 'Source' tab to download the latest source from SVN instead. I'm waiting the netcdf-4-beta2 (due any day now) before making a new source release.

20080101: As of version 0.7.3, a netCDF3 module is now included, for those who don't want to install bleeding-edge versions of the netcdf-4 and HDF5 libraries. Some features not found the Scientific.IO.NetCDF module:

  • ability to read multi-file netCDF Datasets, making variables spanning multiple files appear as if they were in one file.
  • support for masked arrays, automatic packing and unpacking of packed integer data.
  • supports more complicated slicing (including numpy 'fancy indexing').
  • includes convenience functions for converting to and from datetime objects to numeric time values, using all the calendars in the CF metadata standard.
  • convenience functions for converting arrays of characters to arrays of strings, and vice-versa.
  • can use numpy dtype objects to specify netCDF variable datatype.
Powered by Google Project Hosting