2008 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Utilities
4.0 ncdump
The ncdump command-line
utility converts netCDF data to a human-readable text form.
ncdump produces a
text representation of specified information in the netCDF file, either CDL or
NcML.
- To look at just the "header" information (also known as the file
schema or metadata) of a netCDF file, use the "-h" option, for example:
ncdump -h co2.nc
More information is available by using the "-c" option,
which specifies all the header information plus values of the
coordinate variables.
ncdump -c co2.nc
To see the same information in NcML, a dialect of XML, use the "-x"
option:
ncdump -x -h co2.nc
To request values for only particular variables, use
the "-v variable-list" option.
The "-k" option to ncdump reports what kind of netCDF file
format (classic, 64-bit offset) is used:
ncdump -k co2.nc
The Java netCDF package has another implementation of ncdump
that can also output CDL or NcML. For example, here's how you could
output NcML for co2.nc:
java -cp toolsUI.jar ucar.nc2.NCdump co2.nc -ncml
NetCDF-4 note:
The netCDF-4 ncdump handles all features of the netCDF-4 data model in
CDL output. It doesn't produce NcML for netCDF-4 features yet.
2008 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Utilities