Hi Dave, Many thanks for you prompt and useful reply. It worked a treat!
Another question which you might be able to answer is, is it possible to set the order of the variables attributes in which they appear? For example, I would like to set the order of Example 2 to Example 1: Example 1: double lon(lon) ; lon:long_name = "longitude" ; lon:standard_name = "longitude" ; lon:units = "degrees_east" ; lon:axis = "X" ; Example 2: double lon(lon) ; lon:units = "degrees_east" ; lon:long_name = "longitude" ; lon:standard_name = "longitude" ; lon:axis = "X" ; Many thanks, Ross -- View this message in context: http://r.789695.n4.nabble.com/Editing-the-variables-attributes-section-in-the-netCDF-header-of-netCDF-files-created-using-the-pack-tp3797349p3802927.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.