Re: how to append data into one NetCDF file

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 20 Apr 2009 09:17:51 -0600 (MDT)

Andrea is correct, NCO might be better here.

We have some old, but potentially useful slides on NCO:

    http://www.ncl.ucar.edu/Training/Workshops/PPTS/nco.pdf

--Mary

On Sat, 18 Apr 2009, Hahmann, Andrea N. wrote:

> Dear Xuquang
>
> There are better tools than ncl out there to do what you want to do.
> The package nco (http://nco.sourceforge.net/) is designed to operate on netcdf files with a simple command line.
>
> Regards,
> Andrea
>
> Andrea Hahmann, PhD.
> Senior Scientist
> Phone direct +45 4677 5471
> andrea.n.hahmann_at_risoe.dk
>
> Wind Energy Department
> Risø National Laboratory for Sustainable Energy
> Technical University of Denmark
> Building 118, P.O. Box 49
> DK-4000 Roskilde, Denmark
> Tel +45 4677 4677
> Fax +45 4677 5083
>
> -----Original Message-----
> From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf Of Xuguang Sun
> Sent: Saturday, April 18, 2009 5:45 PM
> To: ncl-talk_at_ucar.edu
> Subject: how to append data into one NetCDF file
>
>
> Dear everyone,
>
> I've a list of NetCDF format files, like,
>
> 1948-01.nc
> 1948-02.nc
> 1948-03.nc
> ...
>
> and I'd like to combine these data files into one NetCDF format file. I do know that I could solve this problem by using
>
> fns = systemfunc("ls 19??-??.nc")
> in = addfiles(fns,"r") ; open netcdf file
> ListSetType(in,"cat")
> ...
>
> However, if I'd like to open one NetCDF data file, and write it into one file, and then open another NetCDF data file, and write it into the same file, ..., all the above processes are repeated until all the nc files are opened and the data are writted into the same data file. I checked that the addfile function only has three options to open one file, "r", "w", "c", and there is no append option, so I'm wondering how to solve this problem by the above method. And at the same time, is there anybody like to explain the usage of "w" option? Thanks in advance.
>
>
> SUN Xuguang
>
> School of Atmospheric Sciences, Nanjing University
> 22 Hankou Road, Nanjing 210093
> China
> Tel: +86-025-83597203 (O)
> Email: sunxg007_at_yahoo.com.cn
>
>
> ___________________________________________________________
> 好玩贺卡等你发,邮箱贺卡全新上线!
> http://card.mail.cn.yahoo.com/
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 20 2009 - 09:17:51 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 20 2009 - 09:36:23 MDT