<div dir="ltr">Prashanth,<div><br></div><div>All of the original arrays have exactly the same dimensions.  This means you can easily combine them into a single 2-D virtual array, using array constructors (/ ... /).  See the NCL user manual for details.  See if this works.</div><br>    result = avg ( (/ a1, a2, a3, a4, a5, a6, a7, a8, a9 /) )<div><br></div><div><div>--Dave</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 16, 2017 at 6:05 PM, Prashanth Bhalachandran <span dir="ltr"><<a href="mailto:prashanth.bhalachandran@gmail.com" target="_blank">prashanth.bhalachandran@<wbr>gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><span style="font-size:14px"><font face="Palatino">Hello all, </font></span></div><div><span style="font-size:14px"><font face="Palatino">I am trying to take an average of nine 1D arrays that I have .. a1 to a9 all of them of the dimension <span class="m_7541372335505251944gmail-m_6640485635884228427Apple-tab-span" style="white-space:pre-wrap">    </span><span style="background-color:rgb(237,234,212)">[lev | 11]</span></font></span></div><div><span style="font-size:14px"><font face="Palatino"><br></font></span></div><div><font face="Palatino"><span style="background-color:rgb(237,234,212);font-size:14px">If my understanding is right, the average functions in NCL doesn’t simply allow you to do avg(a1….a9). Please correct me if I am wrong. </span></font></div><div><font face="Palatino"><span style="background-color:rgb(237,234,212);font-size:14px"><br></span></font></div><div><font face="Palatino"><span style="background-color:rgb(237,234,212);font-size:14px">The other way around is that I combine the 9 arrays in to a 11x9 array using a function that Dennis have posted out in the past. Is this the way around it? Or is there a simpler/less computationally intensive way of doing it?</span></font></div><div><div style="margin:0px;line-height:normal;background-color:rgb(237,234,212)"><p style="font-variant-ligatures:normal;background-color:rgb(255,255,255)"><span style="font-size:14px"><font face="Palatino">function combine (x[*], y[*]) <br>begin <br>    nx = dimsizes(x) <br>    ny = dimsizes(y) <br>    if (<a href="http://nx.eq.my" target="_blank">nx.eq.my</a>) then <br>         xy = new ( (/nx,2/), typeof(x)) ; (row,col) <br>         xy(:,0) = (/ x /) <br>         xy(:,1) = (/ y /) <br>         return (xy) <br>    end if <br></font></span></p><p style="font-variant-ligatures:normal;background-color:rgb(255,255,255)"><span style="font-size:14px"><font face="Palatino">    print("combine error") <br>    exit <br>end </font></span></p><div><br></div><div>Thank you, </div><span class="m_7541372335505251944gmail-HOEnZb"><font color="#888888"><div>Prashanth</div></font></span></div></div></div></blockquote></div></div></div></div></div>