Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Sachim: Im trying to understand this problem. How did you decide that "47865.79166666651" was the correct value of the time? Sachin Kumar Bhate wrote:
John,The NcML file shown below attempts to aggregate time series files, overridingthe time values for each 'time' variable. The aggregation works great and I can access the time values as well,but I see that there is loss of precision in the new time values, when I accessvalues for a coordinate data variable. For example: <<<<URI = 'http://www.gri.msstate.edu/rsearch_data/nopp/test_agg_precision.ncml';String var="T_20"; GridDataset gid = GridDataset.open(URI); GeoGrid Grid = gid.findGridByName(var); GridCoordSys GridCoordS = (GridCoordSys) Grid.getCoordinateSystem();java.util.Date d[] = GridCoordS.getTimeDates();System.out.println("DateString: "+d[0].toGMTString()); >>>>>The output from the above code for the 1st time value in the java Date array.DateString: 5 Dec 1989 18:59:59 GMT But, the correct value should be DateString: 5 Dec 1989 19:00:00 GMTJust out of curiosity I tried to print the 1st time value being read from the NcML,by 'ucar.nc2.ncml.NcmlReader.readValues()'. I get, Start = 47865.79166666651; (Parsed as double) but, the 1st start value specified in NcML is '47865.7916666665110000'.Don't care about the tailing '0s', but the digit '1' in the 12th decimal place is being dropped and may be causing thisproblem. Although, parsing it as a 'BigDecimal' does read in the correct value. Start-BigDecimal: 47865.7916666665110000I am just guessing here, I am not sure if this is what causing the precision problem.Will appreciate your help. thanks.. Sachin
netcdf-java
archives: