- To: netcdf-java@xxxxxxxxxxxxxxxx
- Subject: [netcdf-java] GridCoordSys introduces rounding error when converting from km to m and integer axis-type
- From: Heiko Klein <Heiko.Klein@xxxxxx>
- Date: Mon, 24 Aug 2009 15:15:14 +0200
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, -3707991The 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
- Follow-Ups: