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.
>To: address@hidden >cc: address@hidden >From: Willie Kantrowitz <address@hidden> >Subject: ncdump printing of multi-line global attributes >Organization: MIT >Keywords: 200201251855.g0PItXx02262 ncdump global attributes Hi William, > ncdump prints global attributes indented two tabs worth. If the value > of the attribute is a multi-line string the printing of continuation > lines uses a slight indentation off the left margin rather than an > indentation off the printing of the name of the global attribute. This > makes it hard to read, especially if there are many global attributes > with many multi-line continuations. > > Example (simulating effect of tabs); > > // global attributes: > :name = "\n", > "first line of information\n", > "second line of information\n", > "third line of information" ; > :another = "\n", > "a line of information\n", > "another line of information" ; > > This format is hard to read and find the attribute names. The following > outline-style format would be easier to read. > > // global attributes: > :name = "\n", > "first line of information\n", > "second line of information\n", > "third line of information" ; > :another = "\n", > "a line of information\n" , > "another line of information" ; > > Since white-space is no problem for ncgen it could read such an > outline-style format without problem. > > This is an annoyance. I would hope/expect that it would not be too > difficult to correct, especially since ncdump already knows to do a > small indentation for continuation lines. > > (While I have not tried it, I assume the same indentation scheme is used > for printing attributes of variables. A similar correction should hold > there too.) Thanks, this is a good suggestion. I'll try to get it into the 3.5.1 release. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu