<div dir="ltr">i am facing problem using grads. i tried to display the result but everytime i display it in a different time it gives me a different picture too. can somebody help me solve this problem. my grads was  set offline.<div>
<br></div><div>dieni</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/5  <span dir="ltr">&lt;<a href="mailto:gradsusr-request@gradsusr.org" target="_blank">gradsusr-request@gradsusr.org</a>&gt;</span><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" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
or, via email, send a message with subject or body &#39;help&#39; 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 &quot;Re: Contents of gradsusr digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: lterp+sdfwrite adding extra longitude values<br>
      (Charles Seman - NOAA Federal)<br>
   2. Re: Decadal average plot (Hosmay Lopez)<br>
   3. Problems reading a netcdf file (Matt Bunkers - WFO UNR)<br>
   4. Re: how to merge file data using grads<br>
      (Muhammad Yunus Ahmad Mazuki)<br>
   5. Re: Problems reading a netcdf file (Jeff Duda)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 04 Sep 2013 18:02:48 -0400<br>
From: Charles Seman - NOAA Federal &lt;<a href="mailto:charles.seman@noaa.gov">charles.seman@noaa.gov</a>&gt;<br>
Subject: Re: [gradsusr] lterp+sdfwrite adding extra longitude values<br>
To: GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:5227AE08.8000305@noaa.gov">5227AE08.8000305@noaa.gov</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Andrew,<br>
<br>
from <a href="http://grads.iges.org/grads/gadoc/gradfunclterp.html" target="_blank">http://grads.iges.org/grads/gadoc/gradfunclterp.html</a>:<br>
---<br>
&quot;If the domain of source is larger than the domain of dest, the returned<br>
result will have an expanded grid to cover the requested domain.&quot;<br>
---<br>
<br>
compare the longitude limits for the fine and coarse grids... it could<br>
be that if the specified fine grid limits are outside the coarse<br>
longitude grid limits, the interpolation puts data in two extra outer<br>
longitudes in the destination grid to satisfy the grid environment<br>
defined by &quot;set X 1 [number of longitude points in <a href="http://fine.nc" target="_blank">fine.nc</a>]&quot;... so try<br>
&quot;set dfile 2 ; set X 1 [number of longitude points in <a href="http://coarse.nc" target="_blank">coarse.nc</a>]&quot; after<br>
&quot;sdfopen <a href="http://coarse.nc" target="_blank">coarse.nc</a>&quot;... this would set the global longitude limits to<br>
those of <a href="http://coarse.nc" target="_blank">coarse.nc</a>, which would then be within the limits of <a href="http://fine.nc" target="_blank">fine.nc</a><br>
<br>
Hope this helps,<br>
Chuck<br>
<br>
On 09/04/2013 04:42 PM, Andrew Friedman wrote:<br>
&gt; Hi GrADS users,<br>
&gt;<br>
&gt; I am using lterp to regrid a file to a coarser resolution, and saving the variable to netcdf using sdfwrite.<br>
&gt;<br>
&gt; My problem is that the output file has 2 additional longitudes compared to the input grid destination description file.<br>
&gt;<br>
&gt; Similar to the example in the lterp documentation in the grads index:<br>
&gt;<br>
&gt; sdfopen <a href="http://fine.nc" target="_blank">fine.nc</a><br>
&gt; set X 1 [number of longitude points in <a href="http://fine.nc" target="_blank">fine.nc</a>]<br>
&gt; sdfopen <a href="http://coarse.nc" target="_blank">coarse.nc</a><br>
&gt; output = lterp(fine,coarse.2,aave)<br>
&gt; set sdfwrite <a href="http://output.nc" target="_blank">output.nc</a><br>
&gt; sdfwrite output<br>
&gt;<br>
&gt; I&#39;ve had this issue before when there is just one input file, and explicitly defining longitude with the step &#39;set X 1 [number of longitude points]&#39; works to solve it. In this case however, I&#39;m not sure how to limit the longitude dimension of the output.<br>

