Re: Problem with ncgen and/or ncdump

On Tue, 16 Jul 2002, Koontz, Annette S wrote:

[...]
>
> 1) Is there any way to "force" ncgen and/or ncdump to display the attribute
> info as I want it to?
> 2) Is there a better way to define the "resolution" attribute in the first
> place?
>
[...]

Quoting from ncdump man page:

[...]
  -p float_digits[,double_digits]
    Specifies default precision (number of significant digits) to use in
    displaying floating-point or double precision data values for attri-
    butes and variables.  If specified, this value overrides the value of
    the `C_format' attribute for any variable that has such an attribute.
    Floating-point data will be displayed with float_digits significant
    digits.  If double_digits is also specified, double-precision values
    will be displayed with that many significant digits.  In the absence
    of any -p 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 -p 9,17 (according to
    Theorem 15 of the paper listed under REFERENCES).
[...]

 Hope this helps.

        Graziano.

                             \ | /
                             (@ @)
 -------------------------o00-(_)-00o -----------------------------
 Graziano Giuliani
 University of L'Aquila
 Department of Electrical Engineering - CETEMPS
 Monteluco di Roio, 67040 L'Aquila, Italy
 Tel. +39 08623475309     Fax. +39 08623475210
 mailto: graziano.giuliani@xxxxxxxxxxxxxx

>From owner-netcdfgroup@xxxxxxxxxxxxxxxx Fri Jul 19 10:12:3 2002 +0800
Date: Fri, 19 Jul 2002 10:12:3 +0800
From: "J.G.Xiong" <xjg@xxxxxxxxxx>
To: "netcdfgroup@xxxxxxxxxxxxxxxx" <netcdfgroup@xxxxxxxxxxxxxxxx>
Subject: 
Received: (from majordo@localhost)
        by unidata.ucar.edu (UCAR/Unidata) id g6J2CPA14440
        for netcdfgroup-out; Thu, 18 Jul 2002 20:12:25 -0600 (MDT)
Organization: UCAR/Unidata
Keywords: 200207190212.g6J2CE914435
Message-Id: <200207190155.JAA22481@xxxxxxxxxx>
X-mailer: Foxmail 4.1 [cn]
Mime-Version: 1.0
Content-Type: text/plain;
      charset="GB2312"
Content-Transfer-Encoding: 7bit
Sender: owner-netcdfgroup@xxxxxxxxxxxxxxxx
Precedence: bulk
Reply-To: "J.G.Xiong" <xjg@xxxxxxxxxx>

Dear all,

How to ask question here? Who can help to me to install netcdf under linux? I 
will send email with attachment.

Best Regard

J.G Xiong
----------------------------------------------------

======= 2002-07-16 21:25:00 ======

>ncdigest            Tuesday, July 16 2002            Volume 01 : Number 647
>
>
>
>Today's Topics:
>Problem with ncgen and/or ncdump
>
>----------------------------------------------------------------------
>
>Date: Tue, 16 Jul 2002 11:57:19 -0700
>From: "Koontz, Annette S" <Annette.Koontz@xxxxxxx>
>Subject: Problem with ncgen and/or ncdump
>
>This message is in MIME format. Since your mail reader does not understand
>this format, some or all of this message may not be legible.
>
>- --------------InterScan_NT_MIME_Boundary
>Content-Type: multipart/alternative;
>       boundary="----_=_NextPart_001_01C22CFA.9C4E52A0"
>
>- ------_=_NextPart_001_01C22CFA.9C4E52A0
>Content-Type: text/plain
>
>Hello,
>
>I've run into a problem with ncgen/ncdump that perhaps someone can help me
>with.
>
>I'm running ncgen to create a netCDF file:
>
>    ncgen -b -o somefile someinput
>
>The "someinput" file contains text like this:
>
>         float liq(time) ; 
>                liq:long_name = "Total liquid water along LOS path" ; 
>                liq:units = "cm" ; 
>                liq:resolution = 0.0001f ; 
>                liq:missing_value = -9999.f ; 
>
>Ncgen works just fine, and when I run
>
>       ncdump somefile
>
>I see:
>
>        float liq(time) ;
>                liq:long_name = "Total liquid water along LOS path" ;
>                liq:units = "cm" ;
>                liq:resolution = 9.9999997e-05f ;
>                liq:missing_value = -9999.f ;
>                liq:uncertainty = "+/- 0.002 cm" ;
>
>Note that the "resolution" attribute has been changed. It has essentially
>the same value as the "someinput" information, but it is not as easy to
>read.
>
>My questions:
>
>1) Is there any way to "force" ncgen and/or ncdump to display the attribute
>info as I want it to?
>2) Is there a better way to define the "resolution" attribute in the first
>place?
>
>Any help will be appreciated. Interestingly enough, this does not always
>happen.  (This corruption -- if you can call it that -- of the resolution
>attribute on one system that I have access to.)
>
>
>
>
>
>
>- ------_=_NextPart_001_01C22CFA.9C4E52A0
>Content-Type: text/html
>Content-Transfer-Encoding: quoted-printable
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
><HTML>
><HEAD>
><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html;
>charset=3Dus-ascii">
><META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version
>5.5.2654.45">
><TITLE>Problem with ncgen and/or ncdump</TITLE>
></HEAD>
><BODY>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">Hello,</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">I've run into a problem with
>ncgen/ncdump that perhaps someone can help me with.</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">I'm running ncgen to create a netCDF
>file:</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; ncgen -b -o
>somefile someinput</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">The &quot;someinput&quot; file
>contains text like this:</FONT>
></P>
>
><P><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float
>liq(time) ; </FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:long_name =3D &quot;Total liquid
>water along LOS path&quot; ; </FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:units =3D &quot;cm&quot; ;
></FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:resolution =3D 0.0001f ; </FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:missing_value =3D -9999.f ;
></FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">Ncgen works just fine, and when I
>run</FONT>
></P>
>
><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2
>FACE=3D"Arial">ncdump somefile</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">I see:</FONT>
></P>
>
><P><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float
>liq(time) ;</FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:long_name =3D &quot;Total liquid
>water along LOS path&quot; ;</FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:units =3D &quot;cm&quot; ;</FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:resolution =3D 9.9999997e-05f
>;</FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:missing_value =3D -9999.f
>;</FONT>
><BR><FONT SIZE=3D2
>FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
>sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; liq:uncertainty =3D &quot;+/- 0.002
>cm&quot; ;</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">Note that the &quot;resolution&quot;
>attribute has been changed. It has essentially the same value as the
>&quot;someinput&quot; information, but it is not as easy to
>read.</FONT></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">My questions:</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">1) Is there any way to
>&quot;force&quot; ncgen and/or ncdump to display the attribute info as
>I want it to?</FONT>
><BR><FONT SIZE=3D2 FACE=3D"Arial">2) Is there a better way to define
>the &quot;resolution&quot; attribute in the first place?</FONT>
></P>
>
><P><FONT SIZE=3D2 FACE=3D"Arial">Any help will be appreciated.
>Interestingly enough, this does not always happen.&nbsp; (This
>corruption -- if you can call it that -- of the resolution attribute on
>one system that I have access to.)</FONT></P>
><BR>
><BR>
><BR>
><BR>
>
></BODY>
></HTML>
>- ------_=_NextPart_001_01C22CFA.9C4E52A0--
>
>- --------------InterScan_NT_MIME_Boundary--
>
>------------------------------
>
>End of ncdigest V1 #647
>***********************

= = = = = = = = = = = = = = = = = = 




  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: