Modified ncdump to output data in json format
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
legacy Cleanup Feb 6, 2012
nbproject output headers in json too, work in progress Jan 31, 2012
src no global attributes case fix Oct 2, 2015
tests no global attributes case fix Oct 2, 2015
.gitignore Cleanup Feb 6, 2012
CMakeLists.txt better readme Oct 2, 2015

Ncdump output in json (and CDL)

Modified version of ncdump (netcdf 4.1.1)


$ ncdump-json -h -j tests/
{"dimensions":{"time":3169},"variables":{"time":{"type":"double","dimensions":["time"],"attributes":{"standard_name":"time","units":"seconds since 1970-01-01 00:00:00","long_name":"time","_FillValue":-99999.9000000000,"axis":"T","calendar":"gregorian"}},"AIRT":{"type":"double","dimensions":["time"],"attributes":{"standard_name":"air_temperature","units":"C","long_name":"air temperature","_FillValue":-99999.9000000000,"coordinates":"time","valid_min":-15.0000000000000,"valid_max":45.0000000000000,"original_units":"C","observation_type":"measured","precision":"0.01"}},"QC_AIRT":{"type":"byte","dimensions":["time"],"attributes":{"long_name":"quality flag for air_temperature","quality_control_convention":"SOCIB Quality control Data Protocol","valid_min":0,"valid_max":9,"_FillValue":10,"flag_values":[0,1,4,9],"flag_meanings":"no_qc_performed good_data bad_data
$ ncdump-json -v AIRT -j tests/

It behaves exactly like the original ncdump if you omit the command-line option -j


  • Download latest release from, unzip.
  • Install cmake and libnetcdf-dev
  • cd ncdump-json directory
  • $cmake .
  • $make (you might get some warnings, it is ok).
  • At this point, the binary ncdump-json is available.
  • #make install to place the binary in /usr/local/bin
  • You can run the tests included and add more: cd tests; ./

Problems? It works (it's tested) on both Linux and OSX. Read the Issues before asking.

A note from the developer:

I keep receiving emails and issues from users, those are welcome and I appreciate you all and always try to reply :) but this software is no longer actively being maintained because I left my former company Socib in 2012. If you rely on this program and need help, you're welcome to poke me through my company Atlantis of Code and we'll talk about it:

Josep Llodrà –

Special thanks to all who contributed to this software filling Issues or sending Pull Requests.