[gradsusr] SREF: "Product Definition Template 9 not handled" error message with g2ctl.pl

Wesley Ebisuzaki Wesley.Ebisuzaki at noaa.gov
Thu Oct 6 10:27:53 EDT 2011


Kevin,

    One work around is to write out the file in netcdf format and then 
GrADS can handle it.

            wgrib2 in.grb -netcdf out.nc

    The current verion of wgrib2 has problems with the probability files 
because
of the < and > characters (not allowed in netcdf names).  The fix has 
been tested
and will be in the next wgrib2 release (< 2 weeks).

   BTW the SREF probability fields have values between 0 and 100.  NCEP's
representative has been asked if this is correct.


       Wesley






Jennifer Adams wrote:
> Hi, Kevin -- 
> I agree that the SREF files you are trying to read are highly 
> pathological. More technical comments inline... 
>
>
> On Oct 5, 2011, at 11:21 PM, Kevin M Levey wrote:
>
>> WED 05OCT11: 2010PDT
>>
>> I'm still having difficulty trying to set up a correct CTL file for 
>> the Short Range Ensemble Model (SREF) since g2ctl.pl does not 
>> correctly display the variables correctly in the file it creates. 
>>
>> A WGRIB2 inventory of the file I am looking at is found here: 
>>
>> MEAN: 
>> http://www.ftp.ncep.noaa.gov/data/nccf/com/sref/prod/sref.20111005/15/ensprod/sref.t15z.pgrb212.mean.grib2.idx
>> SPREAD: http://www.ftp.ncep.noaa.gov/data/nccf/com/sref/prod/sref.20111005/15/ensprod/sref.t15z.pgrb212.spread.grib2.idx
>> PROB: 
>>  http://www.ftp.ncep.noaa.gov/data/nccf/com/sref/prod/sref.20111005/15/ensprod/sref.t15z.pgrb212.prob.grib2.idx
>>
>> I am not sure how to write out the APCP variables - for example: (MEAN)
>>
>> forecast hour 6: 
>>
>> 179:1695832:d=2011100515:APCP:surface:3-6 hour acc fcst:wt ens-mean
>> 180:1700422:d=2011100515:APCP:surface:0-6 hour acc fcst:wt ens-mean
> These two records both have the same base time (2011100515) and the 
> same end of accumulation period (6hr), so gribmap will match both of 
> them to the same time (2011100521), so the record that appears later 
> in the grib2 file is the one that will get displayed by GrADS. 
>
>>
>> at the end of the file : 
>>
>> 2053:18119750:d=2011100515:APCP:surface:84-87 hour acc fcst:wt ens-mean
>> 2054:18125217:d=2011100515:APCP:surface:81-87 hour acc fcst:wt ens-mean
>> 2055:18131995:d=2011100515:APCP:surface:75-87 hour acc fcst:wt ens-mean
>> 2056:18140088:d=2011100515:APCP:surface:63-87 hour acc fcst:wt ens-mean
> Similarly, all four of these records will qualify as matches for the 
> time step that is 87 hours from start time. The one that will get 
> displayed will be record #2056, since it was the last one to match. 
>
>> I need to plot the precip mean/spread for precip every 6 hours, 12 
>> hours and 24 hours, but have been at this for a week now, and still 
>> nowhere near a satisfactory solution.
> My suggestion is to use wgrib2 to split the file into pieces, picking 
> out the records that have a common accumulation time, e.g. all the 6hr 
> accumulations. Then you should have a set of records with unique end 
> times that will map uniquely to a time axis as defined by TDEF. 
>
>> Likewise with the probability of rainfall exceeding 0.25" etc....
> The probability files are going to require some extra work to figure 
> out how to map them in a unique way. They may require as many as 4 
> additional grib codes and the units field in a GRIB2 variable 
> declaration already has 5 elements. That borders on the ridiculous, 
> and so a design change may be in order. In any event, it will be a 
> while before a GrADS version exists that will be able to handle these 
> probability files in their native format. Wesley also pointed out that 
> there are some discrepancies between the NCEP encoding of this Product 
> Definition Template and the WMO standard. Best suggestion I have is to 
> use wgrib2 to rewrite the records of interest into another format 
> (e.g. binary), doing your best to preserve whatever metadata you need 
> in the filenames and the GrADS descriptor file. 
>
>> I was quite competent decoding grib1 and setting up CTL files based 
>> on the KPDS values, however, the SREF inventory has me stumped. 
> Meet the new beast to conquer... 
>>
>> If I know how do get this done, I should be able to create the CTL 
>> file for the probability files which is where I had the initial 
>> problem last week. 
> If you succeed, please post your solutions to the forum for the next 
> unsuspecting SREF user who comes along... 
> --Jennifer
>
>>
>> Any help with an short example would greatly help me. 
>>
>> Thanks in advance. 
>>
>> Regards,
>>
>> Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University of 
>> Cape Town)
>> Vice President of Operations
>> CustomWeather, Inc.
>> San Francisco, California, USA
>>
>> "Taking the World by Storm!"
>>
>> http://www.customweather.com
>> http://www.myforecast.com
>> http://www.1stweather.com
>>
>> cell: 415-794-0411
>> work: 415-777-3566
>> email: klevey at customweather.com <mailto:klevey at customweather.com>
>>
>> On Sep 27, 2011, at 09/27/11 - 6:28 AM, Jennifer Adams wrote:
>>
>>> Never mind, I found a sample and will look into whether GrADS can 
>>> handle this PDT. --Jennifer
>>>
>>> On Sep 27, 2011, at 9:02 AM, Jennifer Adams wrote:
>>>
>>>> What is the URL or FTP address where I can get a sample of this 
>>>> SREF file? --Jennifer
>>>>  
>>>> On Sep 26, 2011, at 5:06 PM, Kevin M Levey wrote:
>>>>
>>>>> MON 26SEP11: 1400PDT
>>>>>
>>>>> Hi
>>>>>
>>>>> I'm busy processing SREF GRIB2 model data, specifically: AWIPS 
>>>>> grid Regional - CONUS - Double Resolution (Lambert Conformal - 
>>>>> 40km) Prob Products (NCEP ....ensprod/sref.tccz.pgrb212.prob.grib2).
>>>>>
>>>>> I've had no problems using processing the SPREAD and MEAN files 
>>>>> using gtcl.pl (ver:0.0.8.2) and wgrib2 (ver: v0.1.9.2c 3/2011 ), 
>>>>> however, am running into issues when processing the probability 
>>>>> files.
>>>>>
>>>>> Firstly, g2ctl.pl throws this:
>>>>>
>>>>> Warning: g2lib/g2clib jpeg deocde may differ from WMO standard, 
>>>>> use use -g2clib 0 for WMO standard
>>>>>
>>>>> and then running gribmap I get this:
>>>>>
>>>>> Product Definition Template 9 not handled
>>>>>
>>>>> As I understand it, wgrib2 doesn't know what to do as the table 
>>>>> for SREF is not defined. The CTL file incorrectly shows only a few 
>>>>> variables and none of the probability variables as listed on the 
>>>>> NCEP site:
>>>>>
>>>>> http://www.nco.ncep.noaa.gov/pmb/products/sref/sref.t03z.pgrb212.prob.grib2.shtml 
>>>>>
>>>>>
>>>>> I'm somewhat stumped here as to how to correctly process these 
>>>>> type files and display the desired variables in GRADS.
>>>>>
>>>>> Any help would be welcome.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University 
>>>>> of Cape Town)
>>>>> Vice President of Operations
>>>>> CustomWeather, Inc.
>>>>> San Francisco, California, USA
>>>>>
>>>>> "Taking the World by Storm!"
>>>>>
>>>>> http://www.customweather.com <http://www.customweather.com/>
>>>>> http://www.myforecast.com <http://www.myforecast.com/>
>>>>> http://www.1stweather.com
>>>>>
>>>>> cell: 415-794-0411
>>>>> work: 415-777-3566
>>>>> email: klevey at customweather.com <mailto:klevey at customweather.com>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gradsusr mailing list
>>>>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>
>>>> --
>>>> Jennifer M. Adams
>>>> IGES/COLA
>>>> 4041 Powder Mill Road, Suite 302
>>>> Calverton, MD 20705
>>>> jma at cola.iges.org <mailto:jma at cola.iges.org>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>> --
>>> Jennifer M. Adams
>>> IGES/COLA
>>> 4041 Powder Mill Road, Suite 302
>>> Calverton, MD 20705
>>> jma at cola.iges.org <mailto:jma at cola.iges.org>
>>>
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org <mailto:jma at cola.iges.org>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   




More information about the gradsusr mailing list