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 Fan! > Hi. > > I am looking for an easy way to translate netcdf data between .nc/.cdl > and .ncml. I'm not sure I understand the question correctly, but are you trying to make an NCML representation of the metadata in a netCDF file? If so, toolsUI is your tool :-) However, it gets better! You can use the netCDF Java library from the command line to write out the NCML file for you, like so: java -classpath toolsUI.jar ucar.nc2.NCdump <NetCDF-3 filename> -ncml or, if you have the netCDF C library installed, go for: ncdump -x <NetCDF filename> Check out http://www.unidata.ucar.edu/software/netcdf/ncml/ for more info, including all the fun ways you can use NCML in enhance the metadata within a netCDF file. Now, if this is not all what you were looking for, them I apologize for missing the boat. Please let me know if this answers your question! Cheers! Sean > I thought such tools might have existed already so without > writing new Java classes, I wonder if I can use things like toolsUI in > the command line for such purposes. Any other tools that can serve? > > Thanks. > > -Fan > > Ticket Details =================== Ticket ID: RUP-211659 Department: Support netCDF Java Priority: High Status: Open