NetCDF4 files are actually stored in HDF5 format ( http://www.unidata.ucar.edu/publications/factsheets/current/factsheet_netcdf.pdf ), however they use netCDF4 conventions for attributes, sizes, etc. Files are self-describing, which is a big plus. HDF5 without netCDF4 allows you much more freedom in defining your data. Is there a specific reason why you would like to use HDF5 instead of netCDF4?
I would say that if you do not have any specific restrictions (for example, models or visualization software that are found on netCDF4 files), you would be better off using netCDF. netCDF4 can be used by NCO / CDO, ncl (ncl also accepts HDF5), idl, python netCDF4 module, ferret, etc. Personally, I think netCDF4 is very convenient for storing climate or meteorological data. There are many operators for this, and you do not need to worry about developing a standard for your own data - this is already done for you. CMOR ( http://cmip-pcmdi.llnl.gov/cmip5/output_req.html ) can be used to write CF-compatible data. It was used for the most recent climate model assessment project.
HDF5, on the other hand, may be worth it if you have a different data type and you are looking for some very specific functions for which you need a more customizable file format. Could you clarify your needs for comments?
Update:
Unfortunately, the standards for variable and field names are a little less clear and well organized for HDF5 files than netCDF, as it was the format of choice for large climate modeling projects such as CMIP or CORDEX. The problem essentially melts in the use of the EOSDIS or CF conventions, but finding the currently supported librairies that implement these standards for HDF5 files and having clear documentation is not quite easy (if you probably wouldnβt ask a question).
If you really need a standard, NASA explains here all the possible metadata standards: http://gcmd.nasa.gov/add/standards/index.html .
For information, HDF-EOS and HDF5 do not have the exact same format (HDF-EOS already contains cartographic data and is standardized for earth science data), so I donβt know if this format will be too restrictive for you. Tools for working with this format are described here: http://hdfeos.net/software/tool.php and summarized here http://hdfeos.org/help/reference/HTIC_Brochure_Examples.pdf .
If you still prefer to use HDF5, the best option is probably to download an HDF5 file from NASA to get similar data and use it as the basis for creating your own tools in your language of choice. Here is a list of detailed examples using the HDF5, HDF4, and HDF-EOS formats with scripts for processing and visualizing data in Python, MATLAB, IDL, and NCL: http://hdfeos.net/zoo/index_openLAADS_Examples.php#MODIS
Essentially, the problem is that NASA provides affordable tools so that you can work with your data, but it is not necessary that you can re-create similar structures in your own laboratory.
Here are some more specifications / information about hdf5 for NASA Earth data: MERRA Product https://gmao.gsfc.nasa.gov/products/documents/MERRA_File_Specification.pdf GRADS HDF5 compatible information http: //disc.sci. gsfc.nasa.gov/recipes/?q=recipes/How-to-Read-Data-in-HDF-5-Format-with-GrADS HDF data processing tools in NASA Atmospheric Science Data Center: https: //eosweb.larc .nasa.gov / HBDOCS / hdf_data_manipulation.html
Hope this helps a bit.