/usr/share/doc/grads/html/gradutilncdump.html is in grads 2:2.0.2-8build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<body>
<h2><a name="ncdump">ncdump</a></h2>
<code>ncdump [-c] [-h] [-v <i>var1</i>,...] [-b <i>lang</i>] [-f
<i>lang</i>] [-l <i>len</i>]
[-n <i>name</i>] [-d <i>f_digits</i>[,<i>d_digits</i>]]
<i>file</i></code><p>
Where:
<ul>
<code>-c</code>
<ul>Show the values of <i>coordinate</i> variables (variables that are
also dimensions) as well as the declarations of all dimensions,
variables, and attribute values. Data values of non-coordinate
variables are not included in the output. This is the most suitable
option to use for a brief look at the structure and contents of a
netCDF file.
</ul>
<p>
<code>-h</code>
<ul>
Show only the
<i>header</i> information in the output, that is the declarations of
dimensions, variables, and attributes but no data values for any
variables. The output is identical to using the <code>-c</code>
option except that the values of coordinate variables are not
included. (At most one of <code>-c</code> or <code>-h</code> options
may be present.)
</ul>
<p>
<code>-v <i>var1,...,varn</i></code>
<ul>
The output will include data values for the specified variables, in
addition to the declarations of all dimensions, variables, and
attributes. One or more variables must be specified by name in the
comma-delimited list following this option. The list must be a single
argument to the command, hence cannot contain blanks or other white
space characters. The named variables must be valid netCDF variables
in the input-file. The default, without this option and in the
absence of the <code>-c</code> or <code>-h</code> options, is to
include data values for <i>all</i> variables in the output.
</ul>
<p>
<code>-b <i>lang</i></code>
<ul>
A brief annotation in the form of a CDL comment (text beginning with
the characters ``//'') will be included in the data section of the
output for each `row' of data, to help identify data values for
multidimensional variables. If <code><i>lang</i></code> begins with
<code>C</code> or <code>c</code>, then C language conventions will be
used (zero-based indices, last dimension varying fastest). If
<code><i>lang</i></code> begins with <code>F</code> or <code>f</code>,
then Fortran language conventions will be used (one-based indices,
first dimension varying fastest). In either case, the data will be
presented in the same order; only the annotations will differ. This
option is useful for browsing through large volumes of
multidimensional data.
</ul>
<p>
<code>-f <i>lang</i></code>
<ul>
Full annotations in the form of trailing CDL comments (text beginning
with the characters ``//'') for every data value (except individual
characters in character arrays) will be included in the data section.
If <code><i>lang</i></code> begins with <code>C</code> or
<code>c</code>, then C language conventions will be used (zero-based
indices, last dimension varying fastest). If <code><i>lang</i></code>
begins with <code>F</code> or <code>f</code>, then Fortran language
conventions will be used (one-based indices, first dimension varying
fastest). In either case, the data will be presented in the same
order; only the annotations will differ. This option may be useful
for piping data into other filters, since each data value appears on a
separate line, fully identified.
</ul>
<p>
<code>-l <i>len</i></code>
<ul>
Changes the default maximum line length (80) used in formatting lists
of non-character data values.
</ul>
<p>
<code>-n <i>name</i></code>
<ul>
CDL requires a name for a netCDF data set, for use by <a
href="gradutilncgen.html"><code>ncgen -b</code></a> in generating a default
netCDF file name. By default, <code>ncdump</code> constructs this name
from the last component of the pathname of the input netCDF file by
stripping off any extension it has. Use the <code>-n</code> option to
specify a different name. Although the output file name used by <a
href="gradutilncgen.html"><code>ncgen -b</code></a> can be specified, it may
be wise to have <code>ncdump</code> change the default name to avoid
inadvertantly overwriting a valuable netCDF file when using
<code>ncdump</code>, editing the resulting CDL file, and using <a
href="gradutilncgen.html"><code>ncgen -b</code></a> to generate a new netCDF
file from the edited CDL file.
</ul>
<p>
<code>-d <i>float_digits</i>[,</i>double_digits</i>]</code>
<ul>
Specifies default number of significant digits to use in displaying
floating-point or double precision data values for variables that
don't have a `C_format' attribute. Floating-point data will be
displayed with <code><i>float_digits</i></code> significant digits.
If <code><i>double_digits</i></code> is also specified,
double-precision values will be displayed with that many significant
digits. If a variable has a `C_format' attribute, that overrides any
specified floating-point default. In the absence of any
<code>-d</code> specifications, floating-point and double- precision
data are displayed with 7 and 15 significant digits respectively. CDL
files can be made smaller if less precision is required. If both
floating-point and double-presision precisions are specified, the two
values must appear separated by a comma (no blanks) as a single
argument to the command. If you really want every last bit of
precision from the netCDF file represented in the CDL file for all
possible floating- point values, you will have to specify this with
<code>-d 9,17</code>.
</ul>
</ul>
<b>Usage Notes</b>
<p>
<code>ncdump</code> generates an ASCII representation of a specified
netCDF file on standard output. The ASCII representation is in a form
called <code>CDL</code> (``network Common Data form Language'') that
can be viewed, edited, or serve as input to <a
href="gradutilncgen.html"><code>ncgen</code></a>. <a
href="gradutilncgen.html"><code>ncgen</code></a> is a companion program that
can generate a binary netCDF file from a <code>CDL</code> file. Hence
<a href="gradutilncgen.html"><code>ncgen</code></a> and <code>ncdump</code>
can be used as inverses to transform the data representation between
binary and ASCII representations. See <a
href="gradutilncgen.html"><code>ncgen</code></a> for a description of CDL and
netCDF representations.
<p>
<code>ncdump</code> defines a default format used for each type of
netCDF data, but this can be changed if a `C_format' attribute is
defined for a netCDF variable. In this case, <code>ncdump</code> will
use the `C_format' attribute to format each value. For example, if
floating-point data for the netCDF variable <code>Z</code> is known to
be accurate to only three significant digits, it would be appropriate
to use the variable attribute<p> <dd><code>Z:C_format =
"%.3g"</code><p> <code>ncdump</code> may also be used as a simple
browser for netCDF data files, to display the dimension names and
sizes; variable names, types, and shapes; attribute names and values;
and optionally, the values of data for all variables or selected
variables in a netCDF file.
<p>
<b>Examples</b>
<ol>
Look at the structure of the data in the netCDF file
<code>foo.nc</code>:<p>
<dd><code>ncdump -c foo.nc</code><p>
<li>Produce an annotated CDL version of the structure and data
in the netCDF file <code>foo.nc</code>, using C-style indexing for
the
annotations:<p>
<dd><code>ncdump -b c foo.nc > foo.cdl</code><p>
<li>Output data for only the variables <code>uwind</code> and
<code>vwind</code> from
the netCDF file <code>foo.nc</code>, and show the floating-point
data
with only three significant digits of precision:<p>
<dd><code>ncdump -v uwind,vwind -d 3 foo.nc</code><p>
<li>Produce a fully-annotated (one data value per line) listing
of the data for the variable <code>omega</code>, using Fortran
conventions for indices, and changing the netCDF dataset name in
the resulting CDL file to <code>omega</code>:<p>
<dd><code>ncdump -v omega -f fortran -n omega foo.nc > Z.cdl</code></ol>
</body>
</html>
|