[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #UAK-176631]: ncdump with -x option fails

Hi Peter,

> When the attached nc4 file is dumped using ncdump -h, the contents is
> successfully dumped as contained in file, ncdumpbug.1.txt.
> When the same file is dumped using ncdump -h -x, ncdump prints the
> dimensions, then prints the following error message:
> ncdump: NetCDF: Attempt to convert between text & numbers
> The output for the -x option should also contain variables and attributes.

As currently documented in the man page reference for ncdump


the -x option doesn't yet work for netCDF-4 files that don't use the netCDF 
classic model:

  -x       Output XML (NcML) instead of CDL. The NcML does not include data 
values. The 
             NcML output option currently only works for netCDF classic model 

The lack of ncdump support for NcML output for netCDF-4 files is a
known issue that you can track in our Jira system:


Thanks for pointing out that the error messages are currently
inadequate in informing users that NcML output for the netCDF-4
enhanced model is not yet supported in the C-based ncdump.

I think the ncdump that's part of the netCDF-Java Tools-UI tool does
support NcML output for netCDF-4 enhanced model files, so if you have
netCDF-Java, you might try that as a workaround:

  java -classpath toolsUI.jar ucar.nc2.NCDumpW /path/to/your/file


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: UAK-176631
Department: Support netCDF
Priority: High
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.