NetCDF4 uses a subset of HDF5 features, and adds some new features. NetCDF4 reads/writes specially structured HDF5 files. Performance of HDF5 and NetCDF4 is highly similar including on supercomputers. The main idea behind NetCDF4 is a simpler API than HDF5, while maintaining the same performance.
Python h5py makes HDF5 read/write very easy. NetCDF4 is a little more complicated to use from Python.
HDF5 from low-level languages such as C, C++ and Fortran is a little elaborate as compared to NetCDF4 ease of use. Using HDF or NetCDF4 from Python is easier as these examples collapse down to a couple lines of code.