<div dir="ltr"><div><div>is there a way for you to compare the actual file size to an expected file size (like from the server you are downloading from)?<br><br></div>Also did you try other wgrib2 options like -v or -v2 to see if there is a unique output line you can use to determine if the file is complete or not?<br><br></div>Jeff <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 12, 2016 at 3:17 PM, Ivan Toman <span dir="ltr"><<a href="mailto:ivtoman@inet.hr" target="_blank">ivtoman@inet.hr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div class="m_-3727011531461043760moz-cite-prefix">Hello Jeff,<br>
<br>
Yes I know that, but for some reason I can't find a method to
successfully capture error from wgrib2, neither by grepping
response, neither by trying to use exit code from command. Does
anybody have an example?<br>
<br>
Thank you again,<br>
Ivan Toman<br>
<br>
<br>
On 10/12/2016 10:04 PM, Jeff Duda wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>wgrib2 -V (file) should give you a full listing of the
arrays and their dimensionalities and projection information.
If you don't have a fully prepared file, it should error out.<br>
<br>
</div>
Jeff Duda<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 12, 2016 at 3:00 PM, Ivan
Toman <span dir="ltr"><<a href="mailto:ivtoman@inet.hr" target="_blank">ivtoman@inet.hr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello
GrADS users,<br>
<br>
Sometime when I download grib2 NCEP files with grib filter
tool, I get<br>
incomplete file. How can I robustly use wgrib2 tool in bash
script to<br>
check downloaded file if it is valid grib2 file or not?<br>
<br>
Thank you!<br>
<br>
Best regards,<br>
<br>
Ivan Toman<br>
<br>
______________________________<wbr>_________________<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/li<wbr>stinfo/gradsusr</a><br>
</blockquote>
</div>
<br>
<br clear="all"><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
<div class="m_-3727011531461043760gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>Jeff Duda<br>
Post-doctoral research associate<br>
University of Oklahoma School of Meteorology<br>
</div>
</div>
</div>
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<fieldset class="m_-3727011531461043760mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
gradsusr mailing list
<a class="m_-3727011531461043760moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a class="m_-3727011531461043760moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a>
</pre>
</font></span></blockquote>
<p><br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</div>