<div dir="ltr">Hi Soares,<div>Looking at the wrf_user_intrp3d documentation:</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml</a><br></div><div><br></div><div>and assuming your height array has units of meters, it looks to me like your input plane array should just contain a single value:</div><div>plane = 30 (when interpolating to 30m). The documentation states that you should include more than one value if you are doing a cross-section, which you are not.</div><div><br></div><div>Also, as you are interpolating to a horizontal level I think you should specify a &quot;h&quot; instead of a &quot;v&quot;.</div><div><br></div><div>So, try changing this:</div><div><span style="font-size:12.8px">u_plane  = wrf_user_intrp3d( u,height,&quot;v&quot;,plane,0.,False)</span><br style="font-size:12.8px"><span style="font-size:12.8px">v_plane  = wrf_user_intrp3d( v,height,&quot;v&quot;,plane,0.,False)</span><br></div><div>to this:</div><div><span style="font-size:12.8px">u_plane  = wrf_user_intrp3d( u,height,&quot;h&quot;,30,0.,False)</span><br style="font-size:12.8px"><span style="font-size:12.8px">v_plane  = wrf_user_intrp3d( v,height,&quot;h&quot;,30,0.,False)</span><br></div><div><br></div><div>Note that there is also a WRF online tutorial page describing this function here:</div><div><a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_functions.htm#intrp3d">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_functions.htm#intrp3d</a><br></div><div><br></div><div>If you have any further issues with <span style="font-size:12.8px">wrf_user_intrp3d or any other wrf function in NCL please email <a href="mailto:wrfhelp@ucar.edu">wrfhelp@ucar.edu</a>.</span></div><div><span style="font-size:12.8px">Adam</span></div><div>  </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 8:55 PM, isakhar sakhar isakhar <span dir="ltr">&lt;<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@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"><div><div><div><div><div><div><div><div>Dear Mr. Adam<br><br></div>So far I am using the script (in attachment) to find wind direction and wind speed in 10 meter height. But when I tried to find wind speed in 30 meter, 50 meter or 100 meter, I get the same result as 10 meter height.<br><br><br><br>---------------------------------------------------------------------------------------------------------------------------------------<br>    plane = (/ 0., 10./)            ; height levels to plot - in meter<br>         <br>         ; Interpolate U,V to 0 Meters<br>              u_plane  = wrf_user_intrp3d( u,height,&quot;v&quot;,plane,0.,False)<br>              v_plane  = wrf_user_intrp3d( v,height,&quot;v&quot;,plane,0.,False)<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)<br><br>          ; Wind direction at 10 Meters<br>               r2d = 45.0/atan(1.0)                   ; conversion factor (radians to degrees)<br>               dir = atan2(u_plane,v_plane) * r2d + 180<br>               dir0(it) = dir(x,y)<br><br>          ; Wind Speed<br>          spd@description = &quot;Wind Speed&quot;<br>          spd@units = &quot;m/s&quot;<br>          u_plane@units = &quot;m/s&quot;<br>-------------------------------------------------------------------------------------------------------------------------------------<br></div> <br><br><br><br></div>I tried to change height level in function plane = (/ 0., 10./) to (/ 0., 30./) or (/ 0., 50./), or (/ 0., 100./) but I still get the same wind speed.<br><br></div>I also tried to change plane = (/ 10., 30./) for 30 meter height but I get error.<br><br></div>Because now I am really interesting to know wind speed and direction in 30 meter, 50 meter, and 100 meter height.<br></div>Is there anything still wrong with this script ?<br><br></div>Thank you,<br></div>Soares<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 9, 2015 at 9:41 PM, Adam Phillips <span dir="ltr">&lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</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">Hi Soares,<div>The error message: </div><span><div><span style="font-size:12.8px">fatal:[&quot;Execute.c&quot;:5900]:</span><span style="font-size:12.8px">variable (time) is not in file (infile)</span></div></span><div><span style="font-size:12.8px">is telling you exactly what the issue is. By examining your input WRF file you can see that a variable time is not present, but a variable names Times is. The error message is coming from this line:</span></div><div><span style="font-size:12.8px">time = infile-&gt;time</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">However, note that you do not need to exactly follow the example coding Amadou pointed you to. You do not necessarily need to read in time, or wind_speed and wind_direction. (Your file doesn&#39;t have those three variables anyway.) All you should be doing is reading in the winds at the level you are interested in (either U10/V10  or U/V), choose the grid point you are interested in, and pass the wind speed and direction to the  create_one_station_plot function. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">wrf_ll_to_ij might be useful to find the nearest coordinate indexes to a desired latitude and longitude:</span></div><div><span style="font-size:12.8px"><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_ll_to_ij.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_ll_to_ij.shtml</a></span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">a list of all WRF functions available in NCL is also given here:</span></div><div><span style="font-size:12.8px"><a href="http://www.ncl.ucar.edu/Document/Functions/wrf.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/wrf.shtml</a></span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Hope that all helps. </span><span style="font-size:12.8px">If after modifying your script as detailed above you still have questions about how to read in and subset your WRF data I highly advise you to look at the online documention including the WRF online NCL tutorial and the NCL website:</span></div><div><span style="font-size:12.8px"><a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm" target="_blank">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm</a></span></div><div><span style="font-size:12.8px"><a href="http://www.ncl.ucar.edu/Applications/wrf.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/wrf.shtml</a></span><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Adam</span></div><div><span style="font-size:12.8px"><br></span></div><div><br></div><div><span style="font-size:12.8px"> </span></div><div><span style="font-size:12.8px"> </span></div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 8, 2015 at 7:03 PM, isakhar sakhar isakhar <span dir="ltr">&lt;<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@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"><div><div><div><div>Dear Mr. Adam and Mr.Amadou<br><br></div>I just downloaded the file as you recommend and made some change according to my configuration. But after running the simulation, I get error says &quot;fatal:[&quot;Execute.c&quot;:5900]:variable (time) is not in file (infile)<br>&quot;.<br><br></div><div>Now I don&#39;t have any station (weather station), just a computer for running simulation only because I see there are 5 stations inside the script.<br><br></div>Here I attach my two files, one is my hodograph modification and one is my ncdump file.<br></div><div>Please take a look of these files.<br></div><div><br></div>Regards,<br></div>Soares<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 4:11 PM, Adam Phillips <span dir="ltr">&lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</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">Hi Soares,<div>It looks to me like all you attached are functions. I do not see a script that calls the hodograph function for instance. You need to call hodograph from another NCL script, passing in the workstation, an array of the wind speed, an array of the direction, and a resource list. </div><div><br></div><div>For an example of how to do this, refer to a ncl-talk question from a couple weeks back:</div><div><a href="http://mailman.ucar.edu/pipermail/ncl-talk/2015-October/004199.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/2015-October/004199.html</a><br></div><div><br></div><div>And see the second attachment on that page:</div><div><a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/9bdf6ef5/attachment.obj" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/9bdf6ef5/attachment.obj</a><br></div><div><br></div><div>Coincidentally, this script holds a function that creates a hodograph (named <span style="color:rgb(0,0,0);white-space:pre-wrap">create_one_station_plot), and that function is called at the bottom of the main script.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Note that you do not have to use the ncl-talk script to do what you want. This just provides an example where someone was creating hodographs by calling a function external to the main script. </span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Finally, no, at present there are not any hodograph examples on the NCL website.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Hope that helps. If not, or if you have any further questions, please respond to the ncl-talk email list.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Adam </span></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Nov 6, 2015 at 12:07 AM, isakhar sakhar isakhar <span dir="ltr">&lt;<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@gmail.com</a>&gt;</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><div>Dear NCL Talk Team<br><br></div>I want to plot Hodograph by using 2 files in attahment but I did not see anything, no plotting.<br><br></div>I tried also to find hodograph in website &quot; <a href="https://www.ncl.ucar.edu/Applications/" target="_blank">https://www.ncl.ucar.edu/Applications/</a> &quot; but I could not see it.<br><br></div>Can someone help me how to plot wind speed and direction in Hodographs?<br><br></div>Thank you,<br></div>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><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><br></div>-- <br><div><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"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </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>
</font></span></font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><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"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </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>
</font></span></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="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>