[gradsusr] Problem with Alaska RTMA (CONUS 2.5km RTMA works fine)

Wesley Ebisuzaki Wesley.Ebisuzaki at noaa.gov
Mon Nov 7 10:15:42 EST 2011


Joe,


The obvious way to signify a forecast/analysis error is to use product 
definition template 4.7

     PDT 4.7 = Analysis or forecast error at a horizontal level or in a 
horizontal layer at a point in time

The RTMA people snuck the analysis error in code table 4.3 (Type of 
Generating Process).  Consequently
g2ctl, gribmap and wgrib2 all missed that some fields were analysis errors.

bash-3.2$ wgrib2 /tmp/rtma.t00z.2dvaranl_ndfd.grb2  -s -code_table_4.3

1:0:d=2011110700:HGT:surface:anl::code table 4.3=0 anl
2:912622:d=2011110700:PRES:surface:anl::code table 4.3=0 anl
3:1825244:d=2011110700:TMP:2 m above ground:anl::code table 4.3=0 anl
4:2566782:d=2011110700:DPT:2 m above ground:anl::code table 4.3=0 anl
5:3137236:d=2011110700:UGRD:10 m above ground:anl::code table 4.3=0 anl
6:3821746:d=2011110700:VGRD:10 m above ground:anl::code table 4.3=0 anl
7:4506256:d=2011110700:SPFH:2 m above ground:anl::code table 4.3=0 anl
8:5304822:d=2011110700:WDIR:10 m above ground:anl::code table 4.3=0 anl
9:5989332:d=2011110700:WIND:10 m above ground:anl::code table 4.3=0 anl
10:6673842:d=2011110700:PRES:surface:anl::code table 4.3=7 anl err
11:7529436:d=2011110700:TMP:2 m above ground:anl::code table 4.3=7 anl err
12:8042862:d=2011110700:DPT:2 m above ground:anl::code table 4.3=7 anl err
13:8556288:d=2011110700:UGRD:10 m above ground:anl::code table 4.3=7 anl err
14:9069714:d=2011110700:VGRD:10 m above ground:anl::code table 4.3=7 anl err
15:9583140:d=2011110700:SPFH:2 m above ground:anl::code table 4.3=7 anl err
16:10267650:d=2011110700:WDIR:10 m above ground:anl::code table 4.3=7 
anl err
17:10609991:d=2011110700:WIND:10 m above ground:anl::code table 4.3=7 
anl err

Records 1-9 are analyses and 10-17 are analysis errors. 

The only solution is to remove the analysis errors:

   wgrib2 IN.grb -code_table_4.3 | grep -v "anl err" | wgrib2 IN.grb -i 
-grib OUT.grb


         Wesley



