NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[netcdf-java] GridCoordSys introduces rounding error when converting from km to m and integer axis-type

The class ucar.nc2.dt.grid.GridCoordSys converts internally all projection-axes to km. But it seems like it does not convert the datatype to a float or double datatype and introduces therefore large rounding errors.

I have given my axes as m (in integer):
-3716017, -3712004, -3707991

The isRegular function of Coordinate1D sees (with a debugger attched) the values:
-3716, -3712, -3707
and as such fails with my approx. 4km grid-distance.



Best regards,

Heiko


--
Dr. Heiko Klein                              Tel. + 47 22 96 32 58
Development Section / IT Department          Fax. + 47 22 69 63 55
Norwegian Meteorological Institute           http://www.met.no
P.O. Box 43 Blindern  0313 Oslo NORWAY



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