<div dir="ltr">Dear Mr.Alan and all<br><br>If I float only dir0 then I can get wind direction 214.9 degree same at all time in one day simulation, but if I float both dir and dir0 then I will get error;<br><br>fatal:Number of dimensions on right hand side do not match number of dimension in left hand side<br><br>So now, I prefer not to float dir but only dir0. My question is Does it strange or not if I get wind direction same at all the time in day simulation?<br><br><br>Thank you,<br>Soares<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 4:04 AM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">"<span style="color:rgb(0,0,0);font-size:13px;font-family:arial,sans-serif"> </span><span style="color:rgb(0,0,0);font-size:13px;font-family:arial,sans-serif">the error." What error? </span></div><span class=""><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-size:13px;font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> +sprintf("%dir0", dir0) +" " \</span></div></span><div class="gmail_default"><font color="#000000">^^ This isn't going to work. </font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default"><font color="#000000">Like all your other lines you probably want something like (assuming dir and thus dir0 are floats).</font></div><div class="gmail_default"><font color="#000000"><br></font></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"> +sprintf("%4.1f", dir0) +" " \</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 19, 2015 at 1:31 AM, isakhar sakhar isakhar <span dir="ltr"><<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@gmail.com</a>></span> wrote:<br><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>Dear Mr.Alan and all<br><br></div><div>I just follow your link but I still get the error.<br>I use the script below inside my ncl_script;<br></div><br> ; Wind direction at 10 Meters<br> r2d = 45.0/atan(1.0) <br> dir = atan2(u_plane,v_plane) * r2d + 180<br> dir0 = dir(x,y)<br><br></div>And to print out I use the variable below but I get a strange output;<br><br> +sprintf("%dir0", dir0) +" " \<br><br><br></div>I will appreciate for any help or suggestion<br><br></div>Soares<br><div><div><div><br></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 19, 2015 at 12:23 AM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">This isn't really an NCL question. The answer depends entirely on your dataset. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">If you need to calc meteorological wind direction:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_direction.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_direction.shtml</a><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan. </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Sep 18, 2015 at 4:52 AM, isakhar sakhar isakhar <span dir="ltr"><<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div>Dear All<br><br></div>So far I use a ncl script to print out variable for temperature,pressure, humidity and wind speed in ASCII file.<br><br> print (sprintf("%5.0f",it) +" " \<br> +sprintf("%21.2f", T0(it)) +" " \ ; for temperature<br> +sprintf("%19.2f", P(it)) +" " \ ; for pressure <br> +sprintf("%31.2f", rh0(it)) +" " \ ; for humidity<br> +sprintf("%23.2f", windspd0(it)) +" " ) ; for wind speed<br><br></div><br>What variable should I use or add above to print out output for wind direction ?<br><br></div>Thank you in advance,<br></div><br>Soares<br></div>
<br></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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>