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: Robert VINCENT <address@hidden> >Subject: From NetCDF 3.5 to HDF5 >Organization: UCAR/Unidata >Keywords: 200304231819.h3NIJM7U024784 Hi Bert, > I'm in the process of extending some code to support HDF5 as well as > NetCDF. Are there any notes you've created to address generic issues that > may arise in this conversion? No, sorry. We're about to embark on a two-year project providing an extended netCDF-4 interface over the HDF5 file format, but I don't think there's anything in the proposed work that would help you now. > I'm especially concerned about converting code that uses "ncvarputg", > "nc_put_varm", or other functions that can specify a NetCDF "imap". Is > there any equivalent in HDF5 that you know of? No, but I don't think that should be of much concern, unless you actually have users using ncvarputg or nc_put_varm functions. In my opinion, these interfaces were an example of over-generalizing the interface. The extra generality they support is rarely used or needed. When we wrote a Java interface, we didn't bother trying to provide similar functionality, because we couldn't provide any non-contrived examples where it would be useful. Similarly, I didn't include analogous "mapped" interfaces for the C++ netCDF interface, but no one has ever missed them or asked for them. It would be possible to implement this kind of interface on top of HDF5 with wrappers that used loops to access the individual elements and reorder them, but HDF5's struct accesses are a simpler and more useful generalization, in my opinion. If you know of any practical uses of the ncvarputg or nc_put_varm type interfaces, I'd be interested in hearing about them. We've answered thousands of netCDF support questions, but probably only a handful have dealt with any of those interfaces, and we usually recommended simpler ways to accomplish the task. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://my.unidata.ucar.edu