[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: netcdf and multiarray directories in Netcdf ver 2 .vs. Ver 1



>To: address@hidden
>From: "Plonski, Michael" <address@hidden>
>Subject: Re: 20010915: netcdf and multiarray directories in Netcdf ver 2  .vs. 
>Ver 1
>Keywords: editing attributes

Mike,

You wrote:

> ...  Do you know of any application that easily lets you add /
> delete attributes from a netCDF file.  I saw this question posted in
> the newsgroup and I think the advice was to just use the read
> routine and write routine to make something that could add and
> delete values.

The NCO package, freely available from 

 http://nco.sourceforge.net/nco.html

includes the ncatted netCDF Attribute Editor, described here:

 http://nco.sourceforge.net/nco.html#SEC44

which can be used to delete, add, and edit netCDF attributes from the
command line.

Also, if the netCDF file was originally created with extra space in
the header, using nc__create() rather than nc_create() for example,
then attributes can be added efficiently in the reserved space.
However if there's not enough space in the header, adding an attribute
will result in copying the file.  Deleting an attribute can be done
efficiently in the C interface with an nc_del_att() call, and the
deleted space is available for use in adding subsequent attributes
efficiently.  I don't think either Java interface supports the "delete
attribute" operation, however.

--Russ