How do you add CF (Climate and Forecast) attributes to a file?
Climate and forecast (CF) conventions are metadata conventions for earth science data. The conventions define metadata included in the same file as the data, that provide a definitive description of what the data in each variable represents, and of the spatial and temporal properties of the data.
The attached examples show how to add CF attributes to an HDF5 file using HDF5, netCDF4, HDF-EOS5 and the HDF5 Dimension Scale API. The example code shows how to use each of these libraries to produce similar output files. The CF attributes that are used are units, _Fillvalue, long_name, and coordinates. For more details see the documentation provided with the examples.