Wesley,<br><br>Thank you for help! Your suggested command worked perfectly. I'm fairly knew to using grib2 (or any gridded data for that matter) and I appreciate your thorough explanation.<br><br>Arlindo: I have the latest wgrib2 version installed - I installed it separately after installing openGrADS. However, I plan to upgrade to the latest version in a few days. <br>
<br>-Joe<br><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 10:15 AM, Wesley Ebisuzaki <span dir="ltr"><<a href="mailto:Wesley.Ebisuzaki@noaa.gov">Wesley.Ebisuzaki@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Joe,<br>
<br>
<br>
The obvious way to signify a forecast/analysis error is to use product<br>
definition template 4.7<br>
<br>
PDT 4.7 = Analysis or forecast error at a horizontal level or in a<br>
horizontal layer at a point in time<br>
<br>
The RTMA people snuck the analysis error in code table 4.3 (Type of<br>
Generating Process). Consequently<br>
g2ctl, gribmap and wgrib2 all missed that some fields were analysis errors.<br>
<br>
bash-3.2$ wgrib2 /tmp/rtma.t00z.2dvaranl_ndfd.grb2 -s -code_table_4.3<br>
<br>
1:0:d=2011110700:HGT:surface:anl::code table 4.3=0 anl<br>
2:912622:d=2011110700:PRES:surface:anl::code table 4.3=0 anl<br>
3:1825244:d=2011110700:TMP:2 m above ground:anl::code table 4.3=0 anl<br>
4:2566782:d=2011110700:DPT:2 m above ground:anl::code table 4.3=0 anl<br>
5:3137236:d=2011110700:UGRD:10 m above ground:anl::code table 4.3=0 anl<br>
6:3821746:d=2011110700:VGRD:10 m above ground:anl::code table 4.3=0 anl<br>
7:4506256:d=2011110700:SPFH:2 m above ground:anl::code table 4.3=0 anl<br>
8:5304822:d=2011110700:WDIR:10 m above ground:anl::code table 4.3=0 anl<br>
9:5989332:d=2011110700:WIND:10 m above ground:anl::code table 4.3=0 anl<br>
10:6673842:d=2011110700:PRES:surface:anl::code table 4.3=7 anl err<br>
11:7529436:d=2011110700:TMP:2 m above ground:anl::code table 4.3=7 anl err<br>
12:8042862:d=2011110700:DPT:2 m above ground:anl::code table 4.3=7 anl err<br>
13:8556288:d=2011110700:UGRD:10 m above ground:anl::code table 4.3=7 anl err<br>
14:9069714:d=2011110700:VGRD:10 m above ground:anl::code table 4.3=7 anl err<br>
15:9583140:d=2011110700:SPFH:2 m above ground:anl::code table 4.3=7 anl err<br>
16:10267650:d=2011110700:WDIR:10 m above ground:anl::code table 4.3=7<br>
anl err<br>
17:10609991:d=2011110700:WIND:10 m above ground:anl::code table 4.3=7<br>
anl err<br>
<br>
Records 1-9 are analyses and 10-17 are analysis errors.<br>
<br>
The only solution is to remove the analysis errors:<br>
<br>
wgrib2 IN.grb -code_table_4.3 | grep -v "anl err" | wgrib2 IN.grb -i<br>
-grib OUT.grb<br>
<br>
<br>
Wesley<br>
<div><div class="h5"><br>
<br>
<br>
Joe Moore wrote:<br>
> I'm having an issue that I believe lies in g2ctl, but I'm not<br>
> absolutely sure. I've been making images from the CONUS 2.5 km RTMA<br>
> data from NCEP just fine for the past month or so. This weekend I<br>
> decided to tackle the Alaska RTMA data, but I've hit an issue.<br>
><br>
> Here's the wgrib2 inventory of the CONUS 2.5 km RTMA, which works:<br>
> CONUS 2.5 km RTMA data:<br>
> <a href="http://nomads.ncep.noaa.gov/pub/data/nccf/com/rtma2p5/prod/" target="_blank">http://nomads.ncep.noaa.gov/pub/data/nccf/com/rtma2p5/prod/</a> - using<br>
> the "anal" files<br>
> ~# wgrib2 rtma_anal_20111105_22z.gr2<br>
> 1:0:d=2011110522:HGT:surface:anl:<br>
> 2:5907518:d=2011110522:PRES:surface:anl:<br>
> 3:11815036:d=2011110522:TMP:2 m above ground:anl:<br>
> 4:16614930:d=2011110522:DPT:2 m above ground:anl:<br>
> 5:19937992:d=2011110522:UGRD:10 m above ground:anl:<br>
> 6:24737886:d=2011110522:VGRD:10 m above ground:anl:<br>
> 7:29537780:d=2011110522:SPFH:2 m above ground:anl:<br>
> 8:35076090:d=2011110522:WDIworksR:10 m above ground:anl:<br>
> 9:39506776:d=2011110522:WIND:10 m above ground:anl:<br>
><br>
> Using g2ctl results in the following control file:<br>
> dset ^rtma_anal_20111105_22z.gr2<br>
> index ^rtma_anal_20111105_22z.gr2.idx<br>
> undef 9.999E+20<br>
> title rtma_anal_20111105_22z.gr2<br>
> * produced by g2ctl v0.0.8.2<br>
> * command line options: rtma_anal_20111105_22z.gr2<br>
> * griddef=1:0:(2145 x 1377):grid_template=30:winds(grid): Lambert<br>
> Conformal: (2145 x 1377) input WE:SN output WE:SN res 8 Lat1 20.191999<br>
> Lon1 238.445999 LoV 265.000000 LatD 25.000000 Latin1 25.000000 Latin2<br>
> 25.000000 LatSP -90.000000 LonSP 0.000000 N<br>
> dtype grib2<br>
> pdef 2145 1377 lccr 20.191999 -121.554001 1 1 25.000000 25.000000 -95<br>
> <a href="tel:2539.703000" value="+12539703000">2539.703000</a> <a href="tel:2539.703000" value="+12539703000">2539.703000</a><br>
> xdef 2814 linear -130.103387 0.0246001009814572<br>
> ydef 1413 linear 20.196426 0.0230882090909091<br>
> tdef 1 linear 22Z05nov2011 1mo<br>
> zdef 1 linear 1 1<br>
> vars 9<br>
> DPT2m 0,103,2 0,0,6 ** 2 m above ground Dew Point Temperature [K]<br>
> HGTsfc 0,1,0 0,3,5 ** surface Geopotential Height [gpm]<br>
> PRESsfc 0,1,0 0,3,0 ** surface Pressure [Pa]<br>
> SPFH2m 0,103,2 0,1,0 ** 2 m above ground Specific Humidity [kg/kg]<br>
> TMP2m 0,103,2 0,0,0 ** 2 m above ground Temperature [K]<br>
> UGRD10m 0,103,10 0,2,2 ** 10 m above ground U-Component of Wind [m/s]<br>
> VGRD10m 0,103,10 0,2,3 ** 10 m above ground V-Component of Wind [m/s]<br>
> WDIR10m 0,103,10 0,2,0 ** 10 m above ground Wind Direction (from<br>
> which blowing) [deg]<br>
> WIND10m 0,103,10 0,2,1 ** 10 m above ground Wind Speed [m/s]<br>
> ENDVARS<br>
><br>
> Again, the CONUS data above works as expected. I can plot temp/dew<br>
> point just fine.<br>
><br>
> The problem is with the Alaska data:<br>
><br>
> Alaska RTMA data:<br>
> <a href="http://nomads.ncep.noaa.gov/pub/data/nccf/com/akrtma/prod/" target="_blank">http://nomads.ncep.noaa.gov/pub/data/nccf/com/akrtma/prod/</a> - using<br>
> "anl" files<br>
> ~# wgrib2 rtma_anal_ak_20111105_22z.gr2<br>
> 1:0:d=2011110522:HGT:surface:anl:<br>
> 2:912622:d=2011110522:PRES:surface:anl:<br>
> 3:1825244:d=2011110522:TMP:2 m above ground:anl:<br>
> 4:2566782:d=2011110522:DPT:2 m above ground:anl:<br>
> 5:3137236:d=2011110522:UGRD:10 m above ground:anl:<br>
> 6:3821746:d=2011110522:VGRD:10 m above ground:anl:<br>
> 7:4506256:d=2011110522:SPFH:2 m above ground:anl:<br>
> 8:5247794:d=2011110522:WDIR:10 m above ground:anl:<br>
> 9:5932304:d=2011110522:WIND:10 m above ground:anl:<br>
> 10:6616814:d=2011110522:PRES:surface:anl:<br>
> 11:7472408:d=2011110522:TMP:2 m above ground:anl:<br>
> 12:7985834:d=2011110522:DPT:2 m above ground:anl:<br>
> 13:8499260:d=2011110522:UGRD:10 m above ground:anl:<br>
> 14:9012686:d=2011110522:VGRD:10 m above ground:anl:<br>
> 15:9526112:d=2011110522:SPFH:2 m above ground:anl:<br>
> 16:10210622:d=2011110522:WDIR:10 m above ground:anl:<br>
> 17:10552963:d=2011110522:WIND:10 m above ground:anl:<br>
><br>
> Using g2ctl results in:<br>
> dset ^rtma_anal_ak_20111105_22z.gr2<br>
> index ^rtma_anal_ak_20111105_22z.gr2.idx<br>
> undef 9.999E+20<br>
> title rtma_anal_ak_20111105_22z.gr2<br>
> * produced by g2ctl v0.0.8.2<br>
> * command line options: rtma_anal_ak_20111105_22z.gr2<br>
> * griddef=1:0:(825 x 553):grid_template=20:winds(grid): polar<br>
> stereographic grid: (825 x 553) input WE:SN output WE:SN res 8 North<br>
> pole lat1 40.530101 lon1 181.429000 latD 60.000000 lonV 210.000000 dx<br>
> 5953.125000 m dy 5953.125000 m:winds(grid)<br>
><br>
> dtype grib2<br>
> pdef 825 553 nps 441.000499063067 808.990794912376 210.000000 5.953125<br>
> xdef 2168 linear 150.190944 0.0535853193354869<br>
> ydef 651 linear 40.552720 0.0535970923076923<br>
> tdef 1 linear 22Z05nov2011 1mo<br>
> zdef 1 linear 1 1<br>
> vars 9<br>
> DPT2m 0,103,2 0,0,6 ** 2 m above ground Dew Point Temperature [K]<br>
> HGTsfc 0,1,0 0,3,5 ** surface Geopotential Height [gpm]<br>
> PRESsfc 0,1,0 0,3,0 ** surface Pressure [Pa]<br>
> SPFH2m 0,103,2 0,1,0 ** 2 m above ground Specific Humidity [kg/kg]<br>
> TMP2m 0,103,2 0,0,0 ** 2 m above ground Temperature [K]<br>
> UGRD10m 0,103,10 0,2,2 ** 10 m above ground U-Component of Wind [m/s]<br>
> VGRD10m 0,103,10 0,2,3 ** 10 m above ground V-Component of Wind [m/s]<br>
> WDIR10m 0,103,10 0,2,0 ** 10 m above ground Wind Direction (from<br>
> which blowing) [deg]<br>
> WIND10m 0,103,10 0,2,1 ** 10 m above ground Wind Speed [m/s]<br>
> ENDVARS<br>
><br>
> While I had some trouble getting the lat lon correct (which I figured<br>
> out by trial-and-error), I can't seem to plot the temperature and dew<br>
> point. While I can plot the tmp2m, the data is NOT the temperature;<br>
> it's actually the temperature error. (Record 11 of the grib2 - not<br>
> sure if my terminology is correct, but it's the "11" line of the<br>
> wgrib2 output above.) I want to plot the tmp2m (the actually<br>
> temperature), but there's only one temp in the control file.<br>
><br>
> In GrADS, when I open up the control file, querying the file gives the<br>
> following:<br>
> ga-> q file<br>
> File 1 : rtma_anal_ak_20111105_02z.gr2<br>
> Descriptor: rtma_anal_ak_20111105_02z.ctl<br>
> Binary: rtma_anal_ak_20111105_02z.gr2<br>
> Type = Gridded<br>
> Xsize = 2168 Ysize = 651 Zsize = 1 Tsize = 1 Esize = 1<br>
> Number of Variables = 9<br>
> dpt2m 0 0,0,6 ** 2 m above ground Dew Point Temperature [K]<br>
> hgtsfc 0 0,3,5 ** surface Geopotential Height [gpm]<br>
> pressfc 0 0,3,0 ** surface Pressure [Pa]<br>
> spfh2m 0 0,1,0 ** 2 m above ground Specific Humidity [kg/kg]<br>
> tmp2m 0 0,0,0 ** 2 m above ground Temperature [K]<br>
> ugrd10m 0 0,2,2 ** 10 m above ground U-Component of Wind [m/s]<br>
> vgrd10m 0 0,2,3 ** 10 m above ground V-Component of Wind [m/s]<br>
> wdir10m 0 0,2,0 ** 10 m above ground Wind Direction (from<br>
> which blowing) [deg]<br>
> wind10m 0 0,2,1 ** 10 m above ground Wind Speed [m/s]<br>
><br>
> I know that the tmp2m in the control file is incorrect because when I<br>
> do a plot with "set stat on," I see the values only range from ~1-4<br>
> Kelvin!<br>
><br>
> ga-> d tmp2m<br>
> Notice: Automatic Grid Interpolation Taking Place<br>
> Data Type = grid<br>
> Dimensions = 0 1<br>
> I Dimension = 1 to 2168 Linear 150.191 0.0535853<br>
> J Dimension = 1 to 651 Linear 40.5527 0.0535971<br>
> Sizes = 2168 651 1411368<br>
> Undef value = -9.99e+08<br>
> Undef count = 518479 Valid count = 892889<br>
> Min, Max = 1.41458 4<br>
> Cmin, cmax, cint = 1.5 3.9 0.3<br>
> Stats[sum,sumsqr,root(sumsqr),n]: 3.49332e+06 1.37142e+07 3703.27<br>
> 892889<br>
> Stats[(sum,sumsqr,root(sumsqr))/n]: 3.91238 15.3593 3.9191<br>
> Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 3.91239 15.3594 3.9191<br>
> Stats[(sigma,var)(n)]: 0.229326 0.0525902<br>
> Stats[(sigma,var)(n-1)]: 0.229326 0.0525903<br>
> Contouring: 1.5 to 3.9 interval 0.3<br>
><br>
> Is this a problem that I should solve myself? I can think of a quick<br>
</div></div>> and dirty fix using a shell script with sed, but /it appears to me/<br>
<div class="im">> that g2ctl is not functioning as expected.<br>
><br>
> Thank you,<br>
> Joe Moore<br>
><br>
> PS: I am using openGrADS with the following version of GrADS: 2.0.a9.oga.1<br>
><br>
</div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br>