This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> For future reference how did you initially determine what the grdarea was for > the UV grid? > > Robert, As I recall, I created a wmogrib2.tbl file with just UREL and VREL (33 and 34) so that those would be the only parameters decoded. You could just keep 2 different wmogrib2.tbl versions aand link the appropriate in the directory before running nagrib or dcgrib2. If you did that, you could just use the CPYFIL=gds and not have to set the PROJ, KXKY and GRDAREA. Steve Chiswell Unidata User Support > > > -----Original Message----- > From: Unidata GEMPAK Support [mailto:address@hidden] > Sent: Tue 12/11/2007 2:11 PM > To: Robert Mullenax > Cc: address@hidden > Subject: [GEMPAK #UER-356689]: NAGRIB not decoding AMPS WRF grids > > Robert, > > When I use your settings for uv, I decode the winds as expected. > > > > 4370 GRIB messages were read or scanned from the GRIB file: > 2007120300_D5.grb > > 868 grids were written to the GEMPAK file: > antarctica_uv.gem > > > When I use your grdarea for the antarctica.gem file, > GRDAREA = -78.34;156.78;-75.77;174.52 > I get the 0 grids decoded as you saw. I notice that the longitudes for LL and > UR has changed > slightly by .01 each when running dcgrib2 on the data. > > When I change this in nagrib to: > PROJ = str/-90;180;0 > GRDAREA = -78.34;156.77;-75.77;174.51 > KXKY = 159;171 > > I get: > 4370 GRIB messages were read or scanned from the GRIB file: > 2007120300_D5.grb > > 1890 grids were written to the GEMPAK file: > antarctica.gem > > I haven't looked in to the source of the .01 difference, but since the LL > point > is from the data itself, I assume that the post-processing involved in > converting from the model > domain to grib is just that much different in roundoff error than previous. > > So, to fix your decoding, you will have to modify the GRDAREA value. > > The other unknown parameters of numbers greater than 127 will be referenced > in ncargrib2.tbl, and if you happen to know those parameters, you can create a > table so that they are decoded as well. > > Steve Chiswell > Unidata User Support > > > > > > > > > > Steve, > > > > Last year you helped me write NAGRIB scripts that would handle the AMPS MM5 > > and WRF grids. The GRIB files provided by AMPS have the U/V winds offset > > by one grid point. Decoding with dcgrib2 will allow you to display > > everything but winds fine. Winds either display in the wrong place or > > won't display at all (and causes gdplot2 to dump core). The solution was > > to decode the grib messages with nagrib2 and set the proper geog for the > > U/V, then decode the rest then merge back together: > > > > #!/bin/csh > > set DATE=`date +%Y%m%d` > > #set DATE=20061106 > > set HR=$1 > > source ~gempak/GEMPAK/Gemenviron > > nagrib << EOF > > GBFILE = /data/ldm/EXP/mm5/${DATE}${HR}_D5.grb > > INDXFL = > > GDOUTF = /usr2/config/grdtmp/mm5d5/antarctica_uv.gem > > PROJ = str/-90;180;0 > > GRDAREA = -78.34300;156.7770;-75.74857;174.6063 > > KXKY = 160;172 > > MAXGRD = 10000 > > CPYFIL = > > GAREA = dset > > OUTPUT = t > > GBTBLS = > > GBDIAG = > > PDSEXT = NO > > OVERWR = NO > > r > > > > e > > EOF > > gpend > > nagrib << EOF2 > > GBFILE = /data/ldm/EXP/mm5/${DATE}${HR}_D5.grb > > INDXFL = > > GDOUTF = /usr2/config/grdtmp/mm5d5/antarctica.gem > > PROJ = str/-90;180;0 > > GRDAREA = -78.34;156.78;-75.77;174.52 > > KXKY = 159;171 > > MAXGRD = 10000 > > CPYFIL = > > GAREA = dset > > OUTPUT = t > > GBTBLS = > > GBDIAG = > > PDSEXT = NO > > OVERWR = NO > > r > > > > e > > EOF2 > > gpend > > cd /usr2/config/grdtmp/mm5d5/ > > /usr2/config/scripts/gempak/antarctica_merge.csh > > cleanup > > mv antarctica.gem /data/ldm/gempak/model/mm5_ice/${DATE}${HR}_d5.gem > > rm antarctica_uv.gem > > > > > > where the merge script is: > > /usr2/config/scripts/gempak% more ant*merge.csh > > #!/bin/csh -f > > > > > > @ SHOUR=6 > > @ EHOUR=36 > > > > set LEVELS=("1000" "925" "850" "700" "600" "500" "400" "300" "250" "200" > > "150" "100" "10" "300") > > while ( $SHOUR <= $EHOUR ) > > > > if ( $SHOUR < 10 ) then > > set FHOUR=F00${SHOUR} > > else > > set FHOUR=F0${SHOUR} > > endif > > > > @ LCNT=1 > > > > foreach LEVEL ($LEVELS) > > if ( $LCNT < 13 ) then > > set GVCORD="PRES" > > else > > set GVCORD="HGHT" > > endif > > > > echo LEVEL $LEVEL $GVCORD > > > > > > gddiag<< EOF_GDDIAG > > GDFILE = antarctica_uv.gem > > GDOUTF = antarctica.gem > > GFUNC = UREL > > GDATTIM = $FHOUR > > GLEVEL = $LEVEL > > GVCORD = $GVCORD > > GRDNAM = > > GRDTYP = S > > GPACK = none > > GRDHDR = > > PROJ = > > GRDAREA = > > KXKY = > > MAXGRD = > > CPYFIL = > > ANLYSS = > > run > > > > GFUNC = VREL > > run > > > > exit > > EOF_GDDIAG > > @ LCNT = $LCNT + 1 > > end > > > > @ SHOUR = $SHOUR + 1 > > end > > gpend > > > > exit 0 > > > > > > This is and has been working fine for the MM5. However, the WRF decoding > > does not work after I turned it back on this week. All the AMPS guys are > > on the ice right now so it's difficult to ask if they have changed > > anything. I do not believe they have. It seems like it MAY be a problem > > with nagrib. The reason I say that is that I can decode the file properly > > with dcgrib2, and can display anything other than winds. Winds as always > > won't display and gdplot2 core dumps. When the nagrib script runs it > > seemingly finds nothing to decode. See below: > > > > > > [NAGRIB 3] No valid parameter found for 170. > > [NAGRIB 3] No valid parameter found for 171. > > [NAGRIB 3] No valid parameter found for 153. > > [NAGRIB 3] No valid parameter found for 178. > > [NAGRIB 3] No valid parameter found for 170. > > [NAGRIB 3] No valid parameter found for 171. > > [NAGRIB 3] No valid parameter found for 153. > > [NAGRIB 3] No valid parameter found for 178. > > [NAGRIB 3] No valid parameter found for 170. > > [NAGRIB 3] No valid parameter found for 171. > > [NAGRIB 3] No valid parameter found for 153. > > [NAGRIB 3] No valid parameter found for 178. > > [NAGRIB 3] No valid parameter found for 170. > > [NAGRIB 3] No valid parameter found for 171. > > [NAGRIB 3] No valid parameter found for 153. > > [NAGRIB 3] No valid parameter found for 178. > > [NAGRIB 3] No valid parameter found for 170. > > etc..etc..etc.. > > > > > > 4368 GRIB messages were read or scanned from the GRIB file: > > 2007120112_D5.grb > > > > 0 grids were written to the GEMPAK file: > > tr.gem > > > > > > GRID FILE: tr.gem > > > > GRID NAVIGATION: > > PROJECTION: STR > > ANGLES: -90.0 180.0 0.0 > > GRID SIZE: 160 172 > > LL CORNER: -78.35 156.77 > > UR CORNER: -75.75 174.61 > > > > GRID ANALYSIS BLOCK: > > ANALYSIS TYPE: BARNES > > DELTAN: 4.000 > > DELTAX: -9999.000 > > DELTAY: -9999.000 > > GRID AREA: -80.00 156.00 -74.00 176.00 > > EXTEND AREA: -80.00 156.00 -74.00 176.00 > > DATA AREA: -80.00 156.00 -74.00 176.00 > > > > Number of grids in file: 0 > > > > Maximum number of grids in file: 10000 > > > > First time in file: ^L\233^G^Hp/ > > ^Hh/ > > ^Hl/ > > ^Hd/ > > ^H^V\307 ^H\200 > > Last time in file: \200 > > > > > > > > You can grab a file of the GRIB data to test with from: > > > > http://psnwx.balloonfacility.org/csbf/2007120300_D5.grb > > > > username is csbfmet, password is p!bal. > > > > Thanks a bunch, > > Robert Mullenax > > CSBF Meteorology > > > > > > > > > > > Ticket Details > =================== > Ticket ID: UER-356689 > Department: Support GEMPAK > Priority: Normal > Status: Closed > > > > Ticket Details =================== Ticket ID: UER-356689 Department: Support GEMPAK Priority: Normal Status: Closed