SciTools/iris — pull request #711 by esc24 (2013-08-20 12:10:27+00:00)
Title: Modified attribute behaviour for netCDF save.

This PR modifies the treatment of cube attributes when saving to CF-netCDF. Currently cube attributes are saved as data variable attributes. However, this has the undesirable effect of routinely moving global CF attributes to data variable attributes when loading from, then saving to CF-netCDF. This PR modifies Iris so that it will save cube attributes as global, unless they are in a subset of CF-netCDF attributes that only apply to data variables (e.g. ```standard_error_multiplier```). When saving multiple cubes to a single file, only cube attributes that are common across the collection will be stored as global, the rest will be stored as data variable attributes (with warnings being issued when saving global-only or data variable-only attributes in the wrong place).