[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #JKM-822210]: metadata extraction



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