<div dir="ltr"><div>Dear Grads Users,</div><div><br></div> I have problem to find script that all of you discussed.<div><br></div><div>Please help me to find it.</div><div><br></div><div>thanks</div><div><br></div><div>Narendra sharma</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 October 2016 at 05:44, <span dir="ltr"><<a href="mailto:gradsusr-request@gradsusr.org" target="_blank">gradsusr-request@gradsusr.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send gradsusr mailing list submissions to<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:gradsusr-request@gradsusr.org">gradsusr-request@gradsusr.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:gradsusr-owner@gradsusr.org">gradsusr-owner@gradsusr.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of gradsusr digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Linear Trend Analysis using Grads (Tereza Cavazos)<br>
2. Re: Use wgrib2 to check if grib2 file is valid<br>
(Love, Mr. Gary, Contractor, Code 7542)<br>
3. Re: Use wgrib2 to check if grib2 file is valid<br>
(Wesley Ebisuzaki - NOAA Federal)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Thu, 13 Oct 2016 14:28:02 -0700<br>
From: Tereza Cavazos <<a href="mailto:tcavazos@cicese.mx">tcavazos@cicese.mx</a>><br>
Subject: Re: [gradsusr] Linear Trend Analysis using Grads<br>
To: <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>, <a href="mailto:dhaval.prajapati@ICCSIR.ORG">dhaval.prajapati@ICCSIR.ORG</a><br>
Message-ID: <<a href="mailto:ca13d287-8341-f7e0-77b2-c569fdf3dbbe@cicese.mx">ca13d287-8341-f7e0-77b2-<wbr>c569fdf3dbbe@cicese.mx</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
Hi,<br>
<br>
I found a script to calculate linear trends and its significance in<br>
Grads by Dhaval.<br>
I wonder if anyone has written a script to calculate the trend using the<br>
Mann-Kendall test and/or Sen?s test for the significance of the trend.<br>
<br>
I will appreciate any help.<br>
Cheers,<br>
<br>
Tereza<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 14 Oct 2016 00:01:43 +0000<br>
From: "Love, Mr. Gary, Contractor, Code 7542"<br>
<<a href="mailto:gary.love.ctr@nrlmry.navy.mil">gary.love.ctr@nrlmry.navy.mil</a><wbr>><br>
Subject: Re: [gradsusr] Use wgrib2 to check if grib2 file is valid<br>
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
Message-ID: <<a href="mailto:7e6513e48ddc43eaaca0fc0647a51605@ZEUS-2.nrlmry.navy.mil">7e6513e48ddc43eaaca0fc0647a51<wbr>605@ZEUS-2.nrlmry.navy.mil</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Wesley,<br>
<br>
<br>
<br>
Have you tried<br>
<br>
<br>
<br>
| wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 2>&1 | grep ERROR<br>
<br>
<br>
<br>
The redirect, 2>&1, is supposed to add the results of STDERR to STDOUT.<br>
<br>
<br>
<br>
Gary Love<br>
<br>
<br>
<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@<wbr>gradsusr.org</a>] On<br>
Behalf Of Wesley Ebisuzaki - NOAA Federal<br>
Sent: Thursday, October 13, 2016 6:02 AM<br>
To: GrADS Users Forum<br>
Subject: Re: [gradsusr] Use wgrib2 to check if grib2 file is valid<br>
<br>
<br>
<br>
Ivan,<br>
<br>
| wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR<br>
<br>
does not work because the error message is sent to STDERR.<br>
<br>
It depends on the shell but in bash,<br>
<br>
wgrib2 -v 2016101212.gfs.t12z.pgrb2f00 2>stderr.txt<br>
<br>
will send the error messages to stderr.txt<br>
<br>
My (bash) suggestion is<br>
<br>
wgrib2 2016101212.gfs.t12z.pgrb2f001 > tmp.inv<br>
<br>
# now to check the return code<br>
<br>
if ["$?" -ne 0 ] ; then<br>
<br>
echo "ERROR"<br>
<br>
do_something<br>
<br>
fi<br>
<br>
# since is is possible that you got no file or a smaller but complete file<br>
<br>
# check the number of lines in the inventory .. see if you got what you want<br>
<br>
N_REC=22<br>
<br>
if [ "$N_REC" -ne `wc -n <tmp.inv` ] ; then<br>
<br>
echo "ERROR2"<br>
<br>
do_something<br>
<br>
fi<br>
<br>
rm tmp.inv<br>
<br>
Wesley<br>
<br>
<br>
<br>
On Wed, Oct 12, 2016 at 5:48 PM, Ivan Toman <<a href="mailto:ivtoman@inet.hr">ivtoman@inet.hr</a>> wrote:<br>
<br>
Hello Jeff,<br>
<br>
I do compare file sizes currently, but as they change little bit, it is<br>
still not too robust. I'm trying to find fail proof solution.<br>
<br>
So as I said, I can't capture response from wgrib2 into variable for<br>
some reason. See these two examples:<br>
<br>
Example 1) Capturing date output to variable:<br>
$ response=`date`<br>
$ echo $response<br>
Wed Oct 12 20:50:46 UTC 2016<br>
<br>
Works just fine.<br>
<br>
<br>
Wgrib2 error:<br>
wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR<br>
<br>
*** FATAL ERROR: rd_grib2_msg_seq_file, read outside of file, bad grib<br>
file ***<br>
<br>
<br>
Example 2) Trying to capture ERROR from wgrib2:<br>
$ response=`wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR`<br>
<br>
*** FATAL ERROR: rd_grib2_msg_seq_file, read outside of file, bad grib<br>
file ***<br>
$ echo $response<br>
<br>
<br>
Nothing is returned. Empty variable. That is what I try to fix..<br>
<br>
Thank you,<br>
Ivan Toman<br>
<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>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20161014/677c2dd9/attachment-0001.html" rel="noreferrer" target="_blank">http://gradsusr.org/pipermail/<wbr>gradsusr/attachments/20161014/<wbr>677c2dd9/attachment-0001.html</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: smime.p7s<br>
Type: application/pkcs7-signature<br>
Size: 5433 bytes<br>
Desc: not available<br>
Url : <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20161014/677c2dd9/attachment-0001.bin" rel="noreferrer" target="_blank">http://gradsusr.org/pipermail/<wbr>gradsusr/attachments/20161014/<wbr>677c2dd9/attachment-0001.bin</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 14 Oct 2016 08:44:56 -0400<br>
From: Wesley Ebisuzaki - NOAA Federal <<a href="mailto:wesley.ebisuzaki@noaa.gov">wesley.ebisuzaki@noaa.gov</a>><br>
Subject: Re: [gradsusr] Use wgrib2 to check if grib2 file is valid<br>
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAMHOGekvpt_gxGoavfe3OgOt3vy_ig1VKxSLHq_6V%2BJVRVe4Fg@mail.gmail.com">CAMHOGekvpt_gxGoavfe3OgOt3vy_<wbr>ig1VKxSLHq_6V+JVRVe4Fg@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Gary,<br>
<br>
On Thu, Oct 13, 2016 at 8:01 PM, Love, Mr. Gary, Contractor, Code 7542 <<br>
<a href="mailto:gary.love.ctr@nrlmry.navy.mil">gary.love.ctr@nrlmry.navy.mil</a>> wrote:<br>
<br>
> Wesley,<br>
><br>
><br>
><br>
> Have you tried<br>
><br>
><br>
><br>
> | wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 2>&1 | grep ERROR<br>
><br>
><br>
><br>
> The redirect, 2>&1, is supposed to add the results of STDERR to STDOUT.<br>
><br>
<br>
You can do this but you need to check for two conditions<br>
<br>
1) error detected by wgrib2; for example, the grib message is incomplete<br>
2) file is short but wgrib2 doesn't find an incomplete grib message.<br>
for example; the server's copy of the file is missing fields<br>
or the transmission fortuitously stopped at the end of a<br>
message.<br>
<br>
Condition 2 requires you to read stdout. Adding stderr to stdout makes life<br>
confusing. Otherwise it is a good suggestion.<br>
<br>
Wesley<br>
<br>
<br>
<br>
<br>
><br>
><br>
> Gary Love<br>
><br>
><br>
><br>
> *From:* <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@">gradsusr-bounces@</a><br>
> <a href="http://gradsusr.org" rel="noreferrer" target="_blank">gradsusr.org</a>] *On Behalf Of *Wesley Ebisuzaki - NOAA Federal<br>
> *Sent:* Thursday, October 13, 2016 6:02 AM<br>
> *To:* GrADS Users Forum<br>
> *Subject:* Re: [gradsusr] Use wgrib2 to check if grib2 file is valid<br>
><br>
><br>
><br>
> Ivan,<br>
><br>
> | wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR<br>
><br>
> does not work because the error message is sent to STDERR.<br>
><br>
> It depends on the shell but in bash,<br>
><br>
> wgrib2 -v 2016101212.gfs.t12z.pgrb2f00 2>stderr.txt<br>
><br>
> will send the error messages to stderr.txt<br>
><br>
> My (bash) suggestion is<br>
><br>
> wgrib2 2016101212.gfs.t12z.pgrb2f001 > tmp.inv<br>
><br>
> # now to check the return code<br>
><br>
> if ["$?" -ne 0 ] ; then<br>
><br>
> echo "ERROR"<br>
><br>
> do_something<br>
><br>
> fi<br>
><br>
> # since is is possible that you got no file or a smaller but complete file<br>
><br>
> # check the number of lines in the inventory .. see if you got what you<br>
> want<br>
><br>
> N_REC=22<br>
><br>
> if [ "$N_REC" -ne `wc -n <tmp.inv` ] ; then<br>
><br>
> echo "ERROR2"<br>
><br>
> do_something<br>
><br>
> fi<br>
><br>
> rm tmp.inv<br>
><br>
> Wesley<br>
><br>
><br>
><br>
> On Wed, Oct 12, 2016 at 5:48 PM, Ivan Toman <<a href="mailto:ivtoman@inet.hr">ivtoman@inet.hr</a>> wrote:<br>
><br>
> Hello Jeff,<br>
><br>
> I do compare file sizes currently, but as they change little bit, it is<br>
> still not too robust. I'm trying to find fail proof solution.<br>
><br>
> So as I said, I can't capture response from wgrib2 into variable for<br>
> some reason. See these two examples:<br>
><br>
> Example 1) Capturing date output to variable:<br>
> $ response=`date`<br>
> $ echo $response<br>
> Wed Oct 12 20:50:46 UTC 2016<br>
><br>
> Works just fine.<br>
><br>
><br>
> Wgrib2 error:<br>
> wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR<br>
><br>
> *** FATAL ERROR: rd_grib2_msg_seq_file, read outside of file, bad grib<br>
> file ***<br>
><br>
><br>
> Example 2) Trying to capture ERROR from wgrib2:<br>
> $ response=`wgrib2 -v 2016101212.gfs.t12z.pgrb2f001 | grep ERROR`<br>
><br>
> *** FATAL ERROR: rd_grib2_msg_seq_file, read outside of file, bad grib<br>
> file ***<br>
> $ echo $response<br>
><br>
><br>
> Nothing is returned. Empty variable. That is what I try to fix..<br>
><br>
> Thank you,<br>
> Ivan Toman<br>
><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>
><br>
><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>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20161014/4a456003/attachment.html" rel="noreferrer" target="_blank">http://gradsusr.org/pipermail/<wbr>gradsusr/attachments/20161014/<wbr>4a456003/attachment.html</a><br>
<br>
------------------------------<br>
<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>
<br>
End of gradsusr Digest, Vol 80, Issue 19<br>
******************************<wbr>**********<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b><i style="background-color:rgb(243,243,243)"><font color="#6aa84f">Narendra Sharma</font></i></b><div><b><i style="background-color:rgb(243,243,243)"><font color="#6aa84f">(M.Sc.(Mathematics) )(B.H.U.) ,</font></i></b></div><div><b><i style="background-color:rgb(243,243,243)"><font color="#6aa84f">Research Scholar in IESD B.H.U.</font></i></b></div><div><b><i style="background-color:rgb(243,243,243)"><font color="#6aa84f"> varanasi</font></i></b></div><div><b><i style="background-color:rgb(243,243,243)"><font color="#6aa84f">+91-8574486661</font></i></b></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>