Joe Moore wrote:
> I'm having an issue that I believe lies in g2ctl, but I'm not 
> absolutely sure. I've been making images from the CONUS 2.5 km RTMA 
> data from NCEP just fine for the past month or so. This weekend I 
> decided to tackle the Alaska RTMA data, but I've hit an issue.
>
> Here's the wgrib2 inventory of the CONUS 2.5 km RTMA, which works:
> CONUS 2.5 km RTMA data: 
> http://nomads.ncep.noaa.gov/pub/data/nccf/com/rtma2p5/prod/ - using 
> the "anal" files
> ~# wgrib2 rtma_anal_20111105_22z.gr2
> 1:0:d=2011110522:HGT:surface:anl:
> 2:5907518:d=2011110522:PRES:surface:anl:
> 3:11815036:d=2011110522:TMP:2 m above ground:anl:
> 4:16614930:d=2011110522:DPT:2 m above ground:anl:
> 5:19937992:d=2011110522:UGRD:10 m above ground:anl:
> 6:24737886:d=2011110522:VGRD:10 m above ground:anl:
> 7:29537780:d=2011110522:SPFH:2 m above ground:anl:
> 8:35076090:d=2011110522:WDIworksR:10 m above ground:anl:
> 9:39506776:d=2011110522:WIND:10 m above ground:anl:
>
> Using g2ctl results in the following control file:
> dset ^rtma_anal_20111105_22z.gr2
> index ^rtma_anal_20111105_22z.gr2.idx
> undef 9.999E+20
> title rtma_anal_20111105_22z.gr2
> * produced by g2ctl v0.0.8.2
> * command line options: rtma_anal_20111105_22z.gr2
> * griddef=1:0:(2145 x 1377):grid_template=30:winds(grid): Lambert 
> Conformal: (2145 x 1377) input WE:SN output WE:SN res 8 Lat1 20.191999 
> Lon1 238.445999 LoV 265.000000 LatD 25.000000 Latin1 25.000000 Latin2 
> 25.000000 LatSP -90.000000 LonSP 0.000000 N
> dtype grib2
> pdef 2145 1377 lccr 20.191999 -121.554001 1 1 25.000000 25.000000 -95 
> 2539.703000 2539.703000
> xdef 2814 linear -130.103387 0.0246001009814572
> ydef 1413 linear 20.196426 0.0230882090909091
> tdef 1 linear 22Z05nov2011 1mo
> zdef 1 linear 1 1
> vars 9
> DPT2m   0,103,2   0,0,6 ** 2 m above ground Dew Point Temperature [K]
> HGTsfc   0,1,0   0,3,5 ** surface Geopotential Height [gpm]
> PRESsfc   0,1,0   0,3,0 ** surface Pressure [Pa]
> SPFH2m   0,103,2   0,1,0 ** 2 m above ground Specific Humidity [kg/kg]
> TMP2m   0,103,2   0,0,0 ** 2 m above ground Temperature [K]
> UGRD10m   0,103,10   0,2,2 ** 10 m above ground U-Component of Wind [m/s]
> VGRD10m   0,103,10   0,2,3 ** 10 m above ground V-Component of Wind [m/s]
> WDIR10m   0,103,10   0,2,0 ** 10 m above ground Wind Direction (from 
> which blowing) [deg]
> WIND10m   0,103,10   0,2,1 ** 10 m above ground Wind Speed [m/s]
> ENDVARS
>
> Again, the CONUS data above works as expected. I can plot temp/dew 
> point just fine.
>
> The problem is with the Alaska data:
>
> Alaska RTMA data: 
> http://nomads.ncep.noaa.gov/pub/data/nccf/com/akrtma/prod/ - using 
> "anl" files
> ~# wgrib2 rtma_anal_ak_20111105_22z.gr2
> 1:0:d=2011110522:HGT:surface:anl:
> 2:912622:d=2011110522:PRES:surface:anl:
> 3:1825244:d=2011110522:TMP:2 m above ground:anl:
> 4:2566782:d=2011110522:DPT:2 m above ground:anl:
> 5:3137236:d=2011110522:UGRD:10 m above ground:anl:
> 6:3821746:d=2011110522:VGRD:10 m above ground:anl:
> 7:4506256:d=2011110522:SPFH:2 m above ground:anl:
> 8:5247794:d=2011110522:WDIR:10 m above ground:anl:
> 9:5932304:d=2011110522:WIND:10 m above ground:anl:
> 10:6616814:d=2011110522:PRES:surface:anl:
> 11:7472408:d=2011110522:TMP:2 m above ground:anl:
> 12:7985834:d=2011110522:DPT:2 m above ground:anl:
> 13:8499260:d=2011110522:UGRD:10 m above ground:anl:
> 14:9012686:d=2011110522:VGRD:10 m above ground:anl:
> 15:9526112:d=2011110522:SPFH:2 m above ground:anl:
> 16:10210622:d=2011110522:WDIR:10 m above ground:anl:
> 17:10552963:d=2011110522:WIND:10 m above ground:anl:
>
> Using g2ctl results in:
> dset ^rtma_anal_ak_20111105_22z.gr2
> index ^rtma_anal_ak_20111105_22z.gr2.idx
> undef 9.999E+20
> title rtma_anal_ak_20111105_22z.gr2
> * produced by g2ctl v0.0.8.2
> * command line options: rtma_anal_ak_20111105_22z.gr2
> * griddef=1:0:(825 x 553):grid_template=20:winds(grid): polar 
> stereographic grid: (825 x 553) input WE:SN output WE:SN res 8 North 
> pole lat1 40.530101 lon1 181.429000 latD 60.000000 lonV 210.000000 dx 
> 5953.125000 m dy 5953.125000 m:winds(grid)
>
> dtype grib2
> pdef 825 553 nps 441.000499063067 808.990794912376 210.000000 5.953125
> xdef 2168 linear 150.190944 0.0535853193354869
> ydef 651 linear 40.552720 0.0535970923076923
> tdef 1 linear 22Z05nov2011 1mo
> zdef 1 linear 1 1
> vars 9
> DPT2m   0,103,2   0,0,6 ** 2 m above ground Dew Point Temperature [K]
> HGTsfc   0,1,0   0,3,5 ** surface Geopotential Height [gpm]
> PRESsfc   0,1,0   0,3,0 ** surface Pressure [Pa]
> SPFH2m   0,103,2   0,1,0 ** 2 m above ground Specific Humidity [kg/kg]
> TMP2m   0,103,2   0,0,0 ** 2 m above ground Temperature [K]
> UGRD10m   0,103,10   0,2,2 ** 10 m above ground U-Component of Wind [m/s]
> VGRD10m   0,103,10   0,2,3 ** 10 m above ground V-Component of Wind [m/s]
> WDIR10m   0,103,10   0,2,0 ** 10 m above ground Wind Direction (from 
> which blowing) [deg]
> WIND10m   0,103,10   0,2,1 ** 10 m above ground Wind Speed [m/s]
> ENDVARS
>
> While I had some trouble getting the lat lon correct (which I figured 
> out by trial-and-error), I can't seem to plot the temperature and dew 
> point. While I can plot the tmp2m, the data is NOT the temperature; 
> it's actually the temperature error. (Record 11 of the grib2 - not 
> sure if my terminology is correct, but it's the "11" line of the 
> wgrib2 output above.) I want to plot the tmp2m (the actually 
> temperature), but there's only one temp in the control file.
>
> In GrADS, when I open up the control file, querying the file gives the 
> following:
> ga-> q file
> File 1 : rtma_anal_ak_20111105_02z.gr2
>   Descriptor: rtma_anal_ak_20111105_02z.ctl
>   Binary: rtma_anal_ak_20111105_02z.gr2
>   Type = Gridded
>   Xsize = 2168  Ysize = 651  Zsize = 1  Tsize = 1  Esize = 1
>   Number of Variables = 9
>      dpt2m  0  0,0,6  ** 2 m above ground Dew Point Temperature [K]
>      hgtsfc  0  0,3,5  ** surface Geopotential Height [gpm]
>      pressfc  0  0,3,0  ** surface Pressure [Pa]
>      spfh2m  0  0,1,0  ** 2 m above ground Specific Humidity [kg/kg]
>      tmp2m  0  0,0,0  ** 2 m above ground Temperature [K]
>      ugrd10m  0  0,2,2  ** 10 m above ground U-Component of Wind [m/s]
>      vgrd10m  0  0,2,3  ** 10 m above ground V-Component of Wind [m/s]
>      wdir10m  0  0,2,0  ** 10 m above ground Wind Direction (from 
> which blowing) [deg]
>      wind10m  0  0,2,1  ** 10 m above ground Wind Speed [m/s]
>
> I know that the tmp2m in the control file is incorrect because when I 
> do a plot with "set stat on," I see the values only range from ~1-4 
> Kelvin!
>
> ga-> d tmp2m
> Notice:  Automatic Grid Interpolation Taking Place
> Data Type = grid
> Dimensions = 0 1
> I Dimension = 1 to 2168 Linear 150.191 0.0535853
> J Dimension = 1 to 651 Linear 40.5527 0.0535971
> Sizes = 2168 651 1411368
> Undef value = -9.99e+08
> Undef count = 518479  Valid count = 892889
> Min, Max = 1.41458 4
> Cmin, cmax, cint = 1.5 3.9 0.3
> Stats[sum,sumsqr,root(sumsqr),n]:     3.49332e+06 1.37142e+07 3703.27 
> 892889
> Stats[(sum,sumsqr,root(sumsqr))/n]:     3.91238 15.3593 3.9191
> Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 3.91239 15.3594 3.9191
> Stats[(sigma,var)(n)]:     0.229326 0.0525902
> Stats[(sigma,var)(n-1)]:   0.229326 0.0525903
> Contouring: 1.5 to 3.9 interval 0.3
>
> Is this a problem that I should solve myself? I can think of a quick 
> and dirty fix using a shell script with sed, but /it appears to me/ 
> that g2ctl is not functioning as expected.
>
> Thank you,
> Joe Moore
>
> PS: I am using openGrADS with the following version of GrADS: 2.0.a9.oga.1
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   




More information about the gradsusr mailing list