Home

Presentation
AMMA-SAT
AMMA-MOD
Funding Organisations
Data Access
Data policy
AMMA-SAT Data Access
AMMA-MOD Data Access
AMMA-In Situ Database
Data ordering
Working Groups
ALMIP
WAMME
AMMA-MIP

NetCDF Format and associated tools Print E-mail

NetCDF (network Common Data Form) is a set of interfaces for array-oriented data access and a freely-distributed collection of data access libraries for C, Fortran, C++, Java, and other languages. The netCDF libraries support a machine-independent format for representing scientific data. Together, the interfaces, libraries, and format support the creation, access, and sharing of scientific data.

NetCDF data is:

  • Self-Describing. A netCDF file includes information about the data it contains.
  • Portable. A netCDF file can be accessed by computers with different ways of storing integers, characters, and floating-point numbers.
  • Direct-access. A small subset of a large dataset may be accessed efficiently, without first reading through all the preceding data.
  • Appendable. Data may be appended to a properly structured netCDF file without copying the dataset or redefining its structure.
  • Sharable. One writer and multiple readers may simultaneously access the same netCDF file.
  • Archivable. Access to all earlier forms of netCDF data will be supported by current and future versions of the software.

More information available at http://www.unidata.ucar.edu/packages/netcdf/.

In the FTP directory formats/netcdf/seminaire_27_4_98/ you can find PowerPoint presentations about NetCDF, and 2 simple examples of NetCDF files reading routines.

Standard tools to manipulate NetCDF files are NcDump and NcGen commands, and the NCO tools suite.

Outil NcDump

ncdump is a standard tool, which is part of the default NetCDF distribution.

  • ncdump -h list the metadata from the netCDF file.
  • ncdump -c list the metadata and the coordinate variables
  • ncdump list the metadata and all the data stored in the NetCDF file. Warning : output can be voluminous.

Here is an example of a NetCDF file heading (generated by NcDump).

NCO Tools

NCO is a NetCDF toolbox that can be used to extract subsets of a NetCDF file, concatenate various NetCDF files, edit the attributes of any variable. NCO is particularly useful to work remotely on a subarea of the NetCDF file. Documentation is available here.

Exemple :

extract over the area: lon = 30E, 50E lat= 50N, 10N, the air temperature for the 100, 70, 50, 30, 20, 10 mbar levels for January, 30th 1990.

$ ncks -d lon,30.,50. -d lat,10.,50. -d level,10.,100. -d time,29,29 /bdd/ncep/1xdaily/press/1990/air.1990.nc toto.nc # en local

The result is stored in the NetCDF file toto.nc.

ncks interprets "float" type parameters as geophysical values. "Integer" values are interpretated as indices. In this example, the sub-array is defined using the geophysical values of the longitudes, latitudes and levels.

FERRET:

Visualization tool for NetCDF files.

Last Updated ( Thursday, 20 April 2006 )