[Met_help] [rt.rap.ucar.edu #60251] History for How to get probability score?

John Halley Gotway via RT met_help at ucar.edu
Wed Feb 13 19:27:32 MST 2013


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

Dear Sir:

          I want to calculate some probability scores, but the default configuration and data for the "point_stat" tool is not for this type, right? Since my ensemble forecasts were from ARPS, I need to convert my forecasts and probability forecast into the MET format. I'm wondering if you could send me a sample configuration and also sample forecast data in grib format (want to know how the MET treat configuration "prob=TRUE", different grib code for probability forecast?). 

           Many thanks!   




kefeng

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

Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
From: John Halley Gotway
Time: Tue Feb 12 10:40:00 2013

kefeng,

The test scripts in the MET tarball already include what you've asked
for.
 The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
verifies a probability of precip forecast using...

This forecast GRIB file:
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212

This Grid-Stat config file:
METv4.0/scripts/config/GridStatConfig_POP_12

Specifying it for Grid-Stat is just about the same as doing it for
Point-Stat.

Just let me know if you have more questions.

Thanks,
John Halley Gotway
met_help at ucar.edu

>
> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
> Transaction: Ticket created by kefeng at ou.edu
>        Queue: met_help
>      Subject: How to get probability score?
>        Owner: Nobody
>   Requestors: kefeng at ou.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
> Dear Sir:
>
>           I want to calculate some probability scores, but the
default
> configuration and data for the "point_stat" tool is not for this
> type, right? Since my ensemble forecasts were from ARPS, I need
> to convert my forecasts and probability forecast into the MET
> format. I'm wondering if you could send me a sample
> configuration and also sample forecast data in grib format (want
> to know how the MET treat configuration "prob=TRUE", different
> grib code for probability forecast?).
>
>            Many thanks!
>
>
>
>
> kefeng
>



------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Tue Feb 12 12:01:18 2013

    
      Thanks for the info.  I should check it fully.
kefeng

From: John Halley Gotway via RT
Date: 2013-02-12 11:40
To:
kefeng at ou.edu
Subject: Re: [rt.rap.ucar.edu #60251] How to get
probability score?
kefeng,

The test scripts in the MET tarball
already include what you've asked for.
 The second call to grid_stat
in METv4.0/scripts/test_grid_stat.sh
verifies a probability of precip
forecast using...

This forecast GRIB file:
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
This Grid-Stat config file:
METv4.0/scripts/config/GridStatConfig_POP_12

Specifying it for
Grid-Stat is just about the same as doing it for
Point-Stat.

Just
let me know if you have more questions.

Thanks,
John Halley Gotway
met_help at ucar.edu

>
> Mon Feb 11 16:12:41 2013: Request 60251 was
acted upon.
> Transaction: Ticket created by kefeng at ou.edu
>
Queue: met_help
>      Subject: How to get probability score?
>
Owner: Nobody
>   Requestors: kefeng at ou.edu
>       Status: new
>
Ticket <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
> Dear Sir:
>
>           I want to calculate some probability
scores, but the default
> configuration and data for the "point_stat"
tool is not for this
> type, right? Since my ensemble forecasts were
from ARPS, I need
> to convert my forecasts and probability forecast
into the MET
> format. I'm wondering if you could send me a sample
>
configuration and also sample forecast data in grib format (want
> to
know how the MET treat configuration "prob=TRUE", different
> grib
code for probability forecast?).
>
>            Many thanks!
>
>
>
>
> kefeng
>

------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Tue Feb 12 13:11:07 2013


      Still have a question. When we calculate the probability, we
used several different thresholds like 0.25 inch, 0.5 inch. If i put
more than one POP field in a file, is that possible MET could handle
it? It seems grib does not store the threshold used for calculating
the probability. I used "GETGBEXM" to see the variable information, no
particular value has been found. Maybe i missed. 

      Thanks!
kefeng

From: John Halley Gotway via RT
Date: 2013-02-12 11:40
To:
kefeng at ou.edu
Subject: Re: [rt.rap.ucar.edu #60251] How to get
probability score?
kefeng,

The test scripts in the MET tarball
already include what you've asked for.
 The second call to grid_stat
in METv4.0/scripts/test_grid_stat.sh
verifies a probability of precip
forecast using...

This forecast GRIB file:
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
This Grid-Stat config file:
METv4.0/scripts/config/GridStatConfig_POP_12

Specifying it for
Grid-Stat is just about the same as doing it for
Point-Stat.

Just
let me know if you have more questions.

Thanks,
John Halley Gotway
met_help at ucar.edu

>
> Mon Feb 11 16:12:41 2013: Request 60251 was
acted upon.
> Transaction: Ticket created by kefeng at ou.edu
>
Queue: met_help
>      Subject: How to get probability score?
>
Owner: Nobody
>   Requestors: kefeng at ou.edu
>       Status: new
>
Ticket <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
> Dear Sir:
>
>           I want to calculate some probability
scores, but the default
> configuration and data for the "point_stat"
tool is not for this
> type, right? Since my ensemble forecasts were
from ARPS, I need
> to convert my forecasts and probability forecast
into the MET
> format. I'm wondering if you could send me a sample
>
configuration and also sample forecast data in grib format (want
> to
know how the MET treat configuration "prob=TRUE", different
> grib
code for probability forecast?).
>
>            Many thanks!
>
>
>
>
> kefeng
>

------------------------------------------------
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability score?
From: John Halley Gotway
Time: Tue Feb 12 22:17:45 2013

kefeng,

Ah yes, good point.  Actually, NCEP has created an extension to the
GRIB1
specification for ensemble and probabilistic products, as described in
appendix C of their documentation:

   http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html

MET is able to parse that probability information in that extended PDS
section.  A good example of this type of data can be seen in the
NCEP's
SREF model data.  Here's a recent probabilistic file from SREF:

   nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2

This is in GRIB2 format, but it can easily be converted from GRIB2 to
GRIB1 using the "cnvgrib" utility.  That'd serve as a good example of
probabilistic data in GRIB1 format that makes use of the extended PDS
section.

If you choose to encode you data is this way, I can help you setting
up
the MET configuration files to extract those fields.

Hope that helps.

John

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
>       Still have a question. When we calculate the probability, we
used
> several different thresholds like 0.25 inch, 0.5 inch. If i put more
> than one POP field in a file, is that possible MET could handle it?
> It seems grib does not store the threshold used for calculating the
> probability. I used "GETGBEXM" to see the variable information, no
> particular value has been found. Maybe i missed.
>
>       Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date: 2013-02-12 11:40
> To: kefeng at ou.edu
> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
> kefeng,
>
> The test scripts in the MET tarball already include what you've
asked for.
>  The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
> verifies a probability of precip forecast using...
>
> This forecast GRIB file:
> METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>
> This Grid-Stat config file:
> METv4.0/scripts/config/GridStatConfig_POP_12
>
> Specifying it for Grid-Stat is just about the same as doing it for
> Point-Stat.
>
> Just let me know if you have more questions.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>>
>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>> Transaction: Ticket created by kefeng at ou.edu
>>        Queue: met_help
>>      Subject: How to get probability score?
>>        Owner: Nobody
>>   Requestors: kefeng at ou.edu
>>       Status: new
>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>> Dear Sir:
>>
>>           I want to calculate some probability scores, but the
default
>> configuration and data for the "point_stat" tool is not for this
>> type, right? Since my ensemble forecasts were from ARPS, I need
>> to convert my forecasts and probability forecast into the MET
>> format. I'm wondering if you could send me a sample
>> configuration and also sample forecast data in grib format (want
>> to know how the MET treat configuration "prob=TRUE", different
>> grib code for probability forecast?).
>>
>>            Many thanks!
>>
>>
>>
>>
>> kefeng
>>
>



------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Tue Feb 12 23:41:22 2013

Hi, John
    
    That make sense. Have a technical question. When i
print the KPDS, i didn't understand the following octet from 36 to
41(with red color).I searched the online table, said it was reserved.
Do you have any table of instruction for those value or i can simply
copy those value?  All are know for the precipitation, it seems the
same but not for sure.   
    
     Probability forecast from
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
7          113          132          128          191
            1
0           13            2           12            9
            0
1           18           24            4            0
            1
2            0           21            1            2
            0
0            0            0            0            0
            0
0            0            0            0            0
     17104896
-12779008           66    426141184            0    352321536
Probability forecast from MET sample data
                         7
183          212          192          193
            1            0
5            8            3           12
            0            1
96          108            3            0
            1            2
0           21            0            5
            0           42
0            0            0            0
            0            0
0            0            0            0
            0            0
0            0            0            0

      Thanks!
kefeng

From: John Halley Gotway via RT
Date: 2013-02-12 23:17
To:
kefeng at ou.edu
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get
probability score?
kefeng,

Ah yes, good point.  Actually, NCEP has
created an extension to the GRIB1
specification for ensemble and
probabilistic products, as described in
appendix C of their
documentation:
http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html

MET is
able to parse that probability information in that extended PDS
section.  A good example of this type of data can be seen in the
NCEP's
SREF model data.  Here's a recent probabilistic file from
SREF:
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
This is in GRIB2 format, but it can easily be converted from GRIB2 to
GRIB1 using the "cnvgrib" utility.  That'd serve as a good example of
probabilistic data in GRIB1 format that makes use of the extended PDS
section.

If you choose to encode you data is this way, I can help
you setting up
the MET configuration files to extract those fields.
Hope that helps.

John

>
> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
>
Still have a question. When we calculate the probability, we used
>
several different thresholds like 0.25 inch, 0.5 inch. If i put more
> than one POP field in a file, is that possible MET could handle it?
> It seems grib does not store the threshold used for calculating the
> probability. I used "GETGBEXM" to see the variable information, no
> particular value has been found. Maybe i missed.
>
>       Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date:
2013-02-12 11:40
> To: kefeng at ou.edu
> Subject: Re: [rt.rap.ucar.edu
#60251] How to get probability score?
> kefeng,
>
> The test
scripts in the MET tarball already include what you've asked for.
>
The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>
verifies a probability of precip forecast using...
>
> This forecast
GRIB file:
>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>
> This Grid-Stat config file:
>
METv4.0/scripts/config/GridStatConfig_POP_12
>
> Specifying it for
Grid-Stat is just about the same as doing it for
> Point-Stat.
>
>
Just let me know if you have more questions.
>
> Thanks,
> John
Halley Gotway
> met_help at ucar.edu
>
>>
>> Mon Feb 11 16:12:41
2013: Request 60251 was acted upon.
>> Transaction: Ticket created by
kefeng at ou.edu
>>        Queue: met_help
>>      Subject: How to get
probability score?
>>        Owner: Nobody
>>   Requestors:
kefeng at ou.edu
>>       Status: new
>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>
Dear Sir:
>>
>>           I want to calculate some probability
scores, but the default
>> configuration and data for the
"point_stat" tool is not for this
>> type, right? Since my ensemble
forecasts were from ARPS, I need
>> to convert my forecasts and
probability forecast into the MET
>> format. I'm wondering if you
could send me a sample
>> configuration and also sample forecast data
in grib format (want
>> to know how the MET treat configuration
"prob=TRUE", different
>> grib code for probability forecast?).
>>
>>            Many thanks!
>>
>>
>>
>>
>> kefeng
>>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
From: John Halley Gotway
Time: Wed Feb 13 08:06:43 2013

kefeng,

Hmmm, those numbers don't make much sense.  Here's what I've done:

# Retrieved that sample GRIB2 file:
wget
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2

# Converted it from GRIB2 to GRIB1:
cnvgrib -g21 sref.t09z.pgrb132.prob_3hrly.grib2
sref.t09z.pgrb132.prob_3hrly.grib

# Extracted a single probability GRIB1 record:
wgrib -o sample_sref_prob.grib -grib -d 436
sref.t09z.pgrb132.prob_3hrly.grib

# Run wgrib to dump information about that record:
wgrib -V -PDS10 sample_sref_prob.grib

And here's the output:

rec 1:0:date 2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0)
grid=255 sfc ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
   PROB=Prob. from ensemble [non-dim]
   timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny 553 GDS grid 3 num_in_ave
0 missing 0
   center 7 subcenter 2 process 113 Table 2 scan: WE:SN winds(grid)
   Lambert Conf: Lat1 1.000000 Lon1 214.500000 Lov 253.000000
       Latin1 50.000000 Latin2 50.000000 LatSP 0.000000 LonSP 0.000000
       North Pole (697 x 553) Dx 16.232000 Dy 16.232000 scan 64 mode 8
   PDS10(1..86)=
        1:   0   0  86   2   7 113 255 128 191   1   0   0  13   2  12
9   0   1   6   9
       21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0   0
0   0   0   0   0
       41:   1   5   0   0 255  61   2   0   0   0   0  65  40 163 215
0   0   0   0   0
       61:  21   0   0   0   0   0   0   0   0   0   0   0   0   0   0
0   0   0   0   0
       81:   0   0   0   0   0   0
   min/max data 0 100  num bits 10  BDS_Ref 0  DecScale 1 BinScale 0

Looking at appendix c of NCEP GRIB1 documentation
(http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html), here's
the relevant information that MET parses:
  - Octet 46 is set to 61, meaning this is a probability for GRIB code
61, or accumulated precipitation (APCP).
  - Octet 47 is set to 2, meaning this is probability of event above
and upper limit.
  - Octets 52-55 are set to 65, 40, 163, and 215, and MET parses those
numbers into the floating point number 2.54.

If you're constructing a GRIB record following these conventions, you
need to set octets 46 - 55 with the probability information.  You also
need to update PDS octets 1-3 to indicate the updated
length of the PDS section.

Hope that helps.

John


On 02/12/2013 11:41 PM, kefeng via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi, John
>
>      That make sense. Have a technical question. When i print the
KPDS, i didn't understand the following octet from 36 to 41(with red
color).I searched the online table, said it was reserved. Do you have
any table of instruction for those value or i can simply copy those
value?  All are know for the precipitation, it seems the same but not
for sure.
>
>       Probability forecast from
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>                           7          113          132          128
191
>              1            0           13            2           12
9
>              0            1           18           24            4
0
>              1            2            0           21            1
2
>              0            0            0            0            0
0
>              0            0            0            0            0
0
>       17104896    -12779008           66    426141184            0
352321536
>
>       Probability forecast from MET sample data
>                           7          183          212          192
193
>              1            0            5            8            3
12
>              0            1           96          108            3
0
>              1            2            0           21            0
5
>              0           42            0            0            0
0
>              0            0            0            0            0
0
>              0            0            0            0            0
0
>
>        Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date: 2013-02-12 23:17
> To: kefeng at ou.edu
> Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
> kefeng,
>
> Ah yes, good point.  Actually, NCEP has created an extension to the
GRIB1
> specification for ensemble and probabilistic products, as described
in
> appendix C of their documentation:
>
>     http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>
> MET is able to parse that probability information in that extended
PDS
> section.  A good example of this type of data can be seen in the
NCEP's
> SREF model data.  Here's a recent probabilistic file from SREF:
>
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> This is in GRIB2 format, but it can easily be converted from GRIB2
to
> GRIB1 using the "cnvgrib" utility.  That'd serve as a good example
of
> probabilistic data in GRIB1 format that makes use of the extended
PDS
> section.
>
> If you choose to encode you data is this way, I can help you setting
up
> the MET configuration files to extract those fields.
>
> Hope that helps.
>
> John
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>        Still have a question. When we calculate the probability, we
used
>> several different thresholds like 0.25 inch, 0.5 inch. If i put
more
>> than one POP field in a file, is that possible MET could handle it?
>> It seems grib does not store the threshold used for calculating the
>> probability. I used "GETGBEXM" to see the variable information, no
>> particular value has been found. Maybe i missed.
>>
>>        Thanks!
>>
>>
>>
>>
>> kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-12 11:40
>> To: kefeng at ou.edu
>> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
>> kefeng,
>>
>> The test scripts in the MET tarball already include what you've
asked for.
>>   The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>> verifies a probability of precip forecast using...
>>
>> This forecast GRIB file:
>> METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>
>> This Grid-Stat config file:
>> METv4.0/scripts/config/GridStatConfig_POP_12
>>
>> Specifying it for Grid-Stat is just about the same as doing it for
>> Point-Stat.
>>
>> Just let me know if you have more questions.
>>
>> Thanks,
>> John Halley Gotway
>> met_help at ucar.edu
>>
>>>
>>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>>> Transaction: Ticket created by kefeng at ou.edu
>>>         Queue: met_help
>>>       Subject: How to get probability score?
>>>         Owner: Nobody
>>>    Requestors: kefeng at ou.edu
>>>        Status: new
>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>> Dear Sir:
>>>
>>>            I want to calculate some probability scores, but the
default
>>> configuration and data for the "point_stat" tool is not for this
>>> type, right? Since my ensemble forecasts were from ARPS, I need
>>> to convert my forecasts and probability forecast into the MET
>>> format. I'm wondering if you could send me a sample
>>> configuration and also sample forecast data in grib format (want
>>> to know how the MET treat configuration "prob=TRUE", different
>>> grib code for probability forecast?).
>>>
>>>             Many thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
From: John Halley Gotway
Time: Wed Feb 13 08:15:08 2013

kefeng,

I should mention that another, much easier, work-around is to just use
GRIB codes that are not currently being used.  For example, you might
pick GRIB codes 198 - 253 in parameter table version number
128.  Then, decide on the special meaning for them.  For example,
maybe you want 198 to mean "PROB(APCP>2.54)".  Then update the GRIB
table information used by MET in
METv4.0/data/table_files/nceptab_flat.txt.

In this example, you'd add the following line:
198 255 "PROB(APCP>2.54)" "Probability of Accumulated Precip > 2.54"
"%"

Then just encode your GRIB record as GRIB code 198 with parameter
table version number 128.  That's a quick and dirty solution to the
problem.

Encoding the information in the extended PDS is a much better
solution, but if you run into problems, there are other options.

Thanks,
John


On 02/12/2013 11:41 PM, kefeng via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi, John
>
>      That make sense. Have a technical question. When i print the
KPDS, i didn't understand the following octet from 36 to 41(with red
color).I searched the online table, said it was reserved. Do you have
any table of instruction for those value or i can simply copy those
value?  All are know for the precipitation, it seems the same but not
for sure.
>
>       Probability forecast from
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>                           7          113          132          128
191
>              1            0           13            2           12
9
>              0            1           18           24            4
0
>              1            2            0           21            1
2
>              0            0            0            0            0
0
>              0            0            0            0            0
0
>       17104896    -12779008           66    426141184            0
352321536
>
>       Probability forecast from MET sample data
>                           7          183          212          192
193
>              1            0            5            8            3
12
>              0            1           96          108            3
0
>              1            2            0           21            0
5
>              0           42            0            0            0
0
>              0            0            0            0            0
0
>              0            0            0            0            0
0
>
>        Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date: 2013-02-12 23:17
> To: kefeng at ou.edu
> Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
> kefeng,
>
> Ah yes, good point.  Actually, NCEP has created an extension to the
GRIB1
> specification for ensemble and probabilistic products, as described
in
> appendix C of their documentation:
>
>     http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>
> MET is able to parse that probability information in that extended
PDS
> section.  A good example of this type of data can be seen in the
NCEP's
> SREF model data.  Here's a recent probabilistic file from SREF:
>
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> This is in GRIB2 format, but it can easily be converted from GRIB2
to
> GRIB1 using the "cnvgrib" utility.  That'd serve as a good example
of
> probabilistic data in GRIB1 format that makes use of the extended
PDS
> section.
>
> If you choose to encode you data is this way, I can help you setting
up
> the MET configuration files to extract those fields.
>
> Hope that helps.
>
> John
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>        Still have a question. When we calculate the probability, we
used
>> several different thresholds like 0.25 inch, 0.5 inch. If i put
more
>> than one POP field in a file, is that possible MET could handle it?
>> It seems grib does not store the threshold used for calculating the
>> probability. I used "GETGBEXM" to see the variable information, no
>> particular value has been found. Maybe i missed.
>>
>>        Thanks!
>>
>>
>>
>>
>> kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-12 11:40
>> To: kefeng at ou.edu
>> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
>> kefeng,
>>
>> The test scripts in the MET tarball already include what you've
asked for.
>>   The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>> verifies a probability of precip forecast using...
>>
>> This forecast GRIB file:
>> METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>
>> This Grid-Stat config file:
>> METv4.0/scripts/config/GridStatConfig_POP_12
>>
>> Specifying it for Grid-Stat is just about the same as doing it for
>> Point-Stat.
>>
>> Just let me know if you have more questions.
>>
>> Thanks,
>> John Halley Gotway
>> met_help at ucar.edu
>>
>>>
>>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>>> Transaction: Ticket created by kefeng at ou.edu
>>>         Queue: met_help
>>>       Subject: How to get probability score?
>>>         Owner: Nobody
>>>    Requestors: kefeng at ou.edu
>>>        Status: new
>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>> Dear Sir:
>>>
>>>            I want to calculate some probability scores, but the
default
>>> configuration and data for the "point_stat" tool is not for this
>>> type, right? Since my ensemble forecasts were from ARPS, I need
>>> to convert my forecasts and probability forecast into the MET
>>> format. I'm wondering if you could send me a sample
>>> configuration and also sample forecast data in grib format (want
>>> to know how the MET treat configuration "prob=TRUE", different
>>> grib code for probability forecast?).
>>>
>>>             Many thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>

------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Wed Feb 13 09:53:08 2013

Hi, John:

      I will try this first. The "wgrib" got the right
information. Therefore, the function i used for decoding may have some
problems. But the fortran decode store the extended PDS in other
arrays. Those weird numbers are probably for the upper and lower limit
and probably useless. I will let you know if i succeed or not.
Thanks!

       



kefeng

From: John Halley Gotway via RT
Date: 2013-02-13 09:06
To: kefeng at ou.edu
Subject: Re:
[rt.rap.ucar.edu #60251] How to get probability score?
kefeng,
Hmmm, those numbers don't make much sense.  Here's what I've done:
# Retrieved that sample GRIB2 file:
wget
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
# Converted it from GRIB2 to GRIB1:
cnvgrib -g21
sref.t09z.pgrb132.prob_3hrly.grib2 sref.t09z.pgrb132.prob_3hrly.grib
# Extracted a single probability GRIB1 record:
wgrib -o
sample_sref_prob.grib -grib -d 436 sref.t09z.pgrb132.prob_3hrly.grib
# Run wgrib to dump information about that record:
wgrib -V -PDS10
sample_sref_prob.grib

And here's the output:

rec 1:0:date
2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0) grid=255 sfc
ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
   PROB=Prob.
from ensemble [non-dim]
   timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny
553 GDS grid 3 num_in_ave 0 missing 0
   center 7 subcenter 2 process
113 Table 2 scan: WE:SN winds(grid)
   Lambert Conf: Lat1 1.000000
Lon1 214.500000 Lov 253.000000
       Latin1 50.000000 Latin2
50.000000 LatSP 0.000000 LonSP 0.000000
       North Pole (697 x 553)
Dx 16.232000 Dy 16.232000 scan 64 mode 8
   PDS10(1..86)=
        1:
0   0  86   2   7 113 255 128 191   1   0   0  13   2  12   9   0   1
6   9
       21:   4   0   0   0  21   2   0   1   0   0   0   0   0
0   0   0   0   0   0   0
       41:   1   5   0   0 255  61   2   0
0   0   0  65  40 163 215   0   0   0   0   0
       61:  21   0   0
0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
81:   0   0   0   0   0   0
   min/max data 0 100  num bits 10
BDS_Ref 0  DecScale 1 BinScale 0

Looking at appendix c of NCEP
GRIB1 documentation
(http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html), here's
the relevant information that MET parses:
  - Octet 46 is set to 61,
meaning this is a probability for GRIB code 61, or accumulated
precipitation (APCP).
  - Octet 47 is set to 2, meaning this is
probability of event above and upper limit.
  - Octets 52-55 are set
to 65, 40, 163, and 215, and MET parses those numbers into the
floating point number 2.54.

If you're constructing a GRIB record
following these conventions, you need to set octets 46 - 55 with the
probability information.  You also need to update PDS octets 1-3 to
indicate the updated 
length of the PDS section.

Hope that helps.
John


On 02/12/2013 11:41 PM, kefeng via RT wrote:
>
> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi,
John
>
>      That make sense. Have a technical question. When i
print the KPDS, i didn't understand the following octet from 36 to
41(with red color).I searched the online table, said it was reserved.
Do you have any table of instruction for those value or i can simply
copy those value?  All are know for the precipitation, it seems the
same but not for sure.
>
>       Probability forecast from
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>                           7          113          132          128
191
>              1            0           13            2
12            9
>              0            1           18
24            4            0
>              1            2
0           21            1            2
>              0
0            0            0            0            0
>
0            0            0            0            0            0
>
17104896    -12779008           66    426141184            0
352321536
>
>       Probability forecast from MET sample data
>
7          183          212          192          193
>
1            0            5            8            3           12
>
0            1           96          108            3            0
>
1            2            0           21            0            5
>
0           42            0            0            0            0
>
0            0            0            0            0            0
>
0            0            0            0            0            0
>
>        Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway
via RT
> Date: 2013-02-12 23:17
> To: kefeng at ou.edu
> Subject: Re:
Re: [rt.rap.ucar.edu #60251] How to get probability score?
> kefeng,
>
> Ah yes, good point.  Actually, NCEP has created an extension to
the GRIB1
> specification for ensemble and probabilistic products, as
described in
> appendix C of their documentation:
>
>
http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>
> MET
is able to parse that probability information in that extended PDS
>
section.  A good example of this type of data can be seen in the
NCEP's
> SREF model data.  Here's a recent probabilistic file from
SREF:
>
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> This is in GRIB2 format, but it can easily be converted from
GRIB2 to
> GRIB1 using the "cnvgrib" utility.  That'd serve as a good
example of
> probabilistic data in GRIB1 format that makes use of the
extended PDS
> section.
>
> If you choose to encode you data is
this way, I can help you setting up
> the MET configuration files to
extract those fields.
>
> Hope that helps.
>
> John
>
>>
>>
<URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>        Still have a question. When we calculate the
probability, we used
>> several different thresholds like 0.25 inch,
0.5 inch. If i put more
>> than one POP field in a file, is that
possible MET could handle it?
>> It seems grib does not store the
threshold used for calculating the
>> probability. I used "GETGBEXM"
to see the variable information, no
>> particular value has been
found. Maybe i missed.
>>
>>        Thanks!
>>
>>
>>
>>
>>
kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-12
11:40
>> To: kefeng at ou.edu
>> Subject: Re: [rt.rap.ucar.edu #60251]
How to get probability score?
>> kefeng,
>>
>> The test scripts in
the MET tarball already include what you've asked for.
>>   The
second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>>
verifies a probability of precip forecast using...
>>
>> This
forecast GRIB file:
>>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>
>> This Grid-Stat config file:
>>
METv4.0/scripts/config/GridStatConfig_POP_12
>>
>> Specifying it for
Grid-Stat is just about the same as doing it for
>> Point-Stat.
>>
>> Just let me know if you have more questions.
>>
>> Thanks,
>>
John Halley Gotway
>> met_help at ucar.edu
>>
>>>
>>> Mon Feb 11
16:12:41 2013: Request 60251 was acted upon.
>>> Transaction: Ticket
created by kefeng at ou.edu
>>>         Queue: met_help
>>>
Subject: How to get probability score?
>>>         Owner: Nobody
>>>
Requestors: kefeng at ou.edu
>>>        Status: new
>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>> Dear Sir:
>>>
>>>            I want to calculate some
probability scores, but the default
>>> configuration and data for
the "point_stat" tool is not for this
>>> type, right? Since my
ensemble forecasts were from ARPS, I need
>>> to convert my forecasts
and probability forecast into the MET
>>> format. I'm wondering if
you could send me a sample
>>> configuration and also sample forecast
data in grib format (want
>>> to know how the MET treat configuration
"prob=TRUE", different
>>> grib code for probability forecast?).
>>>
>>>             Many thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>

------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Wed Feb 13 12:50:09 2013

Hi, John:
 
     I have almost completed the encoding. Could you
send me a sample configuration you mentioned? 

     Thanks!
kefeng

From: John Halley Gotway via RT
Date: 2013-02-12 23:17
To:
kefeng at ou.edu
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get
probability score?
kefeng,

Ah yes, good point.  Actually, NCEP has
created an extension to the GRIB1
specification for ensemble and
probabilistic products, as described in
appendix C of their
documentation:
http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html

MET is
able to parse that probability information in that extended PDS
section.  A good example of this type of data can be seen in the
NCEP's
SREF model data.  Here's a recent probabilistic file from
SREF:
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
This is in GRIB2 format, but it can easily be converted from GRIB2 to
GRIB1 using the "cnvgrib" utility.  That'd serve as a good example of
probabilistic data in GRIB1 format that makes use of the extended PDS
section.

If you choose to encode you data is this way, I can help
you setting up
the MET configuration files to extract those fields.
Hope that helps.

John

>
> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
>
>
Still have a question. When we calculate the probability, we used
>
several different thresholds like 0.25 inch, 0.5 inch. If i put more
> than one POP field in a file, is that possible MET could handle it?
> It seems grib does not store the threshold used for calculating the
> probability. I used "GETGBEXM" to see the variable information, no
> particular value has been found. Maybe i missed.
>
>       Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date:
2013-02-12 11:40
> To: kefeng at ou.edu
> Subject: Re: [rt.rap.ucar.edu
#60251] How to get probability score?
> kefeng,
>
> The test
scripts in the MET tarball already include what you've asked for.
>
The second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>
verifies a probability of precip forecast using...
>
> This forecast
GRIB file:
>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>
> This Grid-Stat config file:
>
METv4.0/scripts/config/GridStatConfig_POP_12
>
> Specifying it for
Grid-Stat is just about the same as doing it for
> Point-Stat.
>
>
Just let me know if you have more questions.
>
> Thanks,
> John
Halley Gotway
> met_help at ucar.edu
>
>>
>> Mon Feb 11 16:12:41
2013: Request 60251 was acted upon.
>> Transaction: Ticket created by
kefeng at ou.edu
>>        Queue: met_help
>>      Subject: How to get
probability score?
>>        Owner: Nobody
>>   Requestors:
kefeng at ou.edu
>>       Status: new
>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>
Dear Sir:
>>
>>           I want to calculate some probability
scores, but the default
>> configuration and data for the
"point_stat" tool is not for this
>> type, right? Since my ensemble
forecasts were from ARPS, I need
>> to convert my forecasts and
probability forecast into the MET
>> format. I'm wondering if you
could send me a sample
>> configuration and also sample forecast data
in grib format (want
>> to know how the MET treat configuration
"prob=TRUE", different
>> grib code for probability forecast?).
>>
>>            Many thanks!
>>
>>
>>
>>
>> kefeng
>>
>

------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Wed Feb 13 14:14:29 2013

Hi, John:
    
      Those weird numbers are the upper limit value.
The fortran decoding read them but did not use it. Therefore,
displayed weird numbers. The actual value of those numbers are decoded
correctly but stored in another array (xprob). Anyway, i used wgrib
see the data produced by myself. It seems normal. I'm ready to test.
rec 12:22382100:date 2012072100 PROB kpds5=191 kpds6=1 kpds7=0
levels=(0,0) grid=255 sfc prob(APCP>200.000000) 0-24hr acc:
PROB=Prob. from ensemble [non-dim]
    timerange 4 P1 0 P2 24 TimeU 1
nx 1503 ny 1103 GDS grid 3 num_in_ave 0 missing 0
    center 7
subcenter 2 process 116 Table 2
      Lambert Conf: Lat1 12.349000
Lon1 81.231000 Lov 110.000000
      Latin1 35.000000 Latin2 40.000000
LatSP 0.000000 LonSP 0.000000
      North Pole (1503 x 1103) Dx
4.000000 Dy 4.000000 scan 64 mode 8
  PDS10(1..86)=
       1:   0
0  86   2   7 116 255 128 191   1   0   0  12   7  21   0   0   1   0
24
      21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0
0   0   0   0   0   0
      41:   1   5   0   0 255  61   2   0   0
0   0  66 200   0   0   0   0   0   0   0
      61:  22   0   0   0
0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
81:   0   0   0   0   0   0
  min/max data 0 31.8  num bits 9
BDS_Ref 0  DecScale 1 BinScale 0
  




kefeng

From: John
Halley Gotway via RT
Date: 2013-02-13 09:06
To: kefeng at ou.edu
Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
kefeng,

Hmmm, those numbers don't make much sense.  Here's what
I've done:

# Retrieved that sample GRIB2 file:
wget
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
# Converted it from GRIB2 to GRIB1:
cnvgrib -g21
sref.t09z.pgrb132.prob_3hrly.grib2 sref.t09z.pgrb132.prob_3hrly.grib
# Extracted a single probability GRIB1 record:
wgrib -o
sample_sref_prob.grib -grib -d 436 sref.t09z.pgrb132.prob_3hrly.grib
# Run wgrib to dump information about that record:
wgrib -V -PDS10
sample_sref_prob.grib

And here's the output:

rec 1:0:date
2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0) grid=255 sfc
ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
   PROB=Prob.
from ensemble [non-dim]
   timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny
553 GDS grid 3 num_in_ave 0 missing 0
   center 7 subcenter 2 process
113 Table 2 scan: WE:SN winds(grid)
   Lambert Conf: Lat1 1.000000
Lon1 214.500000 Lov 253.000000
       Latin1 50.000000 Latin2
50.000000 LatSP 0.000000 LonSP 0.000000
       North Pole (697 x 553)
Dx 16.232000 Dy 16.232000 scan 64 mode 8
   PDS10(1..86)=
        1:
0   0  86   2   7 113 255 128 191   1   0   0  13   2  12   9   0   1
6   9
       21:   4   0   0   0  21   2   0   1   0   0   0   0   0
0   0   0   0   0   0   0
       41:   1   5   0   0 255  61   2   0
0   0   0  65  40 163 215   0   0   0   0   0
       61:  21   0   0
0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
81:   0   0   0   0   0   0
   min/max data 0 100  num bits 10
BDS_Ref 0  DecScale 1 BinScale 0

Looking at appendix c of NCEP
GRIB1 documentation
(http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html), here's
the relevant information that MET parses:
  - Octet 46 is set to 61,
meaning this is a probability for GRIB code 61, or accumulated
precipitation (APCP).
  - Octet 47 is set to 2, meaning this is
probability of event above and upper limit.
  - Octets 52-55 are set
to 65, 40, 163, and 215, and MET parses those numbers into the
floating point number 2.54.

If you're constructing a GRIB record
following these conventions, you need to set octets 46 - 55 with the
probability information.  You also need to update PDS octets 1-3 to
indicate the updated 
length of the PDS section.

Hope that helps.
John


On 02/12/2013 11:41 PM, kefeng via RT wrote:
>
> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi,
John
>
>      That make sense. Have a technical question. When i
print the KPDS, i didn't understand the following octet from 36 to
41(with red color).I searched the online table, said it was reserved.
Do you have any table of instruction for those value or i can simply
copy those value?  All are know for the precipitation, it seems the
same but not for sure.
>
>       Probability forecast from
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>                           7          113          132          128
191
>              1            0           13            2
12            9
>              0            1           18
24            4            0
>              1            2
0           21            1            2
>              0
0            0            0            0            0
>
0            0            0            0            0            0
>
17104896    -12779008           66    426141184            0
352321536
>
>       Probability forecast from MET sample data
>
7          183          212          192          193
>
1            0            5            8            3           12
>
0            1           96          108            3            0
>
1            2            0           21            0            5
>
0           42            0            0            0            0
>
0            0            0            0            0            0
>
0            0            0            0            0            0
>
>        Thanks!
>
>
>
>
> kefeng
>
> From: John Halley Gotway
via RT
> Date: 2013-02-12 23:17
> To: kefeng at ou.edu
> Subject: Re:
Re: [rt.rap.ucar.edu #60251] How to get probability score?
> kefeng,
>
> Ah yes, good point.  Actually, NCEP has created an extension to
the GRIB1
> specification for ensemble and probabilistic products, as
described in
> appendix C of their documentation:
>
>
http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>
> MET
is able to parse that probability information in that extended PDS
>
section.  A good example of this type of data can be seen in the
NCEP's
> SREF model data.  Here's a recent probabilistic file from
SREF:
>
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> This is in GRIB2 format, but it can easily be converted from
GRIB2 to
> GRIB1 using the "cnvgrib" utility.  That'd serve as a good
example of
> probabilistic data in GRIB1 format that makes use of the
extended PDS
> section.
>
> If you choose to encode you data is
this way, I can help you setting up
> the MET configuration files to
extract those fields.
>
> Hope that helps.
>
> John
>
>>
>>
<URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>>
>>        Still have a question. When we calculate the
probability, we used
>> several different thresholds like 0.25 inch,
0.5 inch. If i put more
>> than one POP field in a file, is that
possible MET could handle it?
>> It seems grib does not store the
threshold used for calculating the
>> probability. I used "GETGBEXM"
to see the variable information, no
>> particular value has been
found. Maybe i missed.
>>
>>        Thanks!
>>
>>
>>
>>
>>
kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-12
11:40
>> To: kefeng at ou.edu
>> Subject: Re: [rt.rap.ucar.edu #60251]
How to get probability score?
>> kefeng,
>>
>> The test scripts in
the MET tarball already include what you've asked for.
>>   The
second call to grid_stat in METv4.0/scripts/test_grid_stat.sh
>>
verifies a probability of precip forecast using...
>>
>> This
forecast GRIB file:
>>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>
>> This Grid-Stat config file:
>>
METv4.0/scripts/config/GridStatConfig_POP_12
>>
>> Specifying it for
Grid-Stat is just about the same as doing it for
>> Point-Stat.
>>
>> Just let me know if you have more questions.
>>
>> Thanks,
>>
John Halley Gotway
>> met_help at ucar.edu
>>
>>>
>>> Mon Feb 11
16:12:41 2013: Request 60251 was acted upon.
>>> Transaction: Ticket
created by kefeng at ou.edu
>>>         Queue: met_help
>>>
Subject: How to get probability score?
>>>         Owner: Nobody
>>>
Requestors: kefeng at ou.edu
>>>        Status: new
>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>> Dear Sir:
>>>
>>>            I want to calculate some
probability scores, but the default
>>> configuration and data for
the "point_stat" tool is not for this
>>> type, right? Since my
ensemble forecasts were from ARPS, I need
>>> to convert my forecasts
and probability forecast into the MET
>>> format. I'm wondering if
you could send me a sample
>>> configuration and also sample forecast
data in grib format (want
>>> to know how the MET treat configuration
"prob=TRUE", different
>>> grib code for probability forecast?).
>>>
>>>             Many thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>

------------------------------------------------
Subject: How to get probability score?
From: John Halley Gotway
Time: Wed Feb 13 15:18:50 2013

kefeng,

I've attached a tar file that contains an example.  I pulled some
StageIV
precipitation data for the sample SREF data I mentioned.  Then I
regridded
both to NCEP Grid 212, just to make the sample data smaller.

Then I ran Grid-Stat using the config file in the tarball.  The
important
part is shown below.  The "prob" dictionary specifies how the
probability
is defined.  This example uses a single threshold value, but if your
probability is defined between an upper and lower threshold, you'd
define
both "thresh_lo" and "thresh_hi" in the config file:

fcst = {
   wind_thresh = [ NA ];

   field = [
      {
         name       = "PROB";
         level      = "A3";
         cat_thresh = [ >=0.00, >=0.25, >=0.50, >=0.75, >=1.00 ];
         prob       = { name = "APCP"; thresh_lo = 2.54; };
      }
   ];
};

Just let me know if you have questions.

Thanks,
John

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi, John:
>
>       Those weird numbers are the upper limit value. The fortran
decoding
> read them but did not use it. Therefore, displayed weird numbers.
> The actual value of those numbers are decoded correctly but stored
> in another array (xprob). Anyway, i used wgrib see the data produced
> by myself. It seems normal. I'm ready to test.
>
>
>     rec 12:22382100:date 2012072100 PROB kpds5=191 kpds6=1 kpds7=0
> levels=(0,0) grid=255 sfc prob(APCP>200.000000) 0-24hr acc:
>     PROB=Prob. from ensemble [non-dim]
>     timerange 4 P1 0 P2 24 TimeU 1  nx 1503 ny 1103 GDS grid 3
num_in_ave
> 0 missing 0
>     center 7 subcenter 2 process 116 Table 2
>       Lambert Conf: Lat1 12.349000 Lon1 81.231000 Lov 110.000000
>       Latin1 35.000000 Latin2 40.000000 LatSP 0.000000 LonSP
0.000000
>       North Pole (1503 x 1103) Dx 4.000000 Dy 4.000000 scan 64 mode
8
>   PDS10(1..86)=
>        1:   0   0  86   2   7 116 255 128 191   1   0   0  12   7
21   0
>  0   1   0  24
>       21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0
0   0
>  0   0   0   0
>       41:   1   5   0   0 255  61   2   0   0   0   0  66 200   0
0   0
>  0   0   0   0
>       61:  22   0   0   0   0   0   0   0   0   0   0   0   0   0
0   0
>  0   0   0   0
>       81:   0   0   0   0   0   0
>   min/max data 0 31.8  num bits 9  BDS_Ref 0  DecScale 1 BinScale 0
>
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date: 2013-02-13 09:06
> To: kefeng at ou.edu
> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
> kefeng,
>
> Hmmm, those numbers don't make much sense.  Here's what I've done:
>
> # Retrieved that sample GRIB2 file:
> wget
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> # Converted it from GRIB2 to GRIB1:
> cnvgrib -g21 sref.t09z.pgrb132.prob_3hrly.grib2
> sref.t09z.pgrb132.prob_3hrly.grib
>
> # Extracted a single probability GRIB1 record:
> wgrib -o sample_sref_prob.grib -grib -d 436
> sref.t09z.pgrb132.prob_3hrly.grib
>
> # Run wgrib to dump information about that record:
> wgrib -V -PDS10 sample_sref_prob.grib
>
> And here's the output:
>
> rec 1:0:date 2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0)
> grid=255 sfc ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
>    PROB=Prob. from ensemble [non-dim]
>    timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny 553 GDS grid 3
num_in_ave 0
> missing 0
>    center 7 subcenter 2 process 113 Table 2 scan: WE:SN winds(grid)
>    Lambert Conf: Lat1 1.000000 Lon1 214.500000 Lov 253.000000
>        Latin1 50.000000 Latin2 50.000000 LatSP 0.000000 LonSP
0.000000
>        North Pole (697 x 553) Dx 16.232000 Dy 16.232000 scan 64 mode
8
>    PDS10(1..86)=
>         1:   0   0  86   2   7 113 255 128 191   1   0   0  13   2
12   9
>   0   1   6   9
>        21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0
0   0
>   0   0   0   0
>        41:   1   5   0   0 255  61   2   0   0   0   0  65  40 163
215   0
>   0   0   0   0
>        61:  21   0   0   0   0   0   0   0   0   0   0   0   0   0
0   0
>   0   0   0   0
>        81:   0   0   0   0   0   0
>    min/max data 0 100  num bits 10  BDS_Ref 0  DecScale 1 BinScale 0
>
> Looking at appendix c of NCEP GRIB1 documentation
> (http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html), here's
the
> relevant information that MET parses:
>   - Octet 46 is set to 61, meaning this is a probability for GRIB
code 61,
> or accumulated precipitation (APCP).
>   - Octet 47 is set to 2, meaning this is probability of event above
and
> upper limit.
>   - Octets 52-55 are set to 65, 40, 163, and 215, and MET parses
those
> numbers into the floating point number 2.54.
>
> If you're constructing a GRIB record following these conventions,
you need
> to set octets 46 - 55 with the probability information.  You also
need to
> update PDS octets 1-3 to indicate the updated
> length of the PDS section.
>
> Hope that helps.
>
> John
>
>
> On 02/12/2013 11:41 PM, kefeng via RT wrote:
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>> Hi, John
>>
>>      That make sense. Have a technical question. When i print the
KPDS,
>> i didn't understand the following octet from 36 to 41(with red
>> color).I searched the online table, said it was reserved. Do you
>> have any table of instruction for those value or i can simply copy
>> those value?  All are know for the precipitation, it seems the same
>> but not for sure.
>>
>>       Probability forecast from
>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>>                           7          113          132          128
>>    191
>>              1            0           13            2           12
>>      9
>>              0            1           18           24            4
>>      0
>>              1            2            0           21            1
>>      2
>>              0            0            0            0            0
>>      0
>>              0            0            0            0            0
>>      0
>>       17104896    -12779008           66    426141184            0
>> 352321536
>>
>>       Probability forecast from MET sample data
>>                           7          183          212          192
>>    193
>>              1            0            5            8            3
>>     12
>>              0            1           96          108            3
>>      0
>>              1            2            0           21            0
>>      5
>>              0           42            0            0            0
>>      0
>>              0            0            0            0            0
>>      0
>>              0            0            0            0            0
>>      0
>>
>>        Thanks!
>>
>>
>>
>>
>> kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-12 23:17
>> To: kefeng at ou.edu
>> Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
>> kefeng,
>>
>> Ah yes, good point.  Actually, NCEP has created an extension to the
>> GRIB1
>> specification for ensemble and probabilistic products, as described
in
>> appendix C of their documentation:
>>
>>     http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>>
>> MET is able to parse that probability information in that extended
PDS
>> section.  A good example of this type of data can be seen in the
NCEP's
>> SREF model data.  Here's a recent probabilistic file from SREF:
>>
>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>>
>> This is in GRIB2 format, but it can easily be converted from GRIB2
to
>> GRIB1 using the "cnvgrib" utility.  That'd serve as a good example
of
>> probabilistic data in GRIB1 format that makes use of the extended
PDS
>> section.
>>
>> If you choose to encode you data is this way, I can help you
setting up
>> the MET configuration files to extract those fields.
>>
>> Hope that helps.
>>
>> John
>>
>>>
>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>>        Still have a question. When we calculate the probability,
we
>>> used
>>> several different thresholds like 0.25 inch, 0.5 inch. If i put
more
>>> than one POP field in a file, is that possible MET could handle
it?
>>> It seems grib does not store the threshold used for calculating
the
>>> probability. I used "GETGBEXM" to see the variable information, no
>>> particular value has been found. Maybe i missed.
>>>
>>>        Thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>> From: John Halley Gotway via RT
>>> Date: 2013-02-12 11:40
>>> To: kefeng at ou.edu
>>> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
>>> kefeng,
>>>
>>> The test scripts in the MET tarball already include what you've
asked
>>> for.
>>>   The second call to grid_stat in
METv4.0/scripts/test_grid_stat.sh
>>> verifies a probability of precip forecast using...
>>>
>>> This forecast GRIB file:
>>>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>>
>>> This Grid-Stat config file:
>>> METv4.0/scripts/config/GridStatConfig_POP_12
>>>
>>> Specifying it for Grid-Stat is just about the same as doing it for
>>> Point-Stat.
>>>
>>> Just let me know if you have more questions.
>>>
>>> Thanks,
>>> John Halley Gotway
>>> met_help at ucar.edu
>>>
>>>>
>>>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>>>> Transaction: Ticket created by kefeng at ou.edu
>>>>         Queue: met_help
>>>>       Subject: How to get probability score?
>>>>         Owner: Nobody
>>>>    Requestors: kefeng at ou.edu
>>>>        Status: new
>>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251
>>>> >
>>>>
>>>>
>>>> Dear Sir:
>>>>
>>>>            I want to calculate some probability scores, but the
>>>> default
>>>> configuration and data for the "point_stat" tool is not for this
>>>> type, right? Since my ensemble forecasts were from ARPS, I need
>>>> to convert my forecasts and probability forecast into the MET
>>>> format. I'm wondering if you could send me a sample
>>>> configuration and also sample forecast data in grib format (want
>>>> to know how the MET treat configuration "prob=TRUE", different
>>>> grib code for probability forecast?).
>>>>
>>>>             Many thanks!
>>>>
>>>>
>>>>
>>>>
>>>> kefeng
>>>>
>>>
>

------------------------------------------------
Subject: How to get probability score?
From: kefeng
Time: Wed Feb 13 15:51:50 2013

Hi, John:
 
       MET successfully reads in the data i produced. It
seems work all right.  
 
       Thanks for all your help!
kefeng

From: John Halley Gotway via RT
Date: 2013-02-13 16:18
To:
kefeng at ou.edu
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get
probability score?
kefeng,

I've attached a tar file that contains
an example.  I pulled some StageIV
precipitation data for the sample
SREF data I mentioned.  Then I regridded
both to NCEP Grid 212, just
to make the sample data smaller.

Then I ran Grid-Stat using the
config file in the tarball.  The important
part is shown below.  The
"prob" dictionary specifies how the probability
is defined.  This
example uses a single threshold value, but if your
probability is
defined between an upper and lower threshold, you'd define
both
"thresh_lo" and "thresh_hi" in the config file:

fcst = {
wind_thresh = [ NA ];

   field = [
      {
         name       =
"PROB";
         level      = "A3";
         cat_thresh = [ >=0.00,
>=0.25, >=0.50, >=0.75, >=1.00 ];
         prob       = { name =
"APCP"; thresh_lo = 2.54; };
      }
   ];
};

Just let me know
if you have questions.

Thanks,
John

>
> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi,
John:
>
>       Those weird numbers are the upper limit value. The
fortran decoding
> read them but did not use it. Therefore, displayed
weird numbers.
> The actual value of those numbers are decoded
correctly but stored
> in another array (xprob). Anyway, i used wgrib
see the data produced
> by myself. It seems normal. I'm ready to
test.
>
>
>     rec 12:22382100:date 2012072100 PROB kpds5=191
kpds6=1 kpds7=0
> levels=(0,0) grid=255 sfc prob(APCP>200.000000) 0-
24hr acc:
>     PROB=Prob. from ensemble [non-dim]
>     timerange 4
P1 0 P2 24 TimeU 1  nx 1503 ny 1103 GDS grid 3 num_in_ave
> 0 missing
0
>     center 7 subcenter 2 process 116 Table 2
>       Lambert
Conf: Lat1 12.349000 Lon1 81.231000 Lov 110.000000
>       Latin1
35.000000 Latin2 40.000000 LatSP 0.000000 LonSP 0.000000
>
North Pole (1503 x 1103) Dx 4.000000 Dy 4.000000 scan 64 mode 8
>
PDS10(1..86)=
>        1:   0   0  86   2   7 116 255 128 191   1   0
0  12   7  21   0
>  0   1   0  24
>       21:   4   0   0   0  21
2   0   1   0   0   0   0   0   0   0   0
>  0   0   0   0
>
41:   1   5   0   0 255  61   2   0   0   0   0  66 200   0   0   0
>
0   0   0   0
>       61:  22   0   0   0   0   0   0   0   0   0   0
0   0   0   0   0
>  0   0   0   0
>       81:   0   0   0   0   0
0
>   min/max data 0 31.8  num bits 9  BDS_Ref 0  DecScale 1 BinScale
0
>
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
>
Date: 2013-02-13 09:06
> To: kefeng at ou.edu
> Subject: Re:
[rt.rap.ucar.edu #60251] How to get probability score?
> kefeng,
>
> Hmmm, those numbers don't make much sense.  Here's what I've done:
>
> # Retrieved that sample GRIB2 file:
> wget
>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>
> # Converted it from GRIB2 to GRIB1:
> cnvgrib -g21
sref.t09z.pgrb132.prob_3hrly.grib2
>
sref.t09z.pgrb132.prob_3hrly.grib
>
> # Extracted a single
probability GRIB1 record:
> wgrib -o sample_sref_prob.grib -grib -d
436
> sref.t09z.pgrb132.prob_3hrly.grib
>
> # Run wgrib to dump
information about that record:
> wgrib -V -PDS10
sample_sref_prob.grib
>
> And here's the output:
>
> rec 1:0:date
2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0)
> grid=255 sfc
ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
>    PROB=Prob.
from ensemble [non-dim]
>    timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny
553 GDS grid 3 num_in_ave 0
> missing 0
>    center 7 subcenter 2
process 113 Table 2 scan: WE:SN winds(grid)
>    Lambert Conf: Lat1
1.000000 Lon1 214.500000 Lov 253.000000
>        Latin1 50.000000
Latin2 50.000000 LatSP 0.000000 LonSP 0.000000
>        North Pole
(697 x 553) Dx 16.232000 Dy 16.232000 scan 64 mode 8
>
PDS10(1..86)=
>         1:   0   0  86   2   7 113 255 128 191   1
0   0  13   2  12   9
>   0   1   6   9
>        21:   4   0   0   0
21   2   0   1   0   0   0   0   0   0   0   0
>   0   0   0   0
>
41:   1   5   0   0 255  61   2   0   0   0   0  65  40 163 215   0
>
0   0   0   0
>        61:  21   0   0   0   0   0   0   0   0   0
0   0   0   0   0   0
>   0   0   0   0
>        81:   0   0   0   0
0   0
>    min/max data 0 100  num bits 10  BDS_Ref 0  DecScale 1
BinScale 0
>
> Looking at appendix c of NCEP GRIB1 documentation
>
(http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html), here's
the
> relevant information that MET parses:
>   - Octet 46 is set to
61, meaning this is a probability for GRIB code 61,
> or accumulated
precipitation (APCP).
>   - Octet 47 is set to 2, meaning this is
probability of event above and
> upper limit.
>   - Octets 52-55 are
set to 65, 40, 163, and 215, and MET parses those
> numbers into the
floating point number 2.54.
>
> If you're constructing a GRIB record
following these conventions, you need
> to set octets 46 - 55 with
the probability information.  You also need to
> update PDS octets 1-
3 to indicate the updated
> length of the PDS section.
>
> Hope
that helps.
>
> John
>
>
> On 02/12/2013 11:41 PM, kefeng via RT
wrote:
>>
>> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>> Hi,
John
>>
>>      That make sense. Have a technical question. When i
print the KPDS,
>> i didn't understand the following octet from 36 to
41(with red
>> color).I searched the online table, said it was
reserved. Do you
>> have any table of instruction for those value or
i can simply copy
>> those value?  All are know for the
precipitation, it seems the same
>> but not for sure.
>>
>>
Probability forecast from
>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>>                           7          113          132          128
>>    191
>>              1            0           13            2
12
>>      9
>>              0            1           18
24            4
>>      0
>>              1            2
0           21            1
>>      2
>>              0            0
0            0            0
>>      0
>>              0            0
0            0            0
>>      0
>>       17104896    -12779008
66    426141184            0
>> 352321536
>>
>>       Probability
forecast from MET sample data
>>                           7
183          212          192
>>    193
>>              1
0            5            8            3
>>     12
>>              0
1           96          108            3
>>      0
>>              1
2            0           21            0
>>      5
>>              0
42            0            0            0
>>      0
>>
0            0            0            0            0
>>      0
>>
0            0            0            0            0
>>      0
>>
>>        Thanks!
>>
>>
>>
>>
>> kefeng
>>
>> From: John Halley
Gotway via RT
>> Date: 2013-02-12 23:17
>> To: kefeng at ou.edu
>>
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
>> kefeng,
>>
>> Ah yes, good point.  Actually, NCEP has
created an extension to the
>> GRIB1
>> specification for ensemble
and probabilistic products, as described in
>> appendix C of their
documentation:
>>
>>
http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>>
>> MET
is able to parse that probability information in that extended PDS
>>
section.  A good example of this type of data can be seen in the
NCEP's
>> SREF model data.  Here's a recent probabilistic file from
SREF:
>>
>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>>
>> This is in GRIB2 format, but it can easily be converted from
GRIB2 to
>> GRIB1 using the "cnvgrib" utility.  That'd serve as a
good example of
>> probabilistic data in GRIB1 format that makes use
of the extended PDS
>> section.
>>
>> If you choose to encode you
data is this way, I can help you setting up
>> the MET configuration
files to extract those fields.
>>
>> Hope that helps.
>>
>> John
>>
>>>
>>> <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>>
>>>        Still have a question. When we calculate the probability,
we
>>> used
>>> several different thresholds like 0.25 inch, 0.5
inch. If i put more
>>> than one POP field in a file, is that
possible MET could handle it?
>>> It seems grib does not store the
threshold used for calculating the
>>> probability. I used "GETGBEXM"
to see the variable information, no
>>> particular value has been
found. Maybe i missed.
>>>
>>>        Thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>> From: John Halley Gotway via RT
>>> Date: 2013-
02-12 11:40
>>> To: kefeng at ou.edu
>>> Subject: Re: [rt.rap.ucar.edu
#60251] How to get probability score?
>>> kefeng,
>>>
>>> The test
scripts in the MET tarball already include what you've asked
>>> for.
>>>   The second call to grid_stat in
METv4.0/scripts/test_grid_stat.sh
>>> verifies a probability of
precip forecast using...
>>>
>>> This forecast GRIB file:
>>>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>>
>>> This Grid-Stat config file:
>>>
METv4.0/scripts/config/GridStatConfig_POP_12
>>>
>>> Specifying it
for Grid-Stat is just about the same as doing it for
>>> Point-Stat.
>>>
>>> Just let me know if you have more questions.
>>>
>>>
Thanks,
>>> John Halley Gotway
>>> met_help at ucar.edu
>>>
>>>>
>>>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>>>>
Transaction: Ticket created by kefeng at ou.edu
>>>>         Queue:
met_help
>>>>       Subject: How to get probability score?
>>>>
Owner: Nobody
>>>>    Requestors: kefeng at ou.edu
>>>>        Status:
new
>>>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251
>>>> >
>>>>
>>>>
>>>> Dear Sir:
>>>>
>>>>            I want to calculate some
probability scores, but the
>>>> default
>>>> configuration and data
for the "point_stat" tool is not for this
>>>> type, right? Since my
ensemble forecasts were from ARPS, I need
>>>> to convert my
forecasts and probability forecast into the MET
>>>> format. I'm
wondering if you could send me a sample
>>>> configuration and also
sample forecast data in grib format (want
>>>> to know how the MET
treat configuration "prob=TRUE", different
>>>> grib code for
probability forecast?).
>>>>
>>>>             Many thanks!
>>>>
>>>>
>>>>
>>>>
>>>> kefeng
>>>>
>>>
>

------------------------------------------------
Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability score?
From: John Halley Gotway
Time: Wed Feb 13 19:27:03 2013

That's great.  I'm glad you were able to get it working.

John

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>
> Hi, John:
>
>        MET successfully reads in the data i produced. It seems work
all
> right.
>
>        Thanks for all your help!
>
>
>
>
>
> kefeng
>
> From: John Halley Gotway via RT
> Date: 2013-02-13 16:18
> To: kefeng at ou.edu
> Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
> kefeng,
>
> I've attached a tar file that contains an example.  I pulled some
StageIV
> precipitation data for the sample SREF data I mentioned.  Then I
regridded
> both to NCEP Grid 212, just to make the sample data smaller.
>
> Then I ran Grid-Stat using the config file in the tarball.  The
important
> part is shown below.  The "prob" dictionary specifies how the
probability
> is defined.  This example uses a single threshold value, but if your
> probability is defined between an upper and lower threshold, you'd
define
> both "thresh_lo" and "thresh_hi" in the config file:
>
> fcst = {
>    wind_thresh = [ NA ];
>
>    field = [
>       {
>          name       = "PROB";
>          level      = "A3";
>          cat_thresh = [ >=0.00, >=0.25, >=0.50, >=0.75, >=1.00 ];
>          prob       = { name = "APCP"; thresh_lo = 2.54; };
>       }
>    ];
> };
>
> Just let me know if you have questions.
>
> Thanks,
> John
>
>>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>
>> Hi, John:
>>
>>       Those weird numbers are the upper limit value. The fortran
>> decoding
>> read them but did not use it. Therefore, displayed weird numbers.
>> The actual value of those numbers are decoded correctly but stored
>> in another array (xprob). Anyway, i used wgrib see the data
produced
>> by myself. It seems normal. I'm ready to test.
>>
>>
>>     rec 12:22382100:date 2012072100 PROB kpds5=191 kpds6=1 kpds7=0
>> levels=(0,0) grid=255 sfc prob(APCP>200.000000) 0-24hr acc:
>>     PROB=Prob. from ensemble [non-dim]
>>     timerange 4 P1 0 P2 24 TimeU 1  nx 1503 ny 1103 GDS grid 3
>> num_in_ave
>> 0 missing 0
>>     center 7 subcenter 2 process 116 Table 2
>>       Lambert Conf: Lat1 12.349000 Lon1 81.231000 Lov 110.000000
>>       Latin1 35.000000 Latin2 40.000000 LatSP 0.000000 LonSP
0.000000
>>       North Pole (1503 x 1103) Dx 4.000000 Dy 4.000000 scan 64 mode
8
>>   PDS10(1..86)=
>>        1:   0   0  86   2   7 116 255 128 191   1   0   0  12   7
21
>> 0
>>  0   1   0  24
>>       21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0
0
>> 0
>>  0   0   0   0
>>       41:   1   5   0   0 255  61   2   0   0   0   0  66 200   0
0
>> 0
>>  0   0   0   0
>>       61:  22   0   0   0   0   0   0   0   0   0   0   0   0   0
0
>> 0
>>  0   0   0   0
>>       81:   0   0   0   0   0   0
>>   min/max data 0 31.8  num bits 9  BDS_Ref 0  DecScale 1 BinScale 0
>>
>>
>>
>>
>>
>> kefeng
>>
>> From: John Halley Gotway via RT
>> Date: 2013-02-13 09:06
>> To: kefeng at ou.edu
>> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability score?
>> kefeng,
>>
>> Hmmm, those numbers don't make much sense.  Here's what I've done:
>>
>> # Retrieved that sample GRIB2 file:
>> wget
>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>>
>> # Converted it from GRIB2 to GRIB1:
>> cnvgrib -g21 sref.t09z.pgrb132.prob_3hrly.grib2
>> sref.t09z.pgrb132.prob_3hrly.grib
>>
>> # Extracted a single probability GRIB1 record:
>> wgrib -o sample_sref_prob.grib -grib -d 436
>> sref.t09z.pgrb132.prob_3hrly.grib
>>
>> # Run wgrib to dump information about that record:
>> wgrib -V -PDS10 sample_sref_prob.grib
>>
>> And here's the output:
>>
>> rec 1:0:date 2013021209 PROB kpds5=191 kpds6=1 kpds7=0 levels=(0,0)
>> grid=255 sfc ensemble(21 members) prob(APCP>2.540000) 6-9hr acc:
>>    PROB=Prob. from ensemble [non-dim]
>>    timerange 4 P1 6 P2 9 TimeU 1  nx 697 ny 553 GDS grid 3
num_in_ave 0
>> missing 0
>>    center 7 subcenter 2 process 113 Table 2 scan: WE:SN winds(grid)
>>    Lambert Conf: Lat1 1.000000 Lon1 214.500000 Lov 253.000000
>>        Latin1 50.000000 Latin2 50.000000 LatSP 0.000000 LonSP
0.000000
>>        North Pole (697 x 553) Dx 16.232000 Dy 16.232000 scan 64
mode 8
>>    PDS10(1..86)=
>>         1:   0   0  86   2   7 113 255 128 191   1   0   0  13   2
12
>> 9
>>   0   1   6   9
>>        21:   4   0   0   0  21   2   0   1   0   0   0   0   0   0
0
>> 0
>>   0   0   0   0
>>        41:   1   5   0   0 255  61   2   0   0   0   0  65  40 163
215
>> 0
>>   0   0   0   0
>>        61:  21   0   0   0   0   0   0   0   0   0   0   0   0   0
0
>> 0
>>   0   0   0   0
>>        81:   0   0   0   0   0   0
>>    min/max data 0 100  num bits 10  BDS_Ref 0  DecScale 1 BinScale
0
>>
>> Looking at appendix c of NCEP GRIB1 documentation
>> (http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html),
here's the
>> relevant information that MET parses:
>>   - Octet 46 is set to 61, meaning this is a probability for GRIB
code
>> 61,
>> or accumulated precipitation (APCP).
>>   - Octet 47 is set to 2, meaning this is probability of event
above and
>> upper limit.
>>   - Octets 52-55 are set to 65, 40, 163, and 215, and MET parses
those
>> numbers into the floating point number 2.54.
>>
>> If you're constructing a GRIB record following these conventions,
you
>> need
>> to set octets 46 - 55 with the probability information.  You also
need
>> to
>> update PDS octets 1-3 to indicate the updated
>> length of the PDS section.
>>
>> Hope that helps.
>>
>> John
>>
>>
>> On 02/12/2013 11:41 PM, kefeng via RT wrote:
>>>
>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>
>>> Hi, John
>>>
>>>      That make sense. Have a technical question. When i print the
KPDS,
>>> i didn't understand the following octet from 36 to 41(with red
>>> color).I searched the online table, said it was reserved. Do you
>>> have any table of instruction for those value or i can simply copy
>>> those value?  All are know for the precipitation, it seems the
same
>>> but not for sure.
>>>
>>>       Probability forecast from
>>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2:
>>>                           7          113          132          128
>>>    191
>>>              1            0           13            2           12
>>>      9
>>>              0            1           18           24            4
>>>      0
>>>              1            2            0           21            1
>>>      2
>>>              0            0            0            0            0
>>>      0
>>>              0            0            0            0            0
>>>      0
>>>       17104896    -12779008           66    426141184            0
>>> 352321536
>>>
>>>       Probability forecast from MET sample data
>>>                           7          183          212          192
>>>    193
>>>              1            0            5            8            3
>>>     12
>>>              0            1           96          108            3
>>>      0
>>>              1            2            0           21            0
>>>      5
>>>              0           42            0            0            0
>>>      0
>>>              0            0            0            0            0
>>>      0
>>>              0            0            0            0            0
>>>      0
>>>
>>>        Thanks!
>>>
>>>
>>>
>>>
>>> kefeng
>>>
>>> From: John Halley Gotway via RT
>>> Date: 2013-02-12 23:17
>>> To: kefeng at ou.edu
>>> Subject: Re: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
>>> kefeng,
>>>
>>> Ah yes, good point.  Actually, NCEP has created an extension to
the
>>> GRIB1
>>> specification for ensemble and probabilistic products, as
described in
>>> appendix C of their documentation:
>>>
>>>     http://www.nco.ncep.noaa.gov/pmb/docs/on388/appendixc.html
>>>
>>> MET is able to parse that probability information in that extended
PDS
>>> section.  A good example of this type of data can be seen in the
NCEP's
>>> SREF model data.  Here's a recent probabilistic file from SREF:
>>>
>>>
nomads.ncep.noaa.gov/pub/data/nccf/com/sref/prod/sref.20130212/09/ensprod/sref.t09z.pgrb132.prob_3hrly.grib2
>>>
>>> This is in GRIB2 format, but it can easily be converted from GRIB2
to
>>> GRIB1 using the "cnvgrib" utility.  That'd serve as a good example
of
>>> probabilistic data in GRIB1 format that makes use of the extended
PDS
>>> section.
>>>
>>> If you choose to encode you data is this way, I can help you
setting up
>>> the MET configuration files to extract those fields.
>>>
>>> Hope that helps.
>>>
>>> John
>>>
>>>>
>>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251 >
>>>>
>>>>
>>>>        Still have a question. When we calculate the probability,
we
>>>> used
>>>> several different thresholds like 0.25 inch, 0.5 inch. If i put
more
>>>> than one POP field in a file, is that possible MET could handle
it?
>>>> It seems grib does not store the threshold used for calculating
the
>>>> probability. I used "GETGBEXM" to see the variable information,
no
>>>> particular value has been found. Maybe i missed.
>>>>
>>>>        Thanks!
>>>>
>>>>
>>>>
>>>>
>>>> kefeng
>>>>
>>>> From: John Halley Gotway via RT
>>>> Date: 2013-02-12 11:40
>>>> To: kefeng at ou.edu
>>>> Subject: Re: [rt.rap.ucar.edu #60251] How to get probability
score?
>>>> kefeng,
>>>>
>>>> The test scripts in the MET tarball already include what you've
asked
>>>> for.
>>>>   The second call to grid_stat in
METv4.0/scripts/test_grid_stat.sh
>>>> verifies a probability of precip forecast using...
>>>>
>>>> This forecast GRIB file:
>>>>
METv4.0/data/sample_fcst/2005080312/pop5km_2005080312F096.grib_G212
>>>>
>>>> This Grid-Stat config file:
>>>> METv4.0/scripts/config/GridStatConfig_POP_12
>>>>
>>>> Specifying it for Grid-Stat is just about the same as doing it
for
>>>> Point-Stat.
>>>>
>>>> Just let me know if you have more questions.
>>>>
>>>> Thanks,
>>>> John Halley Gotway
>>>> met_help at ucar.edu
>>>>
>>>>>
>>>>> Mon Feb 11 16:12:41 2013: Request 60251 was acted upon.
>>>>> Transaction: Ticket created by kefeng at ou.edu
>>>>>         Queue: met_help
>>>>>       Subject: How to get probability score?
>>>>>         Owner: Nobody
>>>>>    Requestors: kefeng at ou.edu
>>>>>        Status: new
>>>>>   Ticket <URL:
>>>>> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=60251
>>>>> >
>>>>>
>>>>>
>>>>> Dear Sir:
>>>>>
>>>>>            I want to calculate some probability scores, but the
>>>>> default
>>>>> configuration and data for the "point_stat" tool is not for this
>>>>> type, right? Since my ensemble forecasts were from ARPS, I need
>>>>> to convert my forecasts and probability forecast into the MET
>>>>> format. I'm wondering if you could send me a sample
>>>>> configuration and also sample forecast data in grib format (want
>>>>> to know how the MET treat configuration "prob=TRUE", different
>>>>> grib code for probability forecast?).
>>>>>
>>>>>             Many thanks!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> kefeng
>>>>>
>>>>
>>
>



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


More information about the Met_help mailing list