Hello,

I use ncdf4 and ncdf4.helpers packages to get wind data from ncep/ncar 
reanalysis ncetcdf files. But data is in the form of (9.199998, 8.799998, 
7.999998, 3.099998, -6.8000018, …). I’m aware of precision and 
least_significant_digit attributes of ncdf4 object [1]. For uwnd data, 
precision = 2 and least_significant_digits = 1. My doubt is that should I round 
data to 2 decimal places or 1 decimal place after decimal point?

Same issue is valid for some header info.

Output of ncdf4 object:


Output of ncdump on terminal:


for instance, ncdump's scale factor is 0.01f but ncdf4 object’s scale_factor is 
0.00999999977648258. You can notice same issue for actual_range and add_offset. 
Also a similar issue exist for the data. How can I truncate those extra 
unsignificant decimal places or round the numbers to significant decimal places?

1 - 
http://www.esrl.noaa.gov/psd/data/gridded/conventions/cdc_netcdf_standard.shtml 
<http://www.esrl.noaa.gov/psd/data/gridded/conventions/cdc_netcdf_standard.shtml>
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to