Re: can ncl merge two nc files into one nc fil

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon, 14 Sep 2009 12:20:03 -0600

Hi Amjad,

Unfortunately, the "cat" command cannot be used to merge multiple
NetCDF files, because NetCDF stores the metadata for its contents at
the beginning of a file. If 2 files are concatenated only the metadata
for the first file would ever be visible to any software, including
NCL, that relies on the NetCDF library to access data from NetCDF files.

In contrast, you can use "cat" to merge multiple GRIB files prior to
reading with NCL. This is because GRIB files are composed of
individual records, each of which contains all the information
required to decode itself.

That said, it would be nice if we could make it easier to create a
merged NetCDF file from multiple input files using NCL tools. Perhaps
we can look into supporting the "addfiles" interface in the
ncl_convert2nc script.

  -dave

On Sep 12, 2009, at 2:43 PM, Muhammad Amjad wrote:

> hi,
>
> use a linux command "cat" as cat file_one file_two > new_file
> and then use the NCL as we do for single file.
>
> Cheers,
> Amjad
>
> On Sat, Sep 12, 2009 at 11:00 PM, <ncl-talk-request_at_ucar.edu> wrote:
> Send ncl-talk mailing list submissions to
> ncl-talk_at_ucar.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> or, via email, send a message with subject or body 'help' to
> ncl-talk-request_at_ucar.edu
>
> You can reach the person managing the list at
> ncl-talk-owner_at_ucar.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ncl-talk digest..."
>
>
> Today's Topics:
>
> 1. can ncl merge two nc files into one nc file (yjxstsp2)
> 2. Re: can ncl merge two nc files into one nc file (Wei Huang)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 12 Sep 2009 16:52:49 +0800 (CST)
> From: yjxstsp2 <yjxstsp2_at_163.com>
> Subject: can ncl merge two nc files into one nc file
> To: ncl-talk <ncl-talk_at_ucar.edu>
> Message-ID:
> <27697616.580431252745569361.JavaMail.coremail_at_bj163app112.163.com
> >
> Content-Type: text/plain; charset="gbk"
>
> Dear all,
> I have two nc files, and I want to merge them into one. Is there
> any function of NCL to do it? Or is there any tool can do it?
> Hope to hear from you soon~~
> Best wishes
> Echo
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20090912/05dc4656/attachment.html
>
> ------------------------------
>
> Message: 2
> Date: Sat, 12 Sep 2009 08:14:16 -0600
> From: Wei Huang <huangwei_at_ucar.edu>
> Subject: Re: can ncl merge two nc files into one nc file
> To: yjxstsp2 <yjxstsp2_at_163.com>
> Cc: ncl-talk <ncl-talk_at_ucar.edu>
> Message-ID: <25C72E3B-9ECC-4BC7-8B8E-A6AF6BEF8CD5_at_ucar.edu>
> Content-Type: text/plain; charset="gb2312"
>
> It is probably easier to use NCO:
> http://nco.sourceforge.net/nco.html#ncecat
>
> You can also check URL
> http://www.ncl.ucar.edu/Applications/addfiles.shtml
> http://www.ncl.ucar.edu/Applications/o-netcdf.shtml
> to see how ncl read multiple files, and how ncl output nc files.
>
> You may check ncl mail archive:
> http://www.ncl.ucar.edu/Support/talk_archives/all/0137.html
> to find how people did in the past.
>
> Wei Huang
> huangwei_at_ucar.edu
> VETS/CISL
> National Center for Atmospheric Research
> P.O. Box 3000 (1850 Table Mesa Dr.)
> Boulder, CO 80307-3000 USA
> (303) 497-8924
>
>
> On Sep 12, 2009, at 2:52 AM, yjxstsp2 wrote:
>
> > Dear all,
> > I have two nc files, and I want to merge them into one. Is
> > there any function of NCL to do it? Or is there any tool can do it?
> > Hope to hear from you soon~~
> > Best wishes
> >
> Echo
> >
> >
> > "????",????60???
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20090912/4a98ab25/attachment.html
>
> ------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> End of ncl-talk Digest, Vol 70, Issue 31
> ****************************************
>
>
> _______________________________________________
> 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 Sep 14 2009 - 12:20:03 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 16:03:21 MDT