This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Gordon, > From: Gordon Maclean <address@hidden> > Subject: bug in java AbstractArray.setDouble > Organization: National Center for Atmospheric Research > Keywords: 200010022324.e92NOgb18003 Java netCDF The above message contained the following: > There is a error in AbstractArray.setDouble: > > > public void > setDouble(int [] index, double value) > throws IOException > { > set(index, new Float(value)); > ^^^^^ > } > > As a result, doubles are converted to floats, then back to > doubles before being written to the netcdf file. I could not find the class "AbstractArray" in our Java netCDF package. I did, however, find the above code in the class "ucar.multiarray.AbstractAccessor" and made the change you suggested. Thanks for reporting this. > ***************************************************** > Gordon Maclean, Software Engineer, 303 497-8794 > Nat'l Center for Atmospheric Research, Boulder CO USA > ***************************************************** Regards, Steve Emmerson <http://www.unidata.ucar.edu>