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.
>From: David Hahn <address@hidden> >Subject: NetCDF for Java >Organization: . >Keywords: 199907222040.OAA02075 Hi David, > I am having a problem with the NetCDF for Java. I have compiled a > program that creates a NetCDF file. It runs fine on my Linux > platform, but when I run it on another machine (which I believe is > an SGI, but definetly not Linux), it leaves all the values in the > NetCDF file blank. The CDF file is there; the header looks good, > all the variables and attributes are there, just the values are > missing. > > Any ideas? Just a guess, but maybe you haven't called the close() method of the NetcdfFile class, to flush the buffers and write the data. I'm not sure why this would work differently on Linux than SGI, but you must always call the close() method to make sure the data gets written. If that's not it, then it would help if you could send us a small example that works on one platform and not the other, as well as information about what versions of Java compilers and virtual machines you are using on what versions of the platforms. To fix the problem, we would need to be able to duplicate it here. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu