A custom attribute to identify netCDF4 files sounds perfectly reasonable as
an iteration on the netCDF4 spec.
But I'd like emphasize that it's important to continue to treat netCDF4 as
a specification rather than merely whatever libnetcdf knows how to read and
write. Doing so keeps you honest and forces more careful design.
My project h5netcdf (https://github.com/shoyer/h5netcdf) is one such
reimplementation of netCDF4 on top of an HDF5 API, which has exposed a
number of bugs and edge cases in the netCDF-C and Python netCDF4 libraries.
Cheers,
Stephan