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.
Greetings Annie, You can use netCDF-Java to dump out an xml representation of the metadata in NcML. If you have the toolsUI jar (or netcdfAll), you can do the following to see an example: java -classpath toolsUI.jar ucar.nc2.NCdumpW /path/to/file -ncml If you would like output that more closely matches that of ncdump from the C netcdf library, simply omit the -ncml flag. If either of these looks good, then you can use the ucar.nc2.NCdumpW class. See the NCdumpW javadoc here: http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/v4.3/javadocAll/ucar/nc2/NCdumpW.html Cheers! Sean > Annie, > > We'll give you a more complete answer on Monday. IDV staff is on Spring Break. > > In the meantime please peruse: > > http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/documentation.htm > > You can probably find examples of what you are trying to achieve therein. > > Best, > > Unidata IDV Support > > > > Greetings, > > > > My name is Annie Burgess, I'm working on an open source project to extract > > the metadata from netcdf files. I've been using IDV to explore several > > NetCDF datasets and thought I might ask if someone at Unidata could point > > me to the java code that extracts the metadata from a NetCDF file, as it > > does under Data/Edit/Properties/Metadata (example attached). I assume this > > metadata code is hidden in one of the IDV .jar files - I've just had no > > luck finding it! > > > > I appreciate any insight you can give. > > > > Best, , > > Annie > > > > -- > > ------------------------------------------------------------------------------------------ > > Ann Bryant Burgess PhD > > > > NASA/JPL Alaska Science Center > > Pasadena, CA USGS, Anchorage, AK > > > > Cell: (585) 7*38-7549* > > Office: (907) 786 - 7059 > > Fax: (907) 786-7150 > > E-mail: address@hidden > > 4210 University Dr., Anchorage, AK 99508-4626 > > ------------------------------------------------------------------------------------------- > > > > Ticket Details =================== Ticket ID: JKM-822210 Department: Support IDV Priority: Normal Status: Open