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

Re: question about output from ncdump -p option



Hi Janeen,

> I don't understand the output I'm getting for a float variable when I 
> use the -p option of the ncdump command. 
> For example here is a file where I specified precision of the ncdump 
> utility as -p 4,7:
> 
> // Chl_ctrl(6, 0-95)
>    0.006179, 0.005789, 0.002502, 0.002943, 0.003311, 0.003856, 0.006481,
>    0.01431, 0.02607, 0.06223, 0.08741, 0.08848, 0.09337, 0.08391, 0.06148,
>    0.03593, 0.03441, 0.06112, 0.08778, 0.06033, 0.05429, 0.05096, 0.0419,
>   ...
> Based on the documentation for the ncdump command's -p option I expected 
> to see decimals places of  4 or less, yet I'm getting 6.   Here is same 
> variable  with precision set at -p 2,2
> 
> // Chl_ctrl(6, 0-95)
>    0.0062, 0.0058, 0.0025, 0.0029, 0.0033, 0.0039, 0.0065, 0.014, 0.026,
>   ...
> I expected to see decimal values of no more than 2 places, yet I'm 
> getting up to 4.   Can anyone explain how to interpret what the ncdump 
> utility is giving me?   I should mention that I'm also using the -b c 
> option in the same command.
> 
> Any comments would be most appreciated.

The "-p" option to ncdump specifies the number of significant digits
of precision rather than the number of digits after the decimal
point.

--Russ

_____________________________________________________________________

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