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.
Bob, I wrote: > To get its type, use > > ncvar.getComponentType() > > which returns a Class whose toString() method can be used for the type > string. Oops, that should have been ncvar.getElementType() > This is all done in a private method in the source for > ucar.nc2.Variable: I should have instead pointed to: private void getFullName(StringBuffer buf) { buf.append(getElementType()); buf.append(" "); buf.append(getName()); if (getRank() > 0) buf.append("("); for (int i=0; i<dimensions.size(); i++) { Dimension myd = (Dimension) dimensions.get(i); if (i!=0) buf.append(", "); buf.append( myd.getName() ); } if (getRank() > 0) buf.append(")"); buf.append(";"); } --Russ