Re: problem when opening mixed GRIB-1 and GRIB-2 files

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 20 2014 - 11:15:55 MDT

Hi Balazs,

This is a known issue with NCL's GRIB reader. It currently cannot handle
these mixed GRIB 1 and 2 files. We have a ticket in place for this and we
do hope to solve it. If you want NCL to read the data in these files now
you will need to separately extract the GRIB1 and GRIB2 records into
separate files. I believe that you could do this either using the ECMWF
grib_api tool, or you could use the NCEP tools wgrib and wgrib2. wgrib.

Using wgrib and wgrib2 is pretty simple:

wgrib2 EL13040712 -grib grib2.grb
wgrib EL13040712 -grib -d all -o grib1.grb

produced files grib1.grb and grib2.grb that work fine with NCL.

ECMWF has something called grib_copy (
http://old.ecmwf.int/publications/manuals/grib_api/grib_copy.html) that is
also supposed to be easy to use.

Hope this helps.
 -dave




On Fri, Jun 20, 2014 at 12:11 AM, Balazs Szintai <balazs.szintai@gmail.com>
wrote:

> Hello,
>
> I would like to open files which contain both GRIB-2 (upper air model
> levels) and GRIB-1 (surface fields) messages from ECMWF. I get the
> following error:
>
> ncl 1> g=addfile("./EL13040712.grb","r")
> g2_info: can only decode GRIB edition 2.fatal:Could not extend memory for
> GRIB v2 data.
> fatal:Could not open (./EL13040712)
>
> The example file is here:
>
> http://szintaib.web.elte.hu/NCL/EL13040712
>
> I am using NCL version 6.0.0 .
>
> Thanks a lot!
>
> Balazs
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

Received on Fri Jun 20 05:16:02 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT