[R] Editing the variables attributes section in the netCDF header of netCDF files created using the package ncdf.

David William Pierce dpierce at ucsd.edu
Sat Sep 10 16:48:38 CEST 2011


On Fri, Sep 9, 2011 at 3:18 PM, RMaidment
<r.i.maidment at pgr.reading.ac.uk> wrote:

> 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? [...]

Hi Ross,

The ncdf package makes the units and longname attributes
automatically, so those will always be the first and second
attributes, and the ones you add using att.put.ncdf will follow later
in the order of your att.put.ncdf calls. So no, there is no way of
arranging them all in arbitrary order.

I would personally consider any software that cares about the order of
the attributes to be non-compliant with netCDF standards, but perhaps
there is some software out there that does care about the order
anyway.

Regards,

--Dave

-- 
David W. Pierce
Division of Climate, Atmospheric Science, and Physical Oceanography
Scripps Institution of Oceanography
(858) 534-8276 (voice)  /  (858) 534-8561 (fax)    dpierce at ucsd.edu



More information about the R-help mailing list