&gt; Do you have ideas how I can fix this?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Andrew<br>
&gt;<br>
&gt;<br>
&gt; ------<br>
&gt; Andrew Friedman<br>
&gt; Graduate Student, UC Berkeley Geography<br>
&gt; <a href="mailto:andfried@berkeley.edu">andfried@berkeley.edu</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gradsusr mailing list<br>
&gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
<br>
--<br>
<br>
Please note that <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>
email address, not <a href="mailto:cjs@gfdl.noaa.gov">cjs@gfdl.noaa.gov</a>.<br>
<br>
********************************************************************<br>
  Charles Seman                                <a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a><br>
  U.S. Department of Commerce / NOAA / OAR<br>
  Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547<br>
  201 Forrestal Road                              fax: (609) 987-5063<br>
  Princeton, NJ  08540-6649            <a href="http://www.gfdl.noaa.gov/~cjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
********************************************************************<br>
<br>
&quot;The contents of this message are mine personally and do not reflect any<br>
official or unofficial position of the United States Federal Government,<br>
the United States Department of Commerce, or NOAA.&quot;<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 4 Sep 2013 22:57:18 +0000<br>
From: Hosmay Lopez &lt;<a href="mailto:hlopez@rsmas.miami.edu">hlopez@rsmas.miami.edu</a>&gt;<br>
Subject: Re: [gradsusr] Decadal average plot<br>
To: GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:8A902EB84795C94C8726F11DC8C574A81D456F9E@EXCHANGE1.amazon.rsmas.miami.edu">8A902EB84795C94C8726F11DC8C574A81D456F9E@EXCHANGE1.amazon.rsmas.miami.edu</a>&gt;<br>
<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
OK, I see,<br>
<br>
You can make use of while loops and output the averages, that is one record for each decaded totaling 20 as follows. Your averages will be output by the fwrite command, you will need a control file to read it.<br>
<br>
***************************************<br>
&#39;set gxout fwrite&#39;<br>
&#39;set fwrite decade_data.dat&#39;<br>
is = 1<br>
while(is &lt; = 2400)<br>
<br>
 &#39;set t &#39;is<br>
 &#39;d tloop(ave(temperature, t+0, t+119))&#39;<br>
 &#39;c&#39;<br>
<br>
is = is + 120<br>
endwhile<br>
&#39;disable fwrite&#39;<br>
&#39;set gxout contour&#39;<br>
*****************************************<br>
Hosmay Lopez<br>
Rosenstiel School of Marine and Atmospheric Science<br>
University of Miami<br>
4600 Rickenbacker Causeway Miami, FL 33149<br>
Office: MSC337<br>
Phone: (305) 298-8006<br>
________________________________<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>] on behalf of Mubashar Ahmad [<a href="mailto:mubashardogar@gmail.com">mubashardogar@gmail.com</a>]<br>

Sent: Wednesday, September 04, 2013 5:18 PM<br>
To: GrADS Users Forum<br>
Subject: Re: [gradsusr] Decadal average plot<br>
<br>
<br>
Hi lopez,<br>
<br>
Thanks for your input but I don&#39;t want runing mean average based on 10 years, instead I want decadal average such that after getting averaged value for first 10 years (average of 1 to 120 months) it should give value for next 10 years (average of 121 to 240th time) and so on.<br>

<br>
Thanks,<br>
<br>
Mubashar<br>
<br>
On Sep 4, 2013 9:45 PM, &quot;Hosmay Lopez&quot; &lt;<a href="mailto:hlopez@rsmas.miami.edu">hlopez@rsmas.miami.edu</a>&lt;mailto:<a href="mailto:hlopez@rsmas.miami.edu">hlopez@rsmas.miami.edu</a>&gt;&gt; wrote:<br>
Dear Mubashar,<br>
<br>
You can use the tloop function in conjunction with the ave function as follows:<br>
<br>
set t 61 2340<br>
d tloop(ave(temperature,t-60,t+60))<br>
<br>
This will create an average for decadal timescales.<br>
Note, the time start at month 61 = beginning of year 6 and ends at month 2340 = 5 years prior to year 200 of your data.<br>
<br>
At the end you should have a monthly time series of decadal averaged quantity.<br>
<br>
Best,<br>
<br>
Hosmay Lopez<br>
Rosenstiel School of Marine and Atmospheric Science<br>
University of Miami<br>
4600 Rickenbacker Causeway Miami, FL 33149<br>
Office: MSC337<br>
Phone: (305) 298-8006<br>
<br>
________________________________________<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>&lt;mailto:<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>&gt; [<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>&lt;mailto:<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>&gt;] on behalf of Mubashar Ahmad [<a href="mailto:mubashardogar@gmail.com">mubashardogar@gmail.com</a>&lt;mailto:<a href="mailto:mubashardogar@gmail.com">mubashardogar@gmail.com</a>&gt;]<br>

Sent: Wednesday, September 04, 2013 2:12 PM<br>
To: gradsusr<br>
Subject: [gradsusr] Decadal average plot<br>
<br>
Dear Grads Users,<br>
<br>
I have monthly time series data (let say surface temperature) and<br>
wanted to plot it on decadal average basis. I mean first value of plot<br>
will be average of first 120 months and the next value of my plot will<br>
be average of next 120 months and so on. In total for 200 years I<br>
should get 20 value in plot. How can I do that? Y axis will be decadal<br>
average temperature values and x axis can be labelled 1, 2, 3 up 20<br>
instead of months or years.<br>
<br>
Thanks,<br>
<br>
Mubashar<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&lt;mailto:<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&lt;mailto:<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130904/f8a95e3e/attachment-0001.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130904/f8a95e3e/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 4 Sep 2013 17:53:42 -0600<br>
From: Matt Bunkers - WFO UNR &lt;<a href="mailto:matthew.bunkers@noaa.gov">matthew.bunkers@noaa.gov</a>&gt;<br>
Subject: [gradsusr] Problems reading a netcdf file<br>
To: <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
Message-ID:<br>
        &lt;CAB_myoNDpT_8az_2Z=nW0p0dwudrtK9e9treWy=<a href="mailto:EJ5g2Q8RRBQ@mail.gmail.com">EJ5g2Q8RRBQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi,<br>
<br>
I have a netcdf file that cannot be opened with sdfopen because it doesn&#39;t<br>
follow the COORDS convention.  After creating a descriptor file with x, y,<br>
and t definitions I can open the file with xdfopen and display data.<br>
 However, when I use the &quot;set lat&quot; and &quot;set lon&quot; commands in this scenario<br>
the program bombs out.  I therefore decided to create the full descriptor<br>
file (with dtype netcdf, pdef set accordingly, etc.) so I could plot my<br>
area of interest with the &quot;set lat&quot; and &quot;set lon&quot; commands.  That all seems<br>
to work fine; however, my data values now are all zero.  This is perplexing<br>
because I could see non-zero data when opening the file with the xdfopen<br>
command, but not when I opened the netcdf file with the open command and<br>
full descriptor file (I&#39;m trying to plot forecast precipitation, by the<br>
way).  If needed I can provide a copy of my descriptor file.  Thanks for<br>
any advice you can offer.<br>
<br>
-- Matt Bunkers, NWS Rapid City, SD<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130904/9c2503be/attachment-0001.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130904/9c2503be/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 5 Sep 2013 10:25:17 +0800<br>
From: Muhammad Yunus Ahmad Mazuki &lt;<a href="mailto:ukm.yunus@gmail.com">ukm.yunus@gmail.com</a>&gt;<br>
Subject: Re: [gradsusr] how to merge file data using grads<br>
To: GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CAKJBA6ZJbEeWB-iJC-bLDDHtjkJSFULt%2BA3GmxcsWwt7D%2BXDvA@mail.gmail.com">CAKJBA6ZJbEeWB-iJC-bLDDHtjkJSFULt+A3GmxcsWwt7D+XDvA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
You can either use read and write back script in grads. Or you can work<br>
directly on the file with &#39;cdo&#39;. That if you want to rewrite the files into<br>
one file. You can also use template option in a controller file to read all<br>
10 file as one file.<br>
<br>
<br>
On Wed, Sep 4, 2013 at 3:57 PM, Lyndon Mark Olaguera &lt;<br>
<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a>&gt; wrote:<br>
<br>
&gt; what type of data file is this? an output from WRF?<br>
&gt; Can you give some details..<br>
&gt;<br>
&gt; Lyndon<br>
&gt;<br>
&gt; *Lyndon Mark P. Olaguera*<br>
&gt; Assistant Instructor<br>
&gt; Ateneo de Manila University<br>
&gt; 426 6001<br>
&gt; loc 5695<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Sep 4, 2013 at 2:48 PM, Indah Lutfiyanti &lt;<br>
&gt; <a href="mailto:indahlutfiyanti387@yahoo.com">indahlutfiyanti387@yahoo.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Dear Senior,<br>
&gt;&gt;<br>
&gt;&gt; please help me, I have problem how to merge data which is separate 10<br>
&gt;&gt; file to be 1 file using grads?<br>
&gt;&gt;<br>
&gt;&gt; thank you<br>
&gt;&gt;<br>
&gt;&gt; Lutfi<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; gradsusr mailing list<br>
&gt;&gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt;&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gradsusr mailing list<br>
&gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130905/c6c7ea27/attachment-0001.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130905/c6c7ea27/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 4 Sep 2013 21:45:53 -0500<br>
From: Jeff Duda &lt;<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>&gt;<br>
Subject: Re: [gradsusr] Problems reading a netcdf file<br>
To: GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CAAig09B51hgYE%2BYH-qJFqyuAGmJKfB3rHotkcuTYwP2GHis0-g@mail.gmail.com">CAAig09B51hgYE+YH-qJFqyuAGmJKfB3rHotkcuTYwP2GHis0-g@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Matt,<br>
I would have to guess there is some sort of error in your control file.  I<br>
frequently view netCDF files in Grads and have had similar issues in the<br>
past.<br>
<br>
Jeff Duda<br>
<br>
<br>
On Wed, Sep 4, 2013 at 6:53 PM, Matt Bunkers - WFO UNR &lt;<br>
<a href="mailto:matthew.bunkers@noaa.gov">matthew.bunkers@noaa.gov</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I have a netcdf file that cannot be opened with sdfopen because it doesn&#39;t<br>
&gt; follow the COORDS convention.  After creating a descriptor file with x, y,<br>
&gt; and t definitions I can open the file with xdfopen and display data.<br>
&gt;  However, when I use the &quot;set lat&quot; and &quot;set lon&quot; commands in this scenario<br>
&gt; the program bombs out.  I therefore decided to create the full descriptor<br>
&gt; file (with dtype netcdf, pdef set accordingly, etc.) so I could plot my<br>
&gt; area of interest with the &quot;set lat&quot; and &quot;set lon&quot; commands.  That all seems<br>
&gt; to work fine; however, my data values now are all zero.  This is perplexing<br>
&gt; because I could see non-zero data when opening the file with the xdfopen<br>
&gt; command, but not when I opened the netcdf file with the open command and<br>
&gt; full descriptor file (I&#39;m trying to plot forecast precipitation, by the<br>
&gt; way).  If needed I can provide a copy of my descriptor file.  Thanks for<br>
&gt; any advice you can offer.<br>
&gt;<br>
&gt; -- Matt Bunkers, NWS Rapid City, SD<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gradsusr mailing list<br>
&gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
Jeff Duda<br>
Graduate research assistant<br>
University of Oklahoma School of Meteorology<br>
Center for Analysis and Prediction of Storms<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130904/228d2488/attachment.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130904/228d2488/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
End of gradsusr Digest, Vol 43, Issue 18<br>
****************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(102,0,0)"><span style="background-color:rgb(255,255,255)"><font><span style="font-family:arial,helvetica,sans-serif"><span><b>Dieni Fitriani Buch<span></span>ary Akman<br>
</b><i><font><font>Laboratory of</font> Meteorology</font><br><span>Major in Applied Meteorology<br>Department of Geophysics and Meteorology<br>Faculty of Mathematics and Natural Science<br>Bogor Agricultural University<br>
<br></span></i></span></span></font></span></span>
</div>