This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Lihua Li <address@hidden> >Organization: University of Massachussetts >Keywords: 199408222035.AA12492 ncdump Lihua, > Thank you for your kind help! I'd like to further information about >how to use "ncdump" utility to convert a netCDF file into asscii form and I'd >like to obtain some sample programs that use ncdump. Would you please >tell me where I can find them. The ncdump utility is for use on UNIX platforms. The ncdump utility is part of the netCDF library distribution available by anonymous FTP from unidata.ucar.edu in the pub/netcdf directory. You need to get the netcdf.tar.Z file, and then build the software. The ncdump utility is part of that software. It cannot be made on it's own. There are more details on the netCDF file format and what it looks like in the netcdf guide. The guide is available in the same location as the software as the file guide.ps.Z, a compressed postscript file. I've appended the output of a netCDF file put through the ncdump utility. Mike Wright netcdf sao { dimensions: report = UNLIMITED ; // (1943 currently) time_len = 20 ; id_len = 12 ; layers = 4 ; remarks_len = 25 ; variables: char id(report, id_len) ; id:long_name = "station id" ; char region(report, id_len) ; region:name = "region" ; region:long_name = "region id" ; char time(report, time_len) ; time:long_name = "time" ; time:units = "text_time" ; float lat(report) ; lat:long_name = "latitude" ; lat:units = "degrees_N" ; lat:_FillValue = -9999.f ; float lon(report) ; lon:long_name = "longitude" ; lon:units = "degrees_E" ; lon:_FillValue = -9999.f ; float elev(report) ; elev:long_name = "elevation" ; elev:units = "meters" ; elev:_FillValue = -9999.f ; float T(report) ; T:long_name = "temperature" ; T:units = "celsius" ; T:_FillValue = -9999.f ; float TD(report) ; TD:long_name = "dew point" ; TD:units = "celsius" ; TD:_FillValue = -9999.f ; float PSL(report) ; PSL:long_name = "sealevel pressure" ; PSL:units = "hectopascals" ; PSL:_FillValue = -9999.f ; float ALTIM(report) ; ALTIM:long_name = "altimeter setting" ; ALTIM:units = "hectopascals" ; ALTIM:_FillValue = -9999.f ; float SPD(report) ; SPD:long_name = "wind speed" ; SPD:units = "meters/second" ; SPD:_FillValue = -9999.f ; float DIR(report) ; DIR:long_name = "wind direction" ; DIR:units = "degrees" ; DIR:_FillValue = -9999.f ; float GUST(report) ; GUST:long_name = "wind gusts" ; GUST:units = "meters/second" ; GUST:_FillValue = -9999.f ; byte WX(report, layers) ; WX:long_name = "weather" ; WX:units = "WMO table 4677" ; float ZCL(report, layers) ; ZCL:long_name = "cloudbase" ; ZCL:units = "meters" ; ZCL:_FillValue = -9999.f ; char CC(report, layers) ; CC:long_name = "cloudcover" ; CC:units = "WMO tab" ; char cloudtype(report, layers) ; cloudtype:long_name = "cloudtypes" ; cloudtype:units = "WMO tables 0509, 0513, 0515" ; float VIS(report) ; VIS:long_name = "visibility" ; VIS:units = "kilometers" ; VIS:_FillValue = -9999.f ; char Ptend(report) ; Ptend:long_name = "Pressure tendency" ; Ptend:units = "WMO table 0200" ; float delP(report) ; delP:long_name = "Pressure change" ; delP:units = "hectopascals" ; delP:_FillValue = -9999.f ; float PRECIP(report) ; PRECIP:long_name = "precipitation amount" ; PRECIP:units = "millimeters" ; PRECIP:_FillValue = -9999.f ; float reftime_PRECIP(report) ; reftime_PRECIP:long_name = "precipitation reference time" ; reftime_PRECIP:units = "hours" ; float Tmax(report) ; Tmax:long_name = "maximum temperature" ; Tmax:units = "celsius" ; Tmax:_FillValue = -9999.f ; float Tmin(report) ; Tmin:long_name = "minimum temperature" ; Tmin:units = "celsius" ; Tmin:_FillValue = -9999.f ; char remarks(report, remarks_len) ; // global attributes: :title = "Surface converted data" ; :version = "2.0" ; :history = "Surface converted file from WXP decoders" ; :filetime = "15Z 14 JUL 93" ; data: (Not shown to conserve space. The records follow the outline in the header section above. See the netCDF guide for more information). }