[R] Remove attribute from netcdf4 object

raphael.felber at agroscope.admin.ch raphael.felber at agroscope.admin.ch
Wed Aug 2 12:03:20 CEST 2017


Dear all

For a model I need to combine several netCDF files into one (which works fine). For better overview I'd like to delete/remove some of the attributes. Is there a simple way doing this?

I'm using the package netcdf4, which creates an object of class(nc) = "ncdf4". It seems that for earlier versions of netcdf objects, there was the function att.delete.nc{RNetCDF}. But this functions returns the following error, when applied to ncdf4-classes:
Error: class(ncfile) == "NetCDF" is not TRUE

Thanks a lot for any help.

Kind regards

Raphael Felber

------------------------------------------------------------------------------------
Raphael Felber, Dr. sc.
Wissenschaftlicher Mitarbeiter, Klima und Lufthygiene

Eidgenössisches Departement für
Wirtschaft, Bildung und Forschung WBF
Agroscope
Forschungsbereich Agrarökologie und Umwelt

Reckenholzstrasse 191, 8046 Zürich
Tel. 058 468 75 11
Fax 058 468 72 01
raphael.felber at agroscope.admin.ch<mailto:raphael.felber at agroscope.admin.ch>
www.agroscope.ch<http://www.agroscope.ch/>


	[[alternative HTML version deleted]]



More information about the R-help mailing list