NetCDF  4.9.2
Working with NetCDF Files from the command line.

Options for working with netcdf-formatted files from the command line or with an external program.

The NetCDF Utilities

The ncdump command reads a netCDF file and outputs text in a format called CDL. The ncgen command reads a text file in CDL format, and generates a netCDF data file. The nccopy command copies a netCDF file from one binary format to another, optionally changing compression and chunksize settings.

ncdump

The utility ncdump can be used to show the contents of netCDF files. By default, ncdump shows the CDL description of the file. This CDL description can be fed into ncgen to create the data file.

See also: The ncdump User's Guide

ncgen

The ncgen utility can take an ASCII input file, in CDL format, and generate a binary netCDF file. It is the opposite of ncdump.

See also:

nccopy

The nccopy utility can copy a netCDF file, changing binary format, chunk sizes, compression, and other storage settings.

See also: nccopy

Tools for Manipulating NetCDF Files

Many existing 3rd-party software applications can read and manipulate netCDF files. Before writing your own program, check to see if any existing programs meet your needs.

Three utilities come with the netCDF distribution: ncdump, ncgen, and nccopy. (See The NetCDF Utilities).

The following general-purpose tools have been found to be useful in many situations. Some of the tools on this list are developed at Unidata. The others are developed elsewhere, and we can make no guarantees about their continued availability or success. All of these tools are open-source.

  • UDUNITS - Unidata library to help with scientific units.
  • IDV - Unidata's Integrated Data Viewer, a 3D visualization and analysis package (Java based).
  • NCL - NCAR Command Language, a graphics and data manipulation package.
  • GrADS - The Grid Analysis and Display System package.
  • NCO - NetCDF Command line Operators, tools to manipulate netCDF files.

A list of netCDF tools that we know about can be found on the website. If you know of any that should be added to this list, send email to suppo.nosp@m.rt-n.nosp@m.etcdf.nosp@m.@uni.nosp@m.data..nosp@m.ucar.nosp@m..edu.