Hi Marc That's a workaround I can use. Thanks. I'm a newbie regarding netCDF data. Is there any information I'm losing when switching between the packages?
Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 15:13 An: Felber Raphael Agroscope <raphael.fel...@agroscope.admin.ch> Betreff: Re: AW: [R] Remove attribute from netcdf4 object ok. Sorry, I didn't understood good. I don't think you can do it in ncdf4 functions. The only solution would be to open it in RNetCDF, delete the attribute, save it and then open it in ncdf4. Marc Le 02/08/2017 à 15:02, raphael.fel...@agroscope.admin.ch<mailto:raphael.fel...@agroscope.admin.ch> a écrit : Dear Marc Thanks for your remark. I don't want to use both packages. I mentioned the package RNetCDF to show that there is a similar function I' d like to use. Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 14:51 An: Felber Raphael Agroscope <raphael.fel...@agroscope.admin.ch><mailto:raphael.fel...@agroscope.admin.ch>; r-help@r-project.org<mailto:r-help@r-project.org> Betreff: Re: [R] Remove attribute from netcdf4 object Le 02/08/2017 à 12:03, raphael.fel...@agroscope.admin.ch<mailto:raphael.fel...@agroscope.admin.ch> a écrit : 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 You should use package ncdf4 or package RNetCDF, but not mixed both. Marc 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.fel...@agroscope.admin.ch<mailto:raphael.fel...@agroscope.admin.ch><mailto:raphael.fel...@agroscope.admin.ch><mailto:raphael.fel...@agroscope.admin.ch> www.agroscope.ch<http://www.agroscope.ch><http://www.agroscope.ch/><http://www.agroscope.ch/> [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org<mailto:R-help@r-project.org> mailing list -- To UNSUBSCRIBE and more, see 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. -- __________________________________________________________ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1 (0)1.69.15.72.30 Fax: 33 1 (0)1.69.15.73.53 e-mail: marc.giron...@u-psud.fr<mailto:marc.giron...@u-psud.fr> Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html Skype: girondot -- __________________________________________________________ Marc Girondot, Pr Laboratoire Ecologie, Systématique et Evolution Equipe de Conservation des Populations et des Communautés CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079 Bâtiment 362 91405 Orsay Cedex, France Tel: 33 1 (0)1.69.15.72.30 Fax: 33 1 (0)1.69.15.73.53 e-mail: marc.giron...@u-psud.fr<mailto:marc.giron...@u-psud.fr> Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html Skype: girondot [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.