Hello
I see Adam replied ... I had already started this ... so
ncl_filedump will produce one netCDF for on Grib file.
[1]
The most commonly used tool for concatenating files would be the
'ncrcat' command operator which is part of the netCDF Operators [NCO].
I would speculate that the NCO are on your systems as they are commonly
used.
http://nco.sourceforge.net/
[2]
Assuming you have NCL 5.1.0 [latest release], you could also perfor the
following
Let's say your grib files begin with "FOO....."
diri = "./" ; whatever the input directory is
filg = systemfunc("cd "+diri+" ; ls FOO")
print(filg)
nfil = dimsizes(filg)
f = addfiles (filg, "r")
ListSetType (f, "cat") ; concatenate (=default)
slp = f[:]->slp_grib
printVarSummary (slp)
diro = "./" ; whatever
filo = "SLP_GRIB.nc:
system("/bin/rm -f "+diro+filo)
fnc = addfile (diro+filo, "c")
fnc-> SLP = slp
http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml
f = *addfiles* (fils, "r")
*ListSetType* <http://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml> (f, "cat") ; concatenate (=default)
T = f[:]->T ; read T from all files
*printVarSummary* <http://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml> (T)
Owen Doherty wrote:
> Dear NCL Talk Community,
>
> I am new to the community, and was unable to find an answer to this
> question in the archives. I have a series of GRIB annual files, each of
> which contains monthly mean SLP fields for each month. It is my
> intention to build a single .nc file from this series GRIB files. It
> appears that "ncl_convert2nc" will produce a series of .nc files, but is
> there an option to produce a single .nc file? Or would I need to first
> convert the files to nc and find another function to concatenate the .nc
> files (suggestions for such a function would be very welcome)?
>
> Thanks in advance for your help in this. Apologies if this question has
> already been addresses and I cannot find the resolution to it.
>
> Warm Regards,
>
> Owen Doherty
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 30 2009 - 13:03:24 MDT
This archive was generated by hypermail 2.2.0 : Mon Apr 06 2009 - 14:56:31 MDT