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.
>To: address@hidden >From: Stacy Brodzik <address@hidden> >Subject: netcdf to hdf conversion >Organization: UCAR/Unidata >Keywords: 200108172249.f7HMnl122912 Hi Stacy, > I'm currently trying to convert some data from netcdf format to hdf format. > The data files are not very large and contain the normal self-descriptive > stuff and single 150x150 arrays. > > I can read in netcdf files using IDL but have no idea how to write out the > same files in hdf format. I don't even know if that's possible using IDL. > > Any ideas?? I don't know if it's possible using IDL, either. To find out, you may have to ask IDL support. And it's not clear from the above whether you want to convert to HDF4 or HDF5, which are different formats. This used to be a link to a utility program that does this sort of conversion, but the link no longer works for me: http://ioc.unesco.org/iodekit/website/module2/toolbox/netcdfhdf.htm There's an executable in http://www.aodc.gov.au/IODE/RK/M3/Converters/NetCDF2HDF/_vti_cnf/ that may be usable on Windows systems, but I don't know anything else about it. The document http://ioc.unesco.org/oceanteacher/resourcekit/M3/Toolbox/HDFViewer.htm http://ioc.unesco.org/oceanteacher/resourcekit/M3/Converters..htm refer to a NetCDF2HDF conversion program. Another possibility is lats4d, described here: http://dao.gsfc.nasa.gov/grads_listserv/msg01894.html (Apparently the dao.gsfc.nasa.gov server is currently down, so I can't check this ...) There's also an experimental approach translating netCDF to HDF5 by using XML as an intermediate representation, described here: http://hdf.ncsa.uiuc.edu/HDF5/XML/nctoh5/writeup.htm Finally, DODS http://www.unidata.ucar.edu/packages/dods/ supports an HDF interface that can read some netCDF files, but the netCDF files would have to be made available by a DODS server: If none of these work for you, you may have to write a program that reads your data using a netCDF interface and writes it out using an HDF interface. --Russ