<div dir="ltr"><div class="gmail_default" style="font-size:small">Debasish,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Sorry for the delayed response.  I&#39;m not sure I understand your question fully, because you said &quot;9z data will be average of 8z and 10z&quot;, but I assume you meant &quot;between 8z and 10z&quot;.  Also, if you are talking 3-hourly data, are you sure 8z to 10z is the correct range?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Anyway, just to show how you can pick off the desired hours and calculate the average of that range, I&#39;ve written a simple NCL script that reads your CSV data, pulls off the &quot;hour&quot; values separately, and shows how to get all the indexes of a particular hour range (8-10) to get an average of the rainfall data for those indexes. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I wasn&#39;t really satisfied with this, so I wrote a more complicated script that loops through the hours in steps of 3 to collect the averages for each 3-hour period.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Hopefully this will help you get started. I&#39;ve attached both scripts.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 6, 2016 at 10:18 AM, Debasish Hazra <span dir="ltr">&lt;<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I have point observation data of for a month which are at irreular intervals in .csv format. I am readin it in year,month, day, hh format. But I would like to do averages at certain intervals to compare against 3 hourly forecast of model. So I need to do average of the point data for all days ina month, such that for 9z data will be average of 8z and 10z, for 12z it is 11 and 13z, for 15z between 14z and 16z and for 18z it will be between 17z and 19z of the input. Any help on how to do that. Attached is input data and .txt ncl code.</div><div><br></div><div>Thanks.</div><span class="m_-8000295667730077083HOEnZb"><font color="#888888"><div>Debasish.</div></font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div>