NSF Unidata

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

[netCDF #HKX-214469]: [netcdfgroup] Bug in ncdump -v

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.



John,

Either of the following command invocations work to show ways to handle special
characters in variable names:

  ncdump -v 'xma/rtip mon 1' obv01.nc > tmp.cdl
  ncdump -v xma/rtip\ mon\ 1 obv01.nc > tmp.cdl

Those are Unix shell syntax, so how to escape special characters to the shell 
would
depend on operating system and perhaps shell used.

What's a little non-intuitive is that some special characters that must be 
escaped in CDL,
such as ":", don't need to be escaped in the shell, but it doesn't hurt to 
escape them, so 
any of the following should work for a variable named "abc:def":

  ncdump -v abc:def
  ncdump -v abc\:def
  ncdump 'abc:def'

--Russ

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



Ticket Details
===================
Ticket ID: HKX-214469
Department: Support netCDF
Priority: High
Status: Closed