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.
> I am having some minor difficulties implementing the latest > patches to Java netCDF. > > I have a netCDF version, dated 1998/06/03, which differs slightly > from your 1998/04/19 version 1.4. I tried searching for 1.4 at the > Unidata web site, but all I could find was a January version. I think you may be confusing releases with RCS file versions, but I'm not sure. Here our RCS version history of the file NetcdfFile.java ---------------------------- revision 1.5 date: 1998/07/16 01:09:05; author: davis; state: Exp; lines: +15 -7 NC_CHAR support ---------------------------- revision 1.4 date: 1998/04/19 21:19:53; author: davis; state: Exp; lines: +49 -1 Added toArray(), toArray(Object, int [], int []) ---------------------------- revision 1.3 date: 1998/02/13 00:53:12; author: davis; state: Exp; lines: +2 -2 Make initHashtable() optional in construction, available to do in subclass. ---------------------------- revision 1.2 date: 1998/01/23 02:01:35; author: davis; state: Exp; lines: +4 -44 InternalError() -> Error() OffsetIndexIterator to package MultiArray ---------------------------- revision 1.1 date: 1998/01/10 03:19:10; author: davis; state: Exp; branches: 1.1.1; Initial revision ---------------------------- So, the _file_ for RCS version in use on 1998/06/03 should have been 1.4. Perhaps you checked it in locally and that changed the RCS header. That would lead to slight differences. The 'patch' program should be able to deal with that. It will just not change ("reject") the rcsid section. If you have trouble, I can send the whole file. > Also, in integrating your patches with my version of the netCDF it > wasn't clear what method would return the character array (getChar > returns a single character ?!). The 'copyout()' method, documented in the multiarray.Accessor interface, is most like the the C/FORTRAN get method you are used to. The result is an instance of MultiArrayImpl, which has a 'toArray()' method to convert it to a java language array. I'm working on a MultiArray adapter class that takes a MultiArray of type Character and serves it up as a MultiArray of type String which has one less dimension. -glenn