<div dir="auto"><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px;color:rgb(0,0,255)"><b><span style="color:rgb(0,0,0)">Hello,</span></b></span></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">The below process just reduced 4 days from time steps.</span><span style="font-family:sans-serif;font-size:12.8px;color:rgb(0,0,255)"><b><span style="color:rgb(0,0,0)"><br></span></b></span></div><span style="font-family:sans-serif;font-size:12.8px;color:rgb(0,0,255)"><b><span style="color:rgb(0,0,0)">cdo</span> </b></span><b style="font-family:sans-serif;font-size:12.8px"><span style="color:rgb(0,0,255)">-runavg</span></b><span style="font-family:sans-serif;font-size:12.8px">,5 infile outfile</span><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">I used the above procedure over an one year file (365 days). After operation its dimension becomes as follows;</span></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">Lat =129, Lon =135 , time=361</span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px"><br></span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">Whereas,</span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px"> </span></font><span style="font-family:sans-serif;font-size:12.8px">cdo -timselmean,5 infile outfile</span></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">Give the correct result in terms of time dimension which one is expected.</span></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">Lat =129, Lon=135, time=73 </span></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px"><br></span></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">Soma</span></font></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018, 10:03 Soma Roy <<a href="mailto:somaroy892@gmail.com" target="_blank" rel="noreferrer">somaroy892@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Thank you very much.<div dir="auto"><br></div><div dir="auto">Soma</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018, 04:05 Dennis Shea <<a href="mailto:shea@ucar.edu" rel="noreferrer noreferrer" target="_blank">shea@ucar.edu</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Better:</div><div><br></div><div>navg = 5<br></div><div>xRunAvg = ...</div><div><div>nStrt = navg/2</div></div><div>xBlock_5 = xRunAvg(nStrt::navg,:,:)</div><div><br></div><div><div>navg = 7</div><div>xRunAvg = ...<br></div><div>nStrt = navg/2<br></div><div>xBlock_7 = xRunAvg(nStrt::navg,:,:)</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018 at 3:19 PM Dennis Shea <<a href="mailto:shea@ucar.edu" rel="noreferrer noreferrer noreferrer" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Soma,</div><div><br></div><div>What you want are <b>block</b> 5-day and 7-day averages. EG: <b>"73</b> times for a <b>365</b> day series."<br></div><div>It is your responsibility to be clear on your objective.<br></div><div>Otherwise, people spend their valuable time trying to figure out what you want.</div><div><br></div><div>x(time, lat, lon) .... (ntim,nlat,mlon)<br></div><div> 0 1 2 <=== dimension numbers [ Please read NCL documentation]<br></div><div><br></div><div>Two approaches:</div><div><br></div><div>[1]</div><div><br></div><div><div> endopt = ... ; -1, 0, 1 PLEASE read the documentation</div><div> ndim_time = 0</div></div><div><br></div><div> navg = 5</div><div> xRunAvg = <b><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/runave_n_Wrap.shtml" rel="noreferrer noreferrer noreferrer" target="_blank">runave_n_Wrap</a>(</b>x, navg, endopt, ndim_time) ; classic running average (ntim,nlat,mlon)</div><div> xBlock_5 = xRunAvg(::navg,:,:)</div><div> printVarSummary(xBlock_5)</div><div><br></div><div> navg = 7 <br></div><div> xRunAvg = <b><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/runave_n_Wrap.shtml" rel="noreferrer noreferrer noreferrer" target="_blank">runave_n_Wrap</a>(</b>x, navg, endopt, ndim_time) ; classic running average (ntim,nlat,mlon)</div><div> xBlock_7 = xRunAvg(::navg,:,:)</div><div> printVarSummary(xBlock_7)</div><div><br></div><div>[2]</div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_segment_values.shtml" rel="noreferrer noreferrer noreferrer" target="_blank"><b>http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_segment_values.shtml</b></a></div><div><br></div><div>This requires that 'time' have CF conforming units. I suggest you use [1].<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018 at 2:27 PM Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">somaroy892@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I used the example 2 from the below link;</div><div dir="auto"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/runave_n.shtml" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/runave_n.shtml</a><br></div><div dir="auto"><br></div><div dir="auto">But there is no change in output time dimension.</div><div dir="auto">I used 365 days data over nlat x nlon as input.</div><div dir="auto"><br></div><div dir="auto">I set nave=5 with expectation to get nlat x nlon for 73 times in output.</div><div dir="auto"><br></div><div dir="auto">But there is no change in output dimensions. Then how to extract 5 days running avg. over 365 days dataset?</div><div dir="auto"><br></div><div dir="auto">Kindly inform me.</div><div dir="auto"><br></div><div dir="auto">Thanking you,</div><div dir="auto">Soma</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018, 21:10 Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">somaroy892@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Thanks for the hints<div dir="auto"><br></div><div dir="auto">Soma</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018, 19:21 Appo derbetini <<a href="mailto:appopson4@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">appopson4@gmail.com</a> wrote:<br></div><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>I think that you easily do it with <b><br></b></div><div dir="ltr"><b><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/runave_n.shtml" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/runave_n.shtml</a></b></div><div dir="ltr"><br></div><div>Regards<b><br></b></div></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 3 déc. 2018 à 10:54, Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">somaroy892@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Thank you.<div dir="auto">Efficient way to do.</div><div dir="auto"><br></div><div dir="auto">But I would like to know also the steps for this by using ncl.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Soma</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018, 15:14 Oluwaseun Ilori <<a href="mailto:wilseun@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">wilseun@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Cdo will do it easily and better<div dir="auto"><br></div><div dir="auto"><div dir="auto">cdo -timselmean,5 infile outfile</div><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018, 10:36 AM Soma Roy <<a href="mailto:somaroy892@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">somaroy892@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I am using daily gridded rainfall datasets.</div><div dir="auto">I want to compute 5 days and 7 days running avg. of rainfall from the datasets over each grid points.</div><div dir="auto"><br></div><div dir="auto">Structure of the input file is like below;</div><div dir="auto"><br></div><div dir="auto">Rain (730, 129, 135) ; (time (365*2), lat, lon)</div><div dir="auto"><br></div><div dir="auto">Please kindly inform me which function should I use in this case.</div><div dir="auto"><br></div><div dir="auto">Thanking you,</div><div dir="auto">Soma</div><div dir="auto"><br></div><div dir="auto"><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" 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 noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" 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 noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noreferrer noreferrer noreferrer" 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 noreferrer noreferrer noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>