<div dir="ltr"><div><div><div>Dear Mr.Jack<br><br></div>I didn't catch it. Could you please explain more detail?<br><br><br></div>Best regards,<br></div>Soares<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 10:20 AM, Jack Ogaja <span dir="ltr"><<a href="mailto:jack.ogaja@gmail.com" target="_blank">jack.ogaja@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Assuming that ‘everything’ else in your code is correct, the snippet(of your code) below simply explains your concern;<br>
<br>
****<br>
do it = 0,ntimes-1 ;Loop for the time: it= starting time<br>
time = it<br>
…<br>
; Calculate Wind Speed from Vectors<br>
spd = (u_plane*u_plane + v_plane*v_plane)^(0.5)<br>
windspd0(it)=spd(x,y) ;<=== instantaneous[compare to “dir0” below]<br>
<br>
; Wind direction at 0 Meters<br>
r2d = 45.0/atan(1.0) ; conversion factor (radians to degrees)<br>
dir = atan2(u_plane,v_plane) * r2d + 180<br>
dir0 = dir(x,y) ;<=== is always overwritten[compare to “windspd0(it)” above]<br>
****<br>
i.e. your directions will always be the last direction calculated in the loop.<br>
<br>
Jack.<br>
<div><div class="h5"><br>
> On 20 Oct 2015, at 08:56, isakhar sakhar isakhar <<a href="mailto:isakhar.inside13@gmail.com">isakhar.inside13@gmail.com</a>> wrote:<br>
><br>
> Dear NCL Team<br>
><br>
> I use the script in attachment to find Wind Speed and Wind Direction in a location. I can get the wind speed but I get odd result for wind direction because all same. The output also in the attachment.<br>
><br>
> Regards,<br>
> Soares<br>
</div></div>> <output.txt><wrf_script.ncl>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote></div><br></div>