[Met_help] [rt.rap.ucar.edu #81542] History for How to read forecast into MET by designating a GRIB code for field name

John Halley Gotway via RT met_help at ucar.edu
Wed Sep 6 12:12:10 MDT 2017


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

Dear sir or madam,
  Hello. I have a question.
  I am trying to use MET to do verification of composed radar reflectivity (CREF) from WRF output.
  I used UPP v2.1 to diagnosed the CREF, and the output was written in GRIB format. However, the wgrib tool cannot recognize the CREF Grib product name, and gives an output like:
  "2:234094:D=2016071900:var236:5000-2000 m above gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
  "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid 11-12hr:NAve=0"


  I set the config file of MET by using "name=var236;" and "name=236;". 

    field = [
        {
           name       = var236;
           level      = [ "Z5000-2000" ];
        }
     ];
    field = [
        {
           name       = 236;
           level      = [ "Z5000-2000" ];
        }
     ];
  Both don't work. The output is:
  "ERROR  : is_prelim_match() - either name or GRIB1_ptv and GRIB_code must be specified in field information"


  The Manual said that a field name can be either a abbreviation or GRIB code. However, I didn't find any sample how to set a field name by a GRIB code. Would you show me an example how to read this data into MET please?


  Thanks!


Jiangshan Zhu











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

Subject: How to read forecast into MET by designating a GRIB code for field name
From: John Halley Gotway
Time: Wed Aug 09 10:11:22 2017

Hello,

I see that you're having trouble access the CREF variable in your GRIB
output from UPP.  I obviously see that the GRIB code is 236.  Since
you
mentioned the "wgrib" tool and not the "wgrib2" tool, I'll assume that
you're using GRIB1 output from UPP (and not GRIB2).

The remaining question is... what parameter table version number is
encoded
for this record?  Please run wgrib using the "-V" for verbose option.
The
output will look something like this:

rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=212
sfc 0-12hr acc: bitmap: 9703 undef
  APCP=Total precipitation [kg/m^2]
  timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3 num_in_ave
0
missing 0
  center 59 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
  Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
      Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP 0.000000
      North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64 mode 8
  min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3 BinScale 0

Looking at this sample output, notice the line which reads "Table 2".
Your
may say "Table 2" or "Table 128" or "Table 129" or something else.

Then trying running this MET command to plot your CREF data:

met-6.0/bin/plot_data_plane \
  grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
level="L5000-2000";'

Where "grib_file_name" is the name of your GRIB file and instead of
"129"
use the table number indicated by wgrib.

Does that work?

You also have a second option.  If ultimately you'd like to have your
MET
output use the name "CREF", you can create a custom GRIB table and
tell MET
where to find it.  Again I'll assume the parameter table version
number is
129.  Create a text file that begins with "grib1" and ends with
".txt".
For example, "GRIB1_local.txt" that contains the following 2 lines:
---------------------------------
GRIB1
236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
---------------------------------

Where 236 is the GRIB number, 129 is the table version number, and 7
is the
number of the generating center (this is also included in the wgrib
-V)
output.

Once you create that file, set an environment variable like this:
setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt

And then run plot_data_plane again:
met-6.0/bin/plot_data_plane \
  grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'

If everything goes smoothly, this command should work too.

Hope that helps.

Thanks,
John Halley Gotway










On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
>        Queue: met_help
>      Subject: How to read forecast into MET by designating a GRIB
code for
> field name
>        Owner: Nobody
>   Requestors: zhujiangshan at mail.iap.ac.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
>
>
> Dear sir or madam,
>   Hello. I have a question.
>   I am trying to use MET to do verification of composed radar
reflectivity
> (CREF) from WRF output.
>   I used UPP v2.1 to diagnosed the CREF, and the output was written
in
> GRIB format. However, the wgrib tool cannot recognize the CREF Grib
product
> name, and gives an output like:
>   "2:234094:D=2016071900:var236:5000-2000 m above
> gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
>   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid 11-
12hr:NAve=0"
>
>
>   I set the config file of MET by using "name=var236;" and
"name=236;".
>
>     field = [
>         {
>            name       = var236;
>            level      = [ "Z5000-2000" ];
>         }
>      ];
>     field = [
>         {
>            name       = 236;
>            level      = [ "Z5000-2000" ];
>         }
>      ];
>   Both don't work. The output is:
>   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
GRIB_code
> must be specified in field information"
>
>
>   The Manual said that a field name can be either a abbreviation or
GRIB
> code. However, I didn't find any sample how to set a field name by a
GRIB
> code. Would you show me an example how to read this data into MET
please?
>
>
>   Thanks!
>
>
> Jiangshan Zhu
>
>
>
>
>
>
>
>
>
>
>

------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: zhujiangshan
Time: Thu Aug 10 01:35:45 2017

John,
  Thank you very much for the help.
  I check the grib data, using “wgrib -V”, and the output is:

rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106 kpds7=12820
levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
  var236=undefined
  timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3 num_in_ave
0 missing 0
  center 7 subcenter 0 process 125 Table 129
  Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
      Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP 0.000000
      North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64 mode 136
  min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0

So I use this command:
plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
GRIB1_code=236;level="L5000-2000";'

However, it outputs:
DEBUG 1: Opening data file: WRFPRS_d01.24
WARNING:
WARNING: MetGrib1DataFile::data_plane() -> No exact match found for
VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
WARNING:
ERROR  :
ERROR  : plot_data_plane -> trouble getting field "GRIB1_ptv=129;
GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
ERROR  :

I tried the second method,
I copyed the 2 line into a file named GRIB1_local.txt, and export it
as environmental variable. (I use a bash)
However, it is like this:

plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
2000";'
DEBUG 1: Opening data file: WRFPRS_d01.24
ERROR  :
ERROR  : is_prelim_match() - unrecognized GRIB1 field abbreviation
'CREF' for table version 129
ERROR  :

Would you help me with this please?

Thanks!

Jiangshan Zhu


发件人: John Halley Gotway via RT
发送时间: 2017年8月10日 0:11
收件人: zhujiangshan at mail.iap.ac.cn
主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET by
designating a GRIB code for field name

Hello,

I see that you're having trouble access the CREF variable in your GRIB
output from UPP.  I obviously see that the GRIB code is 236.  Since
you
mentioned the "wgrib" tool and not the "wgrib2" tool, I'll assume that
you're using GRIB1 output from UPP (and not GRIB2).

The remaining question is... what parameter table version number is
encoded
for this record?  Please run wgrib using the "-V" for verbose option.
The
output will look something like this:

rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=212
sfc 0-12hr acc: bitmap: 9703 undef
  APCP=Total precipitation [kg/m^2]
  timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3 num_in_ave
0
missing 0
  center 59 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
  Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
      Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP 0.000000
      North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64 mode 8
  min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3 BinScale 0

Looking at this sample output, notice the line which reads "Table 2".
Your
may say "Table 2" or "Table 128" or "Table 129" or something else.

Then trying running this MET command to plot your CREF data:

met-6.0/bin/plot_data_plane \
  grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
level="L5000-2000";'

Where "grib_file_name" is the name of your GRIB file and instead of
"129"
use the table number indicated by wgrib.

Does that work?

You also have a second option.  If ultimately you'd like to have your
MET
output use the name "CREF", you can create a custom GRIB table and
tell MET
where to find it.  Again I'll assume the parameter table version
number is
129.  Create a text file that begins with "grib1" and ends with
".txt".
For example, "GRIB1_local.txt" that contains the following 2 lines:
---------------------------------
GRIB1
236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
---------------------------------

Where 236 is the GRIB number, 129 is the table version number, and 7
is the
number of the generating center (this is also included in the wgrib
-V)
output.

Once you create that file, set an environment variable like this:
setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt

And then run plot_data_plane again:
met-6.0/bin/plot_data_plane \
  grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'

If everything goes smoothly, this command should work too.

Hope that helps.

Thanks,
John Halley Gotway










On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
>        Queue: met_help
>      Subject: How to read forecast into MET by designating a GRIB
code for
> field name
>        Owner: Nobody
>   Requestors: zhujiangshan at mail.iap.ac.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
>
>
> Dear sir or madam,
>   Hello. I have a question.
>   I am trying to use MET to do verification of composed radar
reflectivity
> (CREF) from WRF output.
>   I used UPP v2.1 to diagnosed the CREF, and the output was written
in
> GRIB format. However, the wgrib tool cannot recognize the CREF Grib
product
> name, and gives an output like:
>   "2:234094:D=2016071900:var236:5000-2000 m above
> gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
>   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid 11-
12hr:NAve=0"
>
>
>   I set the config file of MET by using "name=var236;" and
"name=236;".
>
>     field = [
>         {
>            name       = var236;
>            level      = [ "Z5000-2000" ];
>         }
>      ];
>     field = [
>         {
>            name       = 236;
>            level      = [ "Z5000-2000" ];
>         }
>      ];
>   Both don't work. The output is:
>   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
GRIB_code
> must be specified in field information"
>
>
>   The Manual said that a field name can be either a abbreviation or
GRIB
> code. However, I didn't find any sample how to set a field name by a
GRIB
> code. Would you show me an example how to read this data into MET
please?
>
>
>   Thanks!
>
>
> Jiangshan Zhu
>
>
>
>
>
>
>
>
>
>
>



------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: John Halley Gotway
Time: Thu Aug 10 07:21:29 2017

Please post a sample GRIB file to our anonymous ftp site following
these
instructions:

http://www.dtcenter.org/met/users/support/met_help.php#ftp

Also please let us know what version of MET you're using and the last
set
of patches that have been applied to it.

Thanks
John

On Thu, Aug 10, 2017 at 1:35 AM zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
>
> John,
>   Thank you very much for the help.
>   I check the grib data, using “wgrib -V”, and the output is:
>
> rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106 kpds7=12820
> levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
>   var236=undefined
>   timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3
num_in_ave 0
> missing 0
>   center 7 subcenter 0 process 125 Table 129
>   Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
>       Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP
0.000000
>       North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64 mode
136
>   min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0
>
> So I use this command:
> plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
> GRIB1_code=236;level="L5000-2000";'
>
> However, it outputs:
> DEBUG 1: Opening data file: WRFPRS_d01.24
> WARNING:
> WARNING: MetGrib1DataFile::data_plane() -> No exact match found for
> VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
> WARNING:
> ERROR  :
> ERROR  : plot_data_plane -> trouble getting field "GRIB1_ptv=129;
> GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
> ERROR  :
>
> I tried the second method,
> I copyed the 2 line into a file named GRIB1_local.txt, and export it
as
> environmental variable. (I use a bash)
> However, it is like this:
>
> plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
2000";'
> DEBUG 1: Opening data file: WRFPRS_d01.24
> ERROR  :
> ERROR  : is_prelim_match() - unrecognized GRIB1 field abbreviation
'CREF'
> for table version 129
> ERROR  :
>
> Would you help me with this please?
>
> Thanks!
>
> Jiangshan Zhu
>
>
> 发件人: John Halley Gotway via RT
> 发送时间: 2017年8月10日 0:11
> 收件人: zhujiangshan at mail.iap.ac.cn
> 主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET by
> designating a GRIB code for field name
>
> Hello,
>
> I see that you're having trouble access the CREF variable in your
GRIB
> output from UPP.  I obviously see that the GRIB code is 236.  Since
you
> mentioned the "wgrib" tool and not the "wgrib2" tool, I'll assume
that
> you're using GRIB1 output from UPP (and not GRIB2).
>
> The remaining question is... what parameter table version number is
encoded
> for this record?  Please run wgrib using the "-V" for verbose
option.  The
> output will look something like this:
>
> rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=212
> sfc 0-12hr acc: bitmap: 9703 undef
>   APCP=Total precipitation [kg/m^2]
>   timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3
num_in_ave 0
> missing 0
>   center 59 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
>   Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
>       Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP
0.000000
>       North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64 mode
8
>   min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3 BinScale
0
>
> Looking at this sample output, notice the line which reads "Table
2".  Your
> may say "Table 2" or "Table 128" or "Table 129" or something else.
>
> Then trying running this MET command to plot your CREF data:
>
> met-6.0/bin/plot_data_plane \
>   grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
> level="L5000-2000";'
>
> Where "grib_file_name" is the name of your GRIB file and instead of
"129"
> use the table number indicated by wgrib.
>
> Does that work?
>
> You also have a second option.  If ultimately you'd like to have
your MET
> output use the name "CREF", you can create a custom GRIB table and
tell MET
> where to find it.  Again I'll assume the parameter table version
number is
> 129.  Create a text file that begins with "grib1" and ends with
".txt".
> For example, "GRIB1_local.txt" that contains the following 2 lines:
> ---------------------------------
> GRIB1
> 236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
> ---------------------------------
>
> Where 236 is the GRIB number, 129 is the table version number, and 7
is the
> number of the generating center (this is also included in the wgrib
-V)
> output.
>
> Once you create that file, set an environment variable like this:
> setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt
>
> And then run plot_data_plane again:
> met-6.0/bin/plot_data_plane \
>   grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'
>
> If everything goes smoothly, this command should work too.
>
> Hope that helps.
>
> Thanks,
> John Halley Gotway
>
>
>
>
>
>
>
>
>
>
> On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> > Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
> >        Queue: met_help
> >      Subject: How to read forecast into MET by designating a GRIB
code
> for
> > field name
> >        Owner: Nobody
> >   Requestors: zhujiangshan at mail.iap.ac.cn
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> >
> >
> > Dear sir or madam,
> >   Hello. I have a question.
> >   I am trying to use MET to do verification of composed radar
> reflectivity
> > (CREF) from WRF output.
> >   I used UPP v2.1 to diagnosed the CREF, and the output was
written in
> > GRIB format. However, the wgrib tool cannot recognize the CREF
Grib
> product
> > name, and gives an output like:
> >   "2:234094:D=2016071900:var236:5000-2000 m above
> > gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
> >   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> > 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid
> 11-12hr:NAve=0"
> >
> >
> >   I set the config file of MET by using "name=var236;" and
"name=236;".
> >
> >     field = [
> >         {
> >            name       = var236;
> >            level      = [ "Z5000-2000" ];
> >         }
> >      ];
> >     field = [
> >         {
> >            name       = 236;
> >            level      = [ "Z5000-2000" ];
> >         }
> >      ];
> >   Both don't work. The output is:
> >   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
GRIB_code
> > must be specified in field information"
> >
> >
> >   The Manual said that a field name can be either a abbreviation
or GRIB
> > code. However, I didn't find any sample how to set a field name by
a GRIB
> > code. Would you show me an example how to read this data into MET
please?
> >
> >
> >   Thanks!
> >
> >
> > Jiangshan Zhu
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: zhujiangshan
Time: Mon Aug 14 00:30:56 2017

John,
  I have uploaded a file WRFPRS_d01.24 to incoming/irap/met_help/Zhu.
  The version of MET is v5.2, with bug-fix files patched.


  Thanks!


Jiangshan

> -----原始邮件-----
> 发件人: "John Halley Gotway via RT" <met_help at ucar.edu>
> 发送时间: 2017年8月10日 星期四
> 收件人: zhujiangshan at mail.iap.ac.cn
> 抄送:
> 主题: Re: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by designating a GRIB code for field name
>
> Please post a sample GRIB file to our anonymous ftp site following
these
> instructions:
>
> http://www.dtcenter.org/met/users/support/met_help.php#ftp
>
> Also please let us know what version of MET you're using and the
last set
> of patches that have been applied to it.
>
> Thanks
> John
>
> On Thu, Aug 10, 2017 at 1:35 AM zhujiangshan via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> >
> > John,
> >   Thank you very much for the help.
> >   I check the grib data, using “wgrib -V”, and the output is:
> >
> > rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106
kpds7=12820
> > levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
> >   var236=undefined
> >   timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3
num_in_ave 0
> > missing 0
> >   center 7 subcenter 0 process 125 Table 129
> >   Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
> >       Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP
0.000000
> >       North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64 mode
136
> >   min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0
> >
> > So I use this command:
> > plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
> > GRIB1_code=236;level="L5000-2000";'
> >
> > However, it outputs:
> > DEBUG 1: Opening data file: WRFPRS_d01.24
> > WARNING:
> > WARNING: MetGrib1DataFile::data_plane() -> No exact match found
for
> > VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
> > WARNING:
> > ERROR  :
> > ERROR  : plot_data_plane -> trouble getting field "GRIB1_ptv=129;
> > GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
> > ERROR  :
> >
> > I tried the second method,
> > I copyed the 2 line into a file named GRIB1_local.txt, and export
it as
> > environmental variable. (I use a bash)
> > However, it is like this:
> >
> > plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
2000";'
> > DEBUG 1: Opening data file: WRFPRS_d01.24
> > ERROR  :
> > ERROR  : is_prelim_match() - unrecognized GRIB1 field abbreviation
'CREF'
> > for table version 129
> > ERROR  :
> >
> > Would you help me with this please?
> >
> > Thanks!
> >
> > Jiangshan Zhu
> >
> >
> > 发件人: John Halley Gotway via RT
> > 发送时间: 2017年8月10日 0:11
> > 收件人: zhujiangshan at mail.iap.ac.cn
> > 主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET by
> > designating a GRIB code for field name
> >
> > Hello,
> >
> > I see that you're having trouble access the CREF variable in your
GRIB
> > output from UPP.  I obviously see that the GRIB code is 236.
Since you
> > mentioned the "wgrib" tool and not the "wgrib2" tool, I'll assume
that
> > you're using GRIB1 output from UPP (and not GRIB2).
> >
> > The remaining question is... what parameter table version number
is encoded
> > for this record?  Please run wgrib using the "-V" for verbose
option.  The
> > output will look something like this:
> >
> > rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=212
> > sfc 0-12hr acc: bitmap: 9703 undef
> >   APCP=Total precipitation [kg/m^2]
> >   timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3
num_in_ave 0
> > missing 0
> >   center 59 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
> >   Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
> >       Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP
0.000000
> >       North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64
mode 8
> >   min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3
BinScale 0
> >
> > Looking at this sample output, notice the line which reads "Table
2".  Your
> > may say "Table 2" or "Table 128" or "Table 129" or something else.
> >
> > Then trying running this MET command to plot your CREF data:
> >
> > met-6.0/bin/plot_data_plane \
> >   grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
> > level="L5000-2000";'
> >
> > Where "grib_file_name" is the name of your GRIB file and instead
of "129"
> > use the table number indicated by wgrib.
> >
> > Does that work?
> >
> > You also have a second option.  If ultimately you'd like to have
your MET
> > output use the name "CREF", you can create a custom GRIB table and
tell MET
> > where to find it.  Again I'll assume the parameter table version
number is
> > 129.  Create a text file that begins with "grib1" and ends with
".txt".
> > For example, "GRIB1_local.txt" that contains the following 2
lines:
> > ---------------------------------
> > GRIB1
> > 236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
> > ---------------------------------
> >
> > Where 236 is the GRIB number, 129 is the table version number, and
7 is the
> > number of the generating center (this is also included in the
wgrib -V)
> > output.
> >
> > Once you create that file, set an environment variable like this:
> > setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt
> >
> > And then run plot_data_plane again:
> > met-6.0/bin/plot_data_plane \
> >   grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'
> >
> > If everything goes smoothly, this command should work too.
> >
> > Hope that helps.
> >
> > Thanks,
> > John Halley Gotway
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> > > Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
> > >        Queue: met_help
> > >      Subject: How to read forecast into MET by designating a
GRIB code
> > for
> > > field name
> > >        Owner: Nobody
> > >   Requestors: zhujiangshan at mail.iap.ac.cn
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> > >
> > >
> > > Dear sir or madam,
> > >   Hello. I have a question.
> > >   I am trying to use MET to do verification of composed radar
> > reflectivity
> > > (CREF) from WRF output.
> > >   I used UPP v2.1 to diagnosed the CREF, and the output was
written in
> > > GRIB format. However, the wgrib tool cannot recognize the CREF
Grib
> > product
> > > name, and gives an output like:
> > >   "2:234094:D=2016071900:var236:5000-2000 m above
> > > gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
> > >   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> > > 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid
> > 11-12hr:NAve=0"
> > >
> > >
> > >   I set the config file of MET by using "name=var236;" and
"name=236;".
> > >
> > >     field = [
> > >         {
> > >            name       = var236;
> > >            level      = [ "Z5000-2000" ];
> > >         }
> > >      ];
> > >     field = [
> > >         {
> > >            name       = 236;
> > >            level      = [ "Z5000-2000" ];
> > >         }
> > >      ];
> > >   Both don't work. The output is:
> > >   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
GRIB_code
> > > must be specified in field information"
> > >
> > >
> > >   The Manual said that a field name can be either a abbreviation
or GRIB
> > > code. However, I didn't find any sample how to set a field name
by a GRIB
> > > code. Would you show me an example how to read this data into
MET please?
> > >
> > >
> > >   Thanks!
> > >
> > >
> > > Jiangshan Zhu
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>




------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: John Halley Gotway
Time: Mon Aug 14 11:22:55 2017

Jiangshan,

Thanks for posting a sample data file.  Unfortunately, it looks like
there
are problems.

The file is 2.3M in size:

ls -lah WRFPRS_d01.24
-rw-rw-r-- 1 johnhg rap 2.3M Aug 14 11:14 WRFPRS_d01.24

However, wgrib can't parse it:

wgrib WRFPRS_d01.24
    missing end section
37 37 47 52

And MET errors out as follows:

/usr/local/met-6.0/bin/plot_data_plane WRFPRS_d01.24 plot.ps
'name="TMP";
level="R1";'
DEBUG 1: Opening data file: WRFPRS_d01.24
ERROR  :
ERROR  : GribFile::read_record(GribRecord &) -> trailing "7777" not
found
in grib record
ERROR  :
ERROR  :
ERROR  : GribFile::seek_record(int) -> range check error
ERROR  :

Perhaps there's some issue with our ftp site?  If your file is really
2.3M
in size, and wgrib does produce sensible output on your machine,
please try
sending it as an email attachment.  Perhaps, we'll have better luck
that
way!

Thanks,
John

On Mon, Aug 14, 2017 at 12:30 AM, zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
>
> John,
>   I have uploaded a file WRFPRS_d01.24 to
incoming/irap/met_help/Zhu.
>   The version of MET is v5.2, with bug-fix files patched.
>
>
>   Thanks!
>
>
> Jiangshan
>
> > -----原始邮件-----
> > 发件人: "John Halley Gotway via RT" <met_help at ucar.edu>
> > 发送时间: 2017年8月10日 星期四
> > 收件人: zhujiangshan at mail.iap.ac.cn
> > 抄送:
> > 主题: Re: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by
> designating a GRIB code for field name
> >
> > Please post a sample GRIB file to our anonymous ftp site following
these
> > instructions:
> >
> > http://www.dtcenter.org/met/users/support/met_help.php#ftp
> >
> > Also please let us know what version of MET you're using and the
last set
> > of patches that have been applied to it.
> >
> > Thanks
> > John
> >
> > On Thu, Aug 10, 2017 at 1:35 AM zhujiangshan via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> > >
> > > John,
> > >   Thank you very much for the help.
> > >   I check the grib data, using “wgrib -V”, and the output is:
> > >
> > > rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106
kpds7=12820
> > > levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
> > >   var236=undefined
> > >   timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3
num_in_ave
> 0
> > > missing 0
> > >   center 7 subcenter 0 process 125 Table 129
> > >   Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
> > >       Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP
0.000000
> > >       North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64
mode 136
> > >   min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0
> > >
> > > So I use this command:
> > > plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
> > > GRIB1_code=236;level="L5000-2000";'
> > >
> > > However, it outputs:
> > > DEBUG 1: Opening data file: WRFPRS_d01.24
> > > WARNING:
> > > WARNING: MetGrib1DataFile::data_plane() -> No exact match found
for
> > > VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
> > > WARNING:
> > > ERROR  :
> > > ERROR  : plot_data_plane -> trouble getting field
"GRIB1_ptv=129;
> > > GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
> > > ERROR  :
> > >
> > > I tried the second method,
> > > I copyed the 2 line into a file named GRIB1_local.txt, and
export it as
> > > environmental variable. (I use a bash)
> > > However, it is like this:
> > >
> > > plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
2000
> ";'
> > > DEBUG 1: Opening data file: WRFPRS_d01.24
> > > ERROR  :
> > > ERROR  : is_prelim_match() - unrecognized GRIB1 field
abbreviation
> 'CREF'
> > > for table version 129
> > > ERROR  :
> > >
> > > Would you help me with this please?
> > >
> > > Thanks!
> > >
> > > Jiangshan Zhu
> > >
> > >
> > > 发件人: John Halley Gotway via RT
> > > 发送时间: 2017年8月10日 0:11
> > > 收件人: zhujiangshan at mail.iap.ac.cn
> > > 主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by
> > > designating a GRIB code for field name
> > >
> > > Hello,
> > >
> > > I see that you're having trouble access the CREF variable in
your GRIB
> > > output from UPP.  I obviously see that the GRIB code is 236.
Since you
> > > mentioned the "wgrib" tool and not the "wgrib2" tool, I'll
assume that
> > > you're using GRIB1 output from UPP (and not GRIB2).
> > >
> > > The remaining question is... what parameter table version number
is
> encoded
> > > for this record?  Please run wgrib using the "-V" for verbose
option.
> The
> > > output will look something like this:
> > >
> > > rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0
levels=(0,0)
> grid=212
> > > sfc 0-12hr acc: bitmap: 9703 undef
> > >   APCP=Total precipitation [kg/m^2]
> > >   timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3
num_in_ave 0
> > > missing 0
> > >   center 59 subcenter 0 process 89 Table 2 scan: WE:SN
winds(grid)
> > >   Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
> > >       Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP
0.000000
> > >       North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64
mode 8
> > >   min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3
BinScale 0
> > >
> > > Looking at this sample output, notice the line which reads
"Table 2".
> Your
> > > may say "Table 2" or "Table 128" or "Table 129" or something
else.
> > >
> > > Then trying running this MET command to plot your CREF data:
> > >
> > > met-6.0/bin/plot_data_plane \
> > >   grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
> > > level="L5000-2000";'
> > >
> > > Where "grib_file_name" is the name of your GRIB file and instead
of
> "129"
> > > use the table number indicated by wgrib.
> > >
> > > Does that work?
> > >
> > > You also have a second option.  If ultimately you'd like to have
your
> MET
> > > output use the name "CREF", you can create a custom GRIB table
and
> tell MET
> > > where to find it.  Again I'll assume the parameter table version
> number is
> > > 129.  Create a text file that begins with "grib1" and ends with
".txt".
> > > For example, "GRIB1_local.txt" that contains the following 2
lines:
> > > ---------------------------------
> > > GRIB1
> > > 236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
> > > ---------------------------------
> > >
> > > Where 236 is the GRIB number, 129 is the table version number,
and 7
> is the
> > > number of the generating center (this is also included in the
wgrib -V)
> > > output.
> > >
> > > Once you create that file, set an environment variable like
this:
> > > setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt
> > >
> > > And then run plot_data_plane again:
> > > met-6.0/bin/plot_data_plane \
> > >   grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'
> > >
> > > If everything goes smoothly, this command should work too.
> > >
> > > Hope that helps.
> > >
> > > Thanks,
> > > John Halley Gotway
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu
> >
> > > wrote:
> > >
> > > >
> > > > Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> > > > Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
> > > >        Queue: met_help
> > > >      Subject: How to read forecast into MET by designating a
GRIB
> code
> > > for
> > > > field name
> > > >        Owner: Nobody
> > > >   Requestors: zhujiangshan at mail.iap.ac.cn
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/Tic
> ket/Display.html?id=81542 >
> > > >
> > > >
> > > > Dear sir or madam,
> > > >   Hello. I have a question.
> > > >   I am trying to use MET to do verification of composed radar
> > > reflectivity
> > > > (CREF) from WRF output.
> > > >   I used UPP v2.1 to diagnosed the CREF, and the output was
written
> in
> > > > GRIB format. However, the wgrib tool cannot recognize the CREF
Grib
> > > product
> > > > name, and gives an output like:
> > > >   "2:234094:D=2016071900:var236:5000-2000 m above
> > > > gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
> > > >   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> > > > 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid
> > > 11-12hr:NAve=0"
> > > >
> > > >
> > > >   I set the config file of MET by using "name=var236;" and
> "name=236;".
> > > >
> > > >     field = [
> > > >         {
> > > >            name       = var236;
> > > >            level      = [ "Z5000-2000" ];
> > > >         }
> > > >      ];
> > > >     field = [
> > > >         {
> > > >            name       = 236;
> > > >            level      = [ "Z5000-2000" ];
> > > >         }
> > > >      ];
> > > >   Both don't work. The output is:
> > > >   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
> GRIB_code
> > > > must be specified in field information"
> > > >
> > > >
> > > >   The Manual said that a field name can be either a
abbreviation or
> GRIB
> > > > code. However, I didn't find any sample how to set a field
name by a
> GRIB
> > > > code. Would you show me an example how to read this data into
MET
> please?
> > > >
> > > >
> > > >   Thanks!
> > > >
> > > >
> > > > Jiangshan Zhu
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
>
>
>
>

------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: zhujiangshan
Time: Thu Aug 17 03:39:36 2017

John,
  I am sorry that I cannot find your last email. Perhaps I have delete
it by accident.
  I attached a UPP file. The size of the file is about 2.2Mb. Please
see if you can open this one correctly.
  Thanks,


Jiangshan


> -----原始邮件-----
> 发件人: "John Halley Gotway via RT" <met_help at ucar.edu>
> 发送时间: 2017年8月10日 星期四
> 收件人: zhujiangshan at mail.iap.ac.cn
> 抄送:
> 主题: Re: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by designating a GRIB code for field name
>
> Please post a sample GRIB file to our anonymous ftp site following
these
> instructions:
>
> http://www.dtcenter.org/met/users/support/met_help.php#ftp
>
> Also please let us know what version of MET you're using and the
last set
> of patches that have been applied to it.
>
> Thanks
> John
>
> On Thu, Aug 10, 2017 at 1:35 AM zhujiangshan via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> >
> > John,
> >   Thank you very much for the help.
> >   I check the grib data, using “wgrib -V”, and the output is:
> >
> > rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106
kpds7=12820
> > levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
> >   var236=undefined
> >   timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3
num_in_ave 0
> > missing 0
> >   center 7 subcenter 0 process 125 Table 129
> >   Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
> >       Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP
0.000000
> >       North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64 mode
136
> >   min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0
> >
> > So I use this command:
> > plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
> > GRIB1_code=236;level="L5000-2000";'
> >
> > However, it outputs:
> > DEBUG 1: Opening data file: WRFPRS_d01.24
> > WARNING:
> > WARNING: MetGrib1DataFile::data_plane() -> No exact match found
for
> > VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
> > WARNING:
> > ERROR  :
> > ERROR  : plot_data_plane -> trouble getting field "GRIB1_ptv=129;
> > GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
> > ERROR  :
> >
> > I tried the second method,
> > I copyed the 2 line into a file named GRIB1_local.txt, and export
it as
> > environmental variable. (I use a bash)
> > However, it is like this:
> >
> > plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
2000";'
> > DEBUG 1: Opening data file: WRFPRS_d01.24
> > ERROR  :
> > ERROR  : is_prelim_match() - unrecognized GRIB1 field abbreviation
'CREF'
> > for table version 129
> > ERROR  :
> >
> > Would you help me with this please?
> >
> > Thanks!
> >
> > Jiangshan Zhu
> >
> >
> > 发件人: John Halley Gotway via RT
> > 发送时间: 2017年8月10日 0:11
> > 收件人: zhujiangshan at mail.iap.ac.cn
> > 主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET by
> > designating a GRIB code for field name
> >
> > Hello,
> >
> > I see that you're having trouble access the CREF variable in your
GRIB
> > output from UPP.  I obviously see that the GRIB code is 236.
Since you
> > mentioned the "wgrib" tool and not the "wgrib2" tool, I'll assume
that
> > you're using GRIB1 output from UPP (and not GRIB2).
> >
> > The remaining question is... what parameter table version number
is encoded
> > for this record?  Please run wgrib using the "-V" for verbose
option.  The
> > output will look something like this:
> >
> > rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0 levels=(0,0)
grid=212
> > sfc 0-12hr acc: bitmap: 9703 undef
> >   APCP=Total precipitation [kg/m^2]
> >   timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3
num_in_ave 0
> > missing 0
> >   center 59 subcenter 0 process 89 Table 2 scan: WE:SN winds(grid)
> >   Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
> >       Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP
0.000000
> >       North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64
mode 8
> >   min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3
BinScale 0
> >
> > Looking at this sample output, notice the line which reads "Table
2".  Your
> > may say "Table 2" or "Table 128" or "Table 129" or something else.
> >
> > Then trying running this MET command to plot your CREF data:
> >
> > met-6.0/bin/plot_data_plane \
> >   grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
> > level="L5000-2000";'
> >
> > Where "grib_file_name" is the name of your GRIB file and instead
of "129"
> > use the table number indicated by wgrib.
> >
> > Does that work?
> >
> > You also have a second option.  If ultimately you'd like to have
your MET
> > output use the name "CREF", you can create a custom GRIB table and
tell MET
> > where to find it.  Again I'll assume the parameter table version
number is
> > 129.  Create a text file that begins with "grib1" and ends with
".txt".
> > For example, "GRIB1_local.txt" that contains the following 2
lines:
> > ---------------------------------
> > GRIB1
> > 236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
> > ---------------------------------
> >
> > Where 236 is the GRIB number, 129 is the table version number, and
7 is the
> > number of the generating center (this is also included in the
wgrib -V)
> > output.
> >
> > Once you create that file, set an environment variable like this:
> > setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt
> >
> > And then run plot_data_plane again:
> > met-6.0/bin/plot_data_plane \
> >   grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'
> >
> > If everything goes smoothly, this command should work too.
> >
> > Hope that helps.
> >
> > Thanks,
> > John Halley Gotway
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> > > Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
> > >        Queue: met_help
> > >      Subject: How to read forecast into MET by designating a
GRIB code
> > for
> > > field name
> > >        Owner: Nobody
> > >   Requestors: zhujiangshan at mail.iap.ac.cn
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> > >
> > >
> > > Dear sir or madam,
> > >   Hello. I have a question.
> > >   I am trying to use MET to do verification of composed radar
> > reflectivity
> > > (CREF) from WRF output.
> > >   I used UPP v2.1 to diagnosed the CREF, and the output was
written in
> > > GRIB format. However, the wgrib tool cannot recognize the CREF
Grib
> > product
> > > name, and gives an output like:
> > >   "2:234094:D=2016071900:var236:5000-2000 m above
> > > gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
> > >   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> > > 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid
> > 11-12hr:NAve=0"
> > >
> > >
> > >   I set the config file of MET by using "name=var236;" and
"name=236;".
> > >
> > >     field = [
> > >         {
> > >            name       = var236;
> > >            level      = [ "Z5000-2000" ];
> > >         }
> > >      ];
> > >     field = [
> > >         {
> > >            name       = 236;
> > >            level      = [ "Z5000-2000" ];
> > >         }
> > >      ];
> > >   Both don't work. The output is:
> > >   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
GRIB_code
> > > must be specified in field information"
> > >
> > >
> > >   The Manual said that a field name can be either a abbreviation
or GRIB
> > > code. However, I didn't find any sample how to set a field name
by a GRIB
> > > code. Would you show me an example how to read this data into
MET please?
> > >
> > >
> > >   Thanks!
> > >
> > >
> > > Jiangshan Zhu
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>




------------------------------------------------
Subject: How to read forecast into MET by designating a GRIB code for field name
From: John Halley Gotway
Time: Thu Aug 17 09:44:03 2017

Jiangshan,

Thanks for sending your sample data file.  Running it through wgrib
using
the -V option and looking at the 2nd record, I see the following
output:

[johnhg at number5]% wgrib -d 2 -V WRFPRS_d01.24
rec 2:234094:date 2016071900 var236 kpds5=236 kpds6=106 kpds7=12820
levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
  var236=undefined
  timerange 2 P1 23 P2 24 TimeU 1  nx 400 ny 360 GDS grid 3 num_in_ave
0
missing 0
  center 7 subcenter 0 process 125 Table 129 scan: WE:SN winds(grid)
  Lambert Conf: Lat1 34.496000 Lon1 109.954000 Lov 116.000000
      Latin1 39.500000 Latin2 39.500000 LatSP 0.000000 LonSP 0.000000
      North Pole (400 x 360) Dx 3.000000 Dy 3.000000 scan 64 mode 136
  min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0

So this data is encoded as center number 7, subcenter 0, and parameter
table version number 129.

I see that you're using MET version 5.2, so I looked in the ascii
table
file:
   met-5.2/share/met/table_files/grib1_ncep_129_7.txt

The entry for GRIB code 236 in that file is the following:
236 129 7 -1 "MXUPHL" "Hourly Maximum of Updraft Helicity over layer
2km to
5 km AGL" "m^2/s^2"

Ran the following plot_data_plane command to get MET to read this
record:

/usr/local/met-5.2/bin/plot_data_plane \
   WRFPRS_d01.24 WRFPRS_d01.24.ps \
   'name="MXUPHL"; level="L50-20"; GRIB1_ptv=129;'

The part that's very confusing is setting the level as "L50-20"!  I
did
that because that's the prescribed units for level type 106, as listed
in
this table:
   http://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html

wgrib has logic to convert those to "hecto-meters" to "meters" and
report
them out that way.  But MET is just looking for the level values as
encoded
in the file with no unit conversion being done.

Hopefully that helps.

One other key point is that the data you sent is actually all 0's, as
shown
in the output of wgrib:
   min/max data 0 0

And you'll also see that in the plot created by plot_data_plane.

So that's something you should look into.

Thanks,
John


On Thu, Aug 17, 2017 at 3:39 AM, zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
>
> John,
>   I am sorry that I cannot find your last email. Perhaps I have
delete it
> by accident.
>   I attached a UPP file. The size of the file is about 2.2Mb. Please
see
> if you can open this one correctly.
>   Thanks,
>
>
> Jiangshan
>
>
> > -----原始邮件-----
> > 发件人: "John Halley Gotway via RT" <met_help at ucar.edu>
> > 发送时间: 2017年8月10日 星期四
> > 收件人: zhujiangshan at mail.iap.ac.cn
> > 抄送:
> > 主题: Re: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by
> designating a GRIB code for field name
> >
> > Please post a sample GRIB file to our anonymous ftp site following
these
> > instructions:
> >
> > http://www.dtcenter.org/met/users/support/met_help.php#ftp
> >
> > Also please let us know what version of MET you're using and the
last set
> > of patches that have been applied to it.
> >
> > Thanks
> > John
> >
> > On Thu, Aug 10, 2017 at 1:35 AM zhujiangshan via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=81542 >
> > >
> > > John,
> > >   Thank you very much for the help.
> > >   I check the grib data, using “wgrib -V”, and the output is:
> > >
> > > rec 2:230038:date 2016080100 var236 kpds5=236 kpds6=106
kpds7=12820
> > > levels=(50,20) grid=255 5000-2000 m above gnd valid 23-24hr:
> > >   var236=undefined
> > >   timerange 2 P1 23 P2 24 TimeU 1  nx 402 ny 352 GDS grid 3
num_in_ave
> 0
> > > missing 0
> > >   center 7 subcenter 0 process 125 Table 129
> > >   Lambert Conf: Lat1 18.165000 Lon1 107.325000 Lov 113.000000
> > >       Latin1 23.000000 Latin2 23.000000 LatSP 0.000000 LonSP
0.000000
> > >       North Pole (402 x 352) Dx 3.000000 Dy 3.000000 scan 64
mode 136
> > >   min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 0 BinScale 0
> > >
> > > So I use this command:
> > > plot_data_plane WRFPRS_d01.24 cref.ps 'GRIB1_ptv=129;
> > > GRIB1_code=236;level="L5000-2000";'
> > >
> > > However, it outputs:
> > > DEBUG 1: Opening data file: WRFPRS_d01.24
> > > WARNING:
> > > WARNING: MetGrib1DataFile::data_plane() -> No exact match found
for
> > > VarInfo "(null)/L2000-5000" in GRIB file "WRFPRS_d01.24".
> > > WARNING:
> > > ERROR  :
> > > ERROR  : plot_data_plane -> trouble getting field
"GRIB1_ptv=129;
> > > GRIB1_code=236;level="L5000-2000";" from file "WRFPRS_d01.24"
> > > ERROR  :
> > >
> > > I tried the second method,
> > > I copyed the 2 line into a file named GRIB1_local.txt, and
export it as
> > > environmental variable. (I use a bash)
> > > However, it is like this:
> > >
> > > plot_data_plane WRFPRS_d01.24 cref.ps 'name="CREF";level="L5000-
> 2000";'
> > > DEBUG 1: Opening data file: WRFPRS_d01.24
> > > ERROR  :
> > > ERROR  : is_prelim_match() - unrecognized GRIB1 field
abbreviation
> 'CREF'
> > > for table version 129
> > > ERROR  :
> > >
> > > Would you help me with this please?
> > >
> > > Thanks!
> > >
> > > Jiangshan Zhu
> > >
> > >
> > > 发件人: John Halley Gotway via RT
> > > 发送时间: 2017年8月10日 0:11
> > > 收件人: zhujiangshan at mail.iap.ac.cn
> > > 主题: Re: [rt.rap.ucar.edu #81542] How to read forecast into MET
by
> > > designating a GRIB code for field name
> > >
> > > Hello,
> > >
> > > I see that you're having trouble access the CREF variable in
your GRIB
> > > output from UPP.  I obviously see that the GRIB code is 236.
Since you
> > > mentioned the "wgrib" tool and not the "wgrib2" tool, I'll
assume that
> > > you're using GRIB1 output from UPP (and not GRIB2).
> > >
> > > The remaining question is... what parameter table version number
is
> encoded
> > > for this record?  Please run wgrib using the "-V" for verbose
option.
> The
> > > output will look something like this:
> > >
> > > rec 1:0:date 2005080700 APCP kpds5=61 kpds6=1 kpds7=0
levels=(0,0)
> grid=212
> > > sfc 0-12hr acc: bitmap: 9703 undef
> > >   APCP=Total precipitation [kg/m^2]
> > >   timerange 4 P1 0 P2 12 TimeU 1  nx 185 ny 129 GDS grid 3
num_in_ave 0
> > > missing 0
> > >   center 59 subcenter 0 process 89 Table 2 scan: WE:SN
winds(grid)
> > >   Lambert Conf: Lat1 12.190000 Lon1 -133.459000 Lov -95.000000
> > >       Latin1 25.000000 Latin2 25.000000 LatSP 0.000000 LonSP
0.000000
> > >       North Pole (185 x 129) Dx 40.635000 Dy 40.635000 scan 64
mode 8
> > >   min/max data 0 38.883  num bits 16  BDS_Ref 0  DecScale 3
BinScale 0
> > >
> > > Looking at this sample output, notice the line which reads
"Table 2".
> Your
> > > may say "Table 2" or "Table 128" or "Table 129" or something
else.
> > >
> > > Then trying running this MET command to plot your CREF data:
> > >
> > > met-6.0/bin/plot_data_plane \
> > >   grib_file_name cref.ps 'GRIB1_ptv=129; GRIB1_code=236;
> > > level="L5000-2000";'
> > >
> > > Where "grib_file_name" is the name of your GRIB file and instead
of
> "129"
> > > use the table number indicated by wgrib.
> > >
> > > Does that work?
> > >
> > > You also have a second option.  If ultimately you'd like to have
your
> MET
> > > output use the name "CREF", you can create a custom GRIB table
and
> tell MET
> > > where to find it.  Again I'll assume the parameter table version
> number is
> > > 129.  Create a text file that begins with "grib1" and ends with
".txt".
> > > For example, "GRIB1_local.txt" that contains the following 2
lines:
> > > ---------------------------------
> > > GRIB1
> > > 236 129 7 -1 "CREF" "composite reflectivity" "dBZ"
> > > ---------------------------------
> > >
> > > Where 236 is the GRIB number, 129 is the table version number,
and 7
> is the
> > > number of the generating center (this is also included in the
wgrib -V)
> > > output.
> > >
> > > Once you create that file, set an environment variable like
this:
> > > setenv MET_GRIB_TABLES /path/to/GRIB1_local.txt
> > >
> > > And then run plot_data_plane again:
> > > met-6.0/bin/plot_data_plane \
> > >   grib_file_name cref.ps 'name="CREF"; level="L5000-2000";'
> > >
> > > If everything goes smoothly, this command should work too.
> > >
> > > Hope that helps.
> > >
> > > Thanks,
> > > John Halley Gotway
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Wed, Aug 9, 2017 at 3:01 AM, zhujiangshan via RT
<met_help at ucar.edu
> >
> > > wrote:
> > >
> > > >
> > > > Wed Aug 09 03:01:17 2017: Request 81542 was acted upon.
> > > > Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
> > > >        Queue: met_help
> > > >      Subject: How to read forecast into MET by designating a
GRIB
> code
> > > for
> > > > field name
> > > >        Owner: Nobody
> > > >   Requestors: zhujiangshan at mail.iap.ac.cn
> > > >       Status: new
> > > >  Ticket <URL: https://rt.rap.ucar.edu/rt/
> Ticket/Display.html?id=81542 >
> > > >
> > > >
> > > > Dear sir or madam,
> > > >   Hello. I have a question.
> > > >   I am trying to use MET to do verification of composed radar
> > > reflectivity
> > > > (CREF) from WRF output.
> > > >   I used UPP v2.1 to diagnosed the CREF, and the output was
written
> in
> > > > GRIB format. However, the wgrib tool cannot recognize the CREF
Grib
> > > product
> > > > name, and gives an output like:
> > > >   "2:234094:D=2016071900:var236:5000-2000 m above
> > > > gnd:kpds=236,106,12820:valid 11-12hr:"undefined"
> > > >   "2:234094:d=16071900:var236:kpds5=236:kpds6=106:kpds7=
> > > > 12820:TR=2:P1=11:P2=12:TimeU=1:5000-2000 m above gnd:valid
> > > 11-12hr:NAve=0"
> > > >
> > > >
> > > >   I set the config file of MET by using "name=var236;" and
> "name=236;".
> > > >
> > > >     field = [
> > > >         {
> > > >            name       = var236;
> > > >            level      = [ "Z5000-2000" ];
> > > >         }
> > > >      ];
> > > >     field = [
> > > >         {
> > > >            name       = 236;
> > > >            level      = [ "Z5000-2000" ];
> > > >         }
> > > >      ];
> > > >   Both don't work. The output is:
> > > >   "ERROR  : is_prelim_match() - either name or GRIB1_ptv and
> GRIB_code
> > > > must be specified in field information"
> > > >
> > > >
> > > >   The Manual said that a field name can be either a
abbreviation or
> GRIB
> > > > code. However, I didn't find any sample how to set a field
name by a
> GRIB
> > > > code. Would you show me an example how to read this data into
MET
> please?
> > > >
> > > >
> > > >   Thanks!
> > > >
> > > >
> > > > Jiangshan Zhu
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
>
>
>
>

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


More information about the Met_help mailing list