<div dir="ltr">Kunal,<div><br></div><div>Latitude is likely a 1-dimensional variable, while I assume your variable is 2-dimensional (lat x lon). You can't simply multiply arrays with different dimensions (unless it is a scalar, in which case it's not really an array).</div><div><br></div><div>Look up the 'conform' function on the NCL website and you can find out how to make your sin(lat) into an array the same shape as your var1.</div><div><br></div><div>Good luck.</div><div><br></div><div><br></div><div>Kyle</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 20, 2016 at 12:20 PM Kunal Bali <<a href="mailto:kunal.bali9@gmail.com">kunal.bali9@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><div><div><div><div><div>Dear NCL users<br><br></div>I need to calculate the given equation <br><br></div> = var1*10^5/ 2*7.292*10*sin(latitude)<br><br></div><br></div>I am calculating the equation as <br><br> var1 = a->TAUYWTR(0,:,:) <br> <br><br> lat1 = a->lat <br> lon1 = a->lon<br> <br> sin_f = sin(lat1)<br> <br> var2 = (var1)*(100000)/(2)*(7.2921)*(sin_f) <br><br></div>but I am getting an error as<br>fatal:Mul: Number of dimensions do not match, can't continue<br><br><br></div>Could anyone please let me know, how to solve it. <br><div><div><div> <div><div><div><div><br clear="all"><div><div><div><div><div dir="ltr"><div><div dir="ltr"><div><br>Regards<br>Kunal Bali<br></div><br><br><div><p style="margin:0px;border-collapse:collapse;font-family:tahoma,verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>