<div dir="ltr">Hi Yohanan,<div>Calculating a 4-month running average is similar to calculating a 3-month running average. As the calculation is done over an even number of months, the 4-timestep average (over slots 1,2,3 and 4) will be placed in the 2nd slot. You can test this out interactively by typing the following:</div><div>ncl</div><div>a = (/4,1.2,7.4,8.0,-0.1/)</div><div>temp = runave(a,4,0)</div><div>print(temp)</div><div><div>(0)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>9.96921e+36</div><div>(1)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>5.15</div><div>(2)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>4.125</div><div>(3)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>9.96921e+36</div><div>(4)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>9.96921e+36</div></div><div><br></div><div>You can see the average of the first four numbers is put into the (1) slot.</div><div><br></div><div>For a case involving a 3 dimensional array with metadata you can use runave_n_Wrap:</div><div>; arr = array dimensioned time x lat x lon</div><div>temp = runave_n_Wrap(arr,4,0,0)</div><div>arr_fmam = temp(2::12,:,:)</div><div><br></div><div>Make sure you check the input and output so you know the coding is doing what you think it is doing.</div><div><br></div><div>Hope that helps. If you have any further questions please post back to the ncl-talk email list.</div><div>Adam</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 20, 2017 at 5:39 AM, yohanan sweet <span dir="ltr">&lt;<a href="mailto:marsilas23@gmail.com" target="_blank">marsilas23@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">Heloo ncl tailk <br><div><br></div><div>I want to plot correlation between rainfall and Nino 3.4 index,with the ruining average of 4 month i can run average for 3 month how i can make 4 month average for FMAM. can anyone help me please??</div><div><br></div><div>Thank you</div><div>Yohanan F</div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<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><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>