[Met_help] [rt.rap.ucar.edu #71744] History for Error message with grid_stat

John Halley Gotway via RT met_help at ucar.edu
Wed May 6 09:43:23 MDT 2015


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Hello,

I have both observation and Forecast data in grib2 format (see attached). I
receive the error message below while running grid_stat:


[chibuzo at localhost met-5.0]$ bin/grid_stat ../data/for.grb ../data/obs.grb
../data/GridStatConfig_APCP_24 -outdir ../data/output -v 2
DEBUG 1: Default Config File:
/home/chibuzo/MET/met-5.0/share/met/config/GridStatConfig_default
DEBUG 1: User Config File: ../data/GridStatConfig_APCP_24
ERROR  :
ERROR  : GribFile::read() -> file read error ... requested -8 bytes, got -1
ERROR  :


I have attached the my Gridstat config file as well.

Kindly advise:


-- 

*Agogbuo Chibuzo*
CPC African Desk
NOAA Center for Weather and Climate Prediction
5830 University Research Court, Rm 3149
College Park, Maryland 20740
Tel: (301) 683-0057
e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
<chibuzo.agogbuo at noaa.gov>


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Error message with grid_stat
From: John Halley Gotway
Time: Tue May 05 15:28:29 2015

Hello,

I see that you're having trouble running some GRIB2 data through the
Grid-Stat tool.  The problem is due to the suffix of those files.  MET
interprets .gb, .grb, and .grib to be GRIB1 files and .gb2, .grb2, and
.grib2 to be GRIB2 files.  So it's trying to read a GRIB2 file as a
GRIB1
file.

You have a couple of choices for fixing this...

(1) Change the .grb suffix to .grb2.

(2) Edit the config file to explicitly state that this is a GRIB2
file,
like this:
     file_type = GRIB2;

That'll get past that error, but here's the next problem you'll see:
   WARNING: process_scores() -> APCP/A24 not found in file: for.grb

Typically precipitation is encoded in GRIB files as an accumulation
from
time 1 to time 2.  However, if your data it's stored as an
instantaneous
forecast value... not an accumulation interval.

I tried the following settings:
   name = "APCP";
   level = "Z0";

But that didn't match it either.  Using wgrib2 to look at the level
value
for this data, I see the following:
   wgrib2 -Sec4 for.grb2
   1:0:Sec4 len=34 #vert coordinate=0 Product Defn Template=4.0
size=34
free=0 lvl1=1 scale=-127 val=-2147483647

MET is parsing the level value for this data as -2147483647.  Are you
sure
this data is encoded in GRIB correctly?  Where did you get it?

Again, two options...

(1) You could set the level value to "R1" to use the first record:
     name = "APCP";
     level   = "R1";

(2) Looks like converting from GRIB2 to GRIB1 makes the file behave
better:
     cnvgrib -g21 for.grb2 for.grb
     cnvgrib -g21 obs.grb2 obs.grb

   And then use:
      name = "APCP";
      level   = "Z0";

Please let me know how it all goes.

Thanks,
John Halley Gotway
met_help at ucar.edu


On Tue, May 5, 2015 at 11:23 AM, Chibuzo Agogbuo - NOAA Affiliate via
RT <
met_help at ucar.edu> wrote:

>
> Tue May 05 11:23:40 2015: Request 71744 was acted upon.
> Transaction: Ticket created by chibuzo.agogbuo at noaa.gov
>        Queue: met_help
>      Subject: Error message with grid_stat
>        Owner: Nobody
>   Requestors: chibuzo.agogbuo at noaa.gov
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=71744 >
>
>
> Hello,
>
> I have both observation and Forecast data in grib2 format (see
attached). I
> receive the error message below while running grid_stat:
>
>
> [chibuzo at localhost met-5.0]$ bin/grid_stat ../data/for.grb
../data/obs.grb
> ../data/GridStatConfig_APCP_24 -outdir ../data/output -v 2
> DEBUG 1: Default Config File:
> /home/chibuzo/MET/met-5.0/share/met/config/GridStatConfig_default
> DEBUG 1: User Config File: ../data/GridStatConfig_APCP_24
> ERROR  :
> ERROR  : GribFile::read() -> file read error ... requested -8 bytes,
got -1
> ERROR  :
>
>
> I have attached the my Gridstat config file as well.
>
> Kindly advise:
>
>
> --
>
> *Agogbuo Chibuzo*
> CPC African Desk
> NOAA Center for Weather and Climate Prediction
> 5830 University Research Court, Rm 3149
> College Park, Maryland 20740
> Tel: (301) 683-0057
> e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
> <chibuzo.agogbuo at noaa.gov>
>
>

------------------------------------------------
Subject: Error message with grid_stat
From: Chibuzo Agogbuo - NOAA Affiliate
Time: Wed May 06 09:30:02 2015

Hi John,
I renamed the file by adding the suffix ie grib2 and also included the
accumulation 24hours as suggested and it works.

Thanks.

On Tue, May 5, 2015 at 5:28 PM, John Halley Gotway via RT
<met_help at ucar.edu
> wrote:

> Hello,
>
> I see that you're having trouble running some GRIB2 data through the
> Grid-Stat tool.  The problem is due to the suffix of those files.
MET
> interprets .gb, .grb, and .grib to be GRIB1 files and .gb2, .grb2,
and
> .grib2 to be GRIB2 files.  So it's trying to read a GRIB2 file as a
GRIB1
> file.
>
> You have a couple of choices for fixing this...
>
> (1) Change the .grb suffix to .grb2.
>
> (2) Edit the config file to explicitly state that this is a GRIB2
file,
> like this:
>      file_type = GRIB2;
>
> That'll get past that error, but here's the next problem you'll see:
>    WARNING: process_scores() -> APCP/A24 not found in file: for.grb
>
> Typically precipitation is encoded in GRIB files as an accumulation
from
> time 1 to time 2.  However, if your data it's stored as an
instantaneous
> forecast value... not an accumulation interval.
>
> I tried the following settings:
>    name = "APCP";
>    level = "Z0";
>
> But that didn't match it either.  Using wgrib2 to look at the level
value
> for this data, I see the following:
>    wgrib2 -Sec4 for.grb2
>    1:0:Sec4 len=34 #vert coordinate=0 Product Defn Template=4.0
size=34
> free=0 lvl1=1 scale=-127 val=-2147483647
>
> MET is parsing the level value for this data as -2147483647.  Are
you sure
> this data is encoded in GRIB correctly?  Where did you get it?
>
> Again, two options...
>
> (1) You could set the level value to "R1" to use the first record:
>      name = "APCP";
>      level   = "R1";
>
> (2) Looks like converting from GRIB2 to GRIB1 makes the file behave
better:
>      cnvgrib -g21 for.grb2 for.grb
>      cnvgrib -g21 obs.grb2 obs.grb
>
>    And then use:
>       name = "APCP";
>       level   = "Z0";
>
> Please let me know how it all goes.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
> On Tue, May 5, 2015 at 11:23 AM, Chibuzo Agogbuo - NOAA Affiliate
via RT <
> met_help at ucar.edu> wrote:
>
> >
> > Tue May 05 11:23:40 2015: Request 71744 was acted upon.
> > Transaction: Ticket created by chibuzo.agogbuo at noaa.gov
> >        Queue: met_help
> >      Subject: Error message with grid_stat
> >        Owner: Nobody
> >   Requestors: chibuzo.agogbuo at noaa.gov
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=71744 >
> >
> >
> > Hello,
> >
> > I have both observation and Forecast data in grib2 format (see
> attached). I
> > receive the error message below while running grid_stat:
> >
> >
> > [chibuzo at localhost met-5.0]$ bin/grid_stat ../data/for.grb
> ../data/obs.grb
> > ../data/GridStatConfig_APCP_24 -outdir ../data/output -v 2
> > DEBUG 1: Default Config File:
> > /home/chibuzo/MET/met-5.0/share/met/config/GridStatConfig_default
> > DEBUG 1: User Config File: ../data/GridStatConfig_APCP_24
> > ERROR  :
> > ERROR  : GribFile::read() -> file read error ... requested -8
bytes, got
> -1
> > ERROR  :
> >
> >
> > I have attached the my Gridstat config file as well.
> >
> > Kindly advise:
> >
> >
> > --
> >
> > *Agogbuo Chibuzo*
> > CPC African Desk
> > NOAA Center for Weather and Climate Prediction
> > 5830 University Research Court, Rm 3149
> > College Park, Maryland 20740
> > Tel: (301) 683-0057
> > e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
> > <chibuzo.agogbuo at noaa.gov>
> >
> >
>
>


--

*Agogbuo Chibuzo*
CPC African Desk
NOAA Center for Weather and Climate Prediction
5830 University Research Court, Rm 3149
College Park, Maryland 20740
Tel: (301) 683-0057
e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
<chibuzo.agogbuo at noaa.gov>

------------------------------------------------
Subject: Error message with grid_stat
From: John Halley Gotway
Time: Wed May 06 09:42:57 2015

Great!  Thanks for letting me know.

I'll go ahead and resolve this ticket now.

Thanks,
John

On Wed, May 6, 2015 at 9:30 AM, Chibuzo Agogbuo - NOAA Affiliate via
RT <
met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=71744 >
>
> Hi John,
> I renamed the file by adding the suffix ie grib2 and also included
the
> accumulation 24hours as suggested and it works.
>
> Thanks.
>
> On Tue, May 5, 2015 at 5:28 PM, John Halley Gotway via RT <
> met_help at ucar.edu
> > wrote:
>
> > Hello,
> >
> > I see that you're having trouble running some GRIB2 data through
the
> > Grid-Stat tool.  The problem is due to the suffix of those files.
MET
> > interprets .gb, .grb, and .grib to be GRIB1 files and .gb2, .grb2,
and
> > .grib2 to be GRIB2 files.  So it's trying to read a GRIB2 file as
a GRIB1
> > file.
> >
> > You have a couple of choices for fixing this...
> >
> > (1) Change the .grb suffix to .grb2.
> >
> > (2) Edit the config file to explicitly state that this is a GRIB2
file,
> > like this:
> >      file_type = GRIB2;
> >
> > That'll get past that error, but here's the next problem you'll
see:
> >    WARNING: process_scores() -> APCP/A24 not found in file:
for.grb
> >
> > Typically precipitation is encoded in GRIB files as an
accumulation from
> > time 1 to time 2.  However, if your data it's stored as an
instantaneous
> > forecast value... not an accumulation interval.
> >
> > I tried the following settings:
> >    name = "APCP";
> >    level = "Z0";
> >
> > But that didn't match it either.  Using wgrib2 to look at the
level value
> > for this data, I see the following:
> >    wgrib2 -Sec4 for.grb2
> >    1:0:Sec4 len=34 #vert coordinate=0 Product Defn Template=4.0
size=34
> > free=0 lvl1=1 scale=-127 val=-2147483647
> >
> > MET is parsing the level value for this data as -2147483647.  Are
you
> sure
> > this data is encoded in GRIB correctly?  Where did you get it?
> >
> > Again, two options...
> >
> > (1) You could set the level value to "R1" to use the first record:
> >      name = "APCP";
> >      level   = "R1";
> >
> > (2) Looks like converting from GRIB2 to GRIB1 makes the file
behave
> better:
> >      cnvgrib -g21 for.grb2 for.grb
> >      cnvgrib -g21 obs.grb2 obs.grb
> >
> >    And then use:
> >       name = "APCP";
> >       level   = "Z0";
> >
> > Please let me know how it all goes.
> >
> > Thanks,
> > John Halley Gotway
> > met_help at ucar.edu
> >
> >
> > On Tue, May 5, 2015 at 11:23 AM, Chibuzo Agogbuo - NOAA Affiliate
via RT
> <
> > met_help at ucar.edu> wrote:
> >
> > >
> > > Tue May 05 11:23:40 2015: Request 71744 was acted upon.
> > > Transaction: Ticket created by chibuzo.agogbuo at noaa.gov
> > >        Queue: met_help
> > >      Subject: Error message with grid_stat
> > >        Owner: Nobody
> > >   Requestors: chibuzo.agogbuo at noaa.gov
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=71744
> >
> > >
> > >
> > > Hello,
> > >
> > > I have both observation and Forecast data in grib2 format (see
> > attached). I
> > > receive the error message below while running grid_stat:
> > >
> > >
> > > [chibuzo at localhost met-5.0]$ bin/grid_stat ../data/for.grb
> > ../data/obs.grb
> > > ../data/GridStatConfig_APCP_24 -outdir ../data/output -v 2
> > > DEBUG 1: Default Config File:
> > > /home/chibuzo/MET/met-
5.0/share/met/config/GridStatConfig_default
> > > DEBUG 1: User Config File: ../data/GridStatConfig_APCP_24
> > > ERROR  :
> > > ERROR  : GribFile::read() -> file read error ... requested -8
bytes,
> got
> > -1
> > > ERROR  :
> > >
> > >
> > > I have attached the my Gridstat config file as well.
> > >
> > > Kindly advise:
> > >
> > >
> > > --
> > >
> > > *Agogbuo Chibuzo*
> > > CPC African Desk
> > > NOAA Center for Weather and Climate Prediction
> > > 5830 University Research Court, Rm 3149
> > > College Park, Maryland 20740
> > > Tel: (301) 683-0057
> > > e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
> > > <chibuzo.agogbuo at noaa.gov>
> > >
> > >
> >
> >
>
>
> --
>
> *Agogbuo Chibuzo*
> CPC African Desk
> NOAA Center for Weather and Climate Prediction
> 5830 University Research Court, Rm 3149
> College Park, Maryland 20740
> Tel: (301) 683-0057
> e-mail:chibuzo.agogbuo <chibuzo.agogbuo at noaa.gov>@noaa.gov
> <chibuzo.agogbuo at noaa.gov>
>
>

------------------------------------------------


More information about the Met_help mailing list