wiki:NetCDF

NetCDF

Building NetCDF

NetCDF support requires the NetCDF library. Once it is built and installed, use the "--with-netcdf=<path to install tree>" (e.g. /usr/local) option to configure and build GDAL. If nc-config is found in the default path or in the <path to install tree>/bin directory, then optional support of netcdf-4 will be tested.

See NetCDF Quick Instructions for instructions on how to build NetCDF.

Conflicts with HDF4

If building GDAL with both HDF4 and NetCDF support it is necessary to build the HDF library specially or a dangerous conflict will occur. See the HDF topic for details.

CygWIN

Please note that with CygWIN you need to be sure that the DLLs are executable, or GDAL will not execute. Use the command chmod a+rx [NetCDF DLLs] . The netCDF DLLs directory must be in your PATH.

Improvements to the NetCDF driver

The newer NetCDF-4 library offers features such as per-variable compression (using the deflate algorithm) and chunking which require the HDF5 library. To enable this, "--enable-netcdf4" (and perhaps --with-hdf5=<path_to_hdf5>) must be added to netcdf configure.

GDAL 1.9 includes support for NetCDF-4 file format (provided that nc-config is found in the configure stage), as well as the 64-bit offset file format. HDF4 and HDF5 files are also supported, although the respective driver is used if available. The syntax "NETCDF:<file>" forces the use of the NetCDF driver.

Please look into NetCDF_Improvements for information regarding these and other improvements to the GDAL NetCDF driver.

Open Tickets

#1808
NetCDF Driver Improvements
#2540
[PATCH] Band selection in NETCDF driver
#2581
netcdf: add metadata record for original array dimension when reading from multidimensional files
#2584
NetCDF Global EASE-Grid 8-day Blended SSM/I and MODIS Snow Cover flipped east/west?
#2893
netcdf driver does not read and write CF-1.0 coordinate system properly for projected CRS
#4245
PAM stores duplicate metadata even if the format and driver support
#4285
OGR does not support PROJ.4 +proj=ob_tran , rotated_pole is not supported by the netcdf driver
#4484
gdalwarp on large netcdf datasets sets data from first input dataset to <nodata> and generates error if -dstnodata option is used with netcdf-4 file
#4512
netcdf files with longitude between 180 and 360 degrees are incorrectly projected
#4513
netcdf driver does not support irregular grids / GDAL GEOLOCATION arrays
#4886
NetCDF driver writes incorrect GeoTranform in case of WRITE_BOTTOMUP=YES
#4890
PATCH: DODS driver can now read 3-D datasets, metadata, projection, remote NetCDF files
#5291
netcdf driver does not detect .grd files in netcdf-4 format / netcdf driver does not support netcdf-4 files with default chunking and bottom-up format / hdf5 driver crashes when H5Sget_simple_extent_ndims() returns negative value
#5389
NetCDF: gdal_translate unable to translate EASE-GRID file properly
#5873
netcdf driver does not detect "top-down" order
#5935
GTiff to netcdf conversion fails
#6551
allow vector read of NetCDF NASA ocean color L3Bin files

Last modified 5 years ago Last modified on Jun 25, 2012 7:38:49 AM