Recommendation:

We recommend using standardized file name extensions for HDF5 and netCDF files, as follows:

  • .h5 for files created with the HDF5 API;
  • .nc for files created with the netCDF API; and
  • .he5 for files created with the HDF-EOS5 API.

Recommendation Details: File name extensions are a traditional piece of metadata used to infer properties of the file's content or its planned use. HDF5 files can be created with several APIs (libraries) which provide different interface levels to their native data structures. Therefore, it is beneficial to know beforehand with which HDF5 API to open files. On the other hand, the netCDF API took a different approach and offers the same interface for its supported storage file formats. Regardless of the recommended file name extensions, software developers are cautioned to not blindly trust the file extension and implement a heuristic process for determining whether the file meets software's expectations. Software tools should fail gracefully with a meaningful error message when the file type does not match the filename extension.