How can I create a CF compliant netCDF file?
So far this has been the most suitable answer to my question... 

NOAA's National Oceanographic Data Center has posted NetCDF Templates v1.0 the CDL templates on their web site. These can be used with netCDF Operator (NCO) commands to create Climate and Forecast (CF) compliant files. 

http://www.nodc.noaa.gov/data/formats/netcdf/ 
http://nco.sourceforge.net/ 
http://cf-convention.github.io/index.html