<div dir="ltr"><div><div>Alvin,<br><br></div>You might want to consider learning about regular expressions (regex). They are used in a<br></div><div>number of computer languages and many utilities. I had a little fun and wrote the regex on one line.<br></div><div><br>wgrib2 in.grb -match ":((U|V)GRD:10 m above ground|PRMSL|(ABSV|HGT|UGRD|VGRD|TMP):(850|700|500) mb):" -grib out.grb<br><br></div><div>For readability, I would use a slower version<br><br></div><div>wgrib2 in.grb -match ":(UGRD:10 m above ground|VGRD:10 m above ground|PRMSL):" -grib out.grb<br></div><div>wgrib2 in.grb -match ":(HGT|UGRD|VGRD|TMP):(850|700|500) mb:" -append -grib out.grb<br><br></div><div>Wesley<br><br></div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 3:42 AM, J43 <span dir="ltr"><<a href="mailto:webmaster@meteorologic.net" target="_blank">webmaster@meteorologic.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>Use the command -match, wgrib2 -s FullGrib.grb2 -match
"(:HGT:500 mb:|:VGRD:10 m above ground:|:TMP:850 mb:)" -grib_out
MinIGribFile.grb2</p>
<p>To have a level and variable, make a simple index with a command
-s : wgrib2 -s FullGrib.grb2</p>
<p>Best regards,</p>
<p>Jérémy</p>
<p><br>
</p>
<div>Le 28/04/2016 à 09:36, Alvin Pura a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:verdana,sans-serif">Dear all,<br>
<br>
</div>
<div style="font-family:verdana,sans-serif">I have grib2 to files,
but only wanted to select the following variables @ 850, 700
and 500 mb.<br>
<br>
</div>
<div style="font-family:verdana,sans-serif">1. ABSV<br>
</div>
<div style="font-family:verdana,sans-serif">2.HGT<br>
</div>
<div style="font-family:verdana,sans-serif">3. PRMSL<br>
</div>
<div style="font-family:verdana,sans-serif">4. UGRD<br>
</div>
<div style="font-family:verdana,sans-serif">5. UGRD:10m<br>
</div>
<div style="font-family:verdana,sans-serif">6. VGRD<br>
</div>
<div style="font-family:verdana,sans-serif">7. VGRD:10m<br>
</div>
<div style="font-family:verdana,sans-serif">8. TMP<br>
<br>
</div>
<div style="font-family:verdana,sans-serif">I am successful using
wgrib2 but cant figure out how to limit the variables only
for 850, 700 and 500mb level.<br>
<br>
</div>
<div style="font-family:verdana,sans-serif">Thanks.<br>
<br clear="all">
</div>
<div>
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="arial black, sans-serif" color="#3d85c6"><b style="background-color:rgb(255,255,255)">Alvin
<br>
</b></font>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div></div></div></div></div></div>