<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I am trying to parse out 3-hour APCP from the new FV3-GFS GRIB2 files from <a href="https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20190625/00/" class="OWAAutoLink" id="LPlnk185922" previewremoved="true">https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20190625/00/</a>.
I am using a bash script to attempt this using the wgrib2 tool.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><b>My Efforts:</b></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">ta=0</span></div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">count=80</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">while [ ${ta} -le 240 ]</span></div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">do</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">tb=`expr ${ta} + 3`</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">wgrib2 gfs.t00z.pgrb2.0p25.grib2 | grep ":APCP:surface:" | grep ":${ta}-${tb} hour acc fcst" | wgrib2 -i gfs.t00z.pgrb2.0p25.grib2 -grib gfs_apcp_${count}.grib2</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">count=`expr ${count} + 1`</span></div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">ta=`expr ${ta} + 3`</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">done</span></div>
<div><br>
</div>
<div><span style="font-family: "Courier New", monospace; font-size: 10pt;">cat gfs_apcp_*.grib2 >> gfs_apcp_3hr.grib2</span></div>
<div><br>
</div>
<div>When this code is run, it is as if no parsing out has been done, because the new accumulating APCP parameters remain.</div>
<div><br>
</div>
<div>Is there something obvious that I'm doing wrong here?</div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">Thank you,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<span style="font-size:12pt; font-size:12pt"></span>
<div style="font-size:13px; color:rgb(0,0,0); font-family:Tahoma"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9" style=""><span style="font-size:11pt"><b><span style="font-size:14pt">Aaron
Perry</span></b></span></font></font></div>
<div style="color:rgb(0,0,0); font-family:Tahoma"><font face="Calibri,Arial,Helvetica,sans-serif" style=""><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9" style="font-size:13px"><span style="font-size:11pt"><span style="font-size:14pt"></span></span></font><font face="Calibri,Arial,Helvetica,sans-serif" color="#006FC9" style=""><span style="font-size:12pt">Meteorologist<br>
</span><span style="font-size:12pt"></span></font><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9" style="font-size:13px"><span style="font-size:12pt">Class of '16</span></font><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9" style="font-size:13px"><span style="font-size:12pt"><br>
</span></font><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9" style="font-size:13px"><span style="font-size:12pt">Northern Vermont University-Lyndon</span></font></font></div>
<div style="font-size:13px; color:rgb(0,0,0); font-family:Tahoma"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9"><span style="font-size:12pt"><span style="font-size:10pt">(formerly </span><span style="font-size:10pt">Lyndon
State College)</span></span></font><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9"><span style="font-size:12pt"><br>
<span style="font-size:12pt"></span><span style="font-size:12pt">Boston, Mass.</span></span></font></font></div>
<span style="font-size:12pt"></span>
<div style="font-size:13px; color:rgb(0,0,0); font-family:Tahoma"><font face="Calibri,Arial,Helvetica,sans-serif"><font size="2" color="#006FC9"><span style="font-size:12pt"><span style="font-size:12pt">Twitter:
</span><a href="https://twitter.com/AaronPerryWx" class="OWAAutoLink" id="LPNoLP"><span style="font-size:12pt">@AaronPerryWx</span></a></span></font><font size="2"><span style="font-size:11pt"><span style="font-size:12pt"><a href="https://twitter.com/arnpry" target="_blank" id="LPNoLP"></a><a href="https://twitter.com/AaronPerryWx" class="OWAAutoLink" id="LPNoLP"></a></span></span></font></font></div>
<span style="font-size:12pt"></span>
<div style="font-size:13px; color:rgb(0,0,0); font-family:Tahoma"><font face="Calibri,Arial,Helvetica,sans-serif"><font face="Calibri,Arial,Helvetica,sans-serif" size="2" color="#006FC9"><span style="font-size:12pt">Email: </span></font><a href="http://Aaron.Perry@lyndonstate.edu/" target="_blank" id="LPNoLP"><font face="Calibri,Arial,Helvetica,sans-serif" size="2"><span style="font-size:12pt">Aaron.Perry@lyndonstate.edu</span></font></a></font></div>
</div>
</div>
</div>
</body>
</html>