<div dir="ltr">I dont understand how not taking a vector difference if that is not the correct way get&#39;s to getting to a wind barb like in your example. </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 1, 2013 at 7:58 PM, Nimrod Micael <span dir="ltr">&lt;<a href="mailto:nmicael@aggies.ncat.edu" target="_blank">nmicael@aggies.ncat.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">Yes that&#39;s exactly what I want...what you have in your example on your site. I understand that I have to do this:<br>
<br><br>***although height is in km though in my script**<br><div><br></div><div><pre style="white-space:pre-wrap;word-wrap:break-word">&quot;define mag1000=&quot;zinterp(mag(u,v),height,1000)</pre><pre style="white-space:pre-wrap;word-wrap:break-word">
&quot;define mag6000=&quot;zinterp(mag(u,v),height,6000)</pre><pre style="white-space:pre-wrap;word-wrap:break-word">&quot;06shear = mag6000-mag1000?</pre><pre style="white-space:pre-wrap;word-wrap:break-word">&quot;d 06shear&quot;</pre>
<pre style="white-space:pre-wrap;word-wrap:break-word"><br></pre><pre style="white-space:pre-wrap;word-wrap:break-word">Would I then be able to do just do that?</pre><pre style="white-space:pre-wrap;word-wrap:break-word">
<span style="font-family:arial"><br></span></pre><pre style="white-space:pre-wrap;word-wrap:break-word"><span style="font-family:arial">function zinterp(field,zgrid,zlev)</span><br></pre><pre style="white-space:pre-wrap;word-wrap:break-word">
*----------------------------------------------------------------------

* Bob Hart (<a href="mailto:hart@ems.psu.edu" target="_blank">hart@ems.psu.edu</a>) /  PSU Meteorology
* 3/4/1999
*
* GrADS function to interpolate within a 3-D grid to a specified
* height level.  Can also be used on non-pressure level data, such
* as sigma or eta-coordinate output where height is a function
* of time and grid level.

* Advantages:  Easy to use, no UDFs.  Disadvantages:  Can take 3-10 secs.
*
* Arguments:
*    field = name of 3-D grid to interpolate
*
*    zgrid = name of 3-D grid holding height values at each gridpoint
*            Units of measurement are arbitrary.
*
*    zlev  = height level at which to interpolate (having same units as zgrid)
*
* Function returns:  defined grid interp holding interpolated values
*
* NOTE:  Areas having zlev below bottom level or above upper level 
*        in output will be undefined.
*
* NOTE:  No distinction in the function is made between height above
*        sea level, height above ground surface, or geopotential. The
*        function will give output regardless of which is sent.  
*        It is up to the user to be aware which height variable is
*        being passed to the function and treat the output accordingly.
*
* Example function calls:
*
*      &quot;d &quot;zinterp(temp,height,5000)
*
* Would display a temperature field interpolated to 5000.
*      
*      &quot;define t1000=&quot;zinterp(temp,height,1000)
*
* Would define a new variable, t1000, as a temp field at 1000.
*
*      &quot;d p1000=&quot;zinterp(lev,height,1000)
*
* Would display a field of the pressure at a height of 1000.
* </pre><div> </div></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Sep 1, 2013 at 7:30 PM, Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@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">The reason you are only approximating the 0-6 km shear is because you<br>
are substituting the 6 km AGL winds for the 500 mb flow.  Since most<br>
datasets are isobaric and don&#39;t offer data on a constant height AGL<br>
surface, it&#39;s common to use the 500 mb flow since 500 mb is reasonably<br>
close to 6 km AGL for most locations over the central and eastern US.<br>
It does remain an approximation since it may be up to a few thousand<br>
feet off.  In my experience viewing observed soundings, during the<br>
warm season the 6 km AGL level is typically a little above 500 mb (in<br>
the 450-500 mb layer).  There is a Grads script out there that can use<br>
linear interpolation in the vertical to interpolate data on isobaric<br>
surfaces to constant height surfaces if you need very accurate<br>
estimates.  Look for <a href="http://zinterp.gs" target="_blank">zinterp.gs</a>. It might even be in the grads<br>
scripting library on the web site.  I use that script to display 0-6<br>
km shear on my forecasting web site.  Here is an example:<br>
<a href="http://www.meteor.iastate.edu/~jdduda/forecast/NAM/18Z/0-6_shear_f24.gif" target="_blank">http://www.meteor.iastate.edu/~jdduda/forecast/NAM/18Z/0-6_shear_f24.gif</a><br>
<span><font color="#888888"><br>
Jeff Duda<br>
</font></span><div><div><br>
On Sun, Sep 1, 2013 at 6:12 PM, Nimrod Micael &lt;<a href="mailto:nmicael@aggies.ncat.edu" target="_blank">nmicael@aggies.ncat.edu</a>&gt; wrote:<br>
&gt; @Jeff,<br>
&gt;<br>
&gt; I see but is it approximation? That&#39;s my understanding from Rich Thompson&#39;s<br>
&gt; post. <a href="http://www.stormtrack.org/forum/archive/index.php/t-23323.html" target="_blank">http://www.stormtrack.org/forum/archive/index.php/t-23323.html</a><br>
&gt;<br>
&gt;<br>
&gt; On Sun, Sep 1, 2013 at 6:55 PM, Jeff Duda &lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; The contours are just the magnitude of the shear vector, but that&#39;s<br>
&gt;&gt; not the same as the difference in wind speed at two levels.<br>
&gt;&gt;<br>
&gt;&gt; On Sun, Sep 1, 2013 at 4:58 PM, Nimrod Micael &lt;<a href="mailto:nmicael@aggies.ncat.edu" target="_blank">nmicael@aggies.ncat.edu</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; I see what your saying Jeff. But what if you are interested in the<br>
&gt;&gt; &gt; magnitude<br>
&gt;&gt; &gt; only of u and v and not the two separate u and v vectors. I am trying to<br>
&gt;&gt; &gt; get<br>
&gt;&gt; &gt; a map like this....<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="http://www4.ncsu.edu/~nwsfo/storage/cases/20100425/shr6_10042600.gif" target="_blank">http://www4.ncsu.edu/~nwsfo/storage/cases/20100425/shr6_10042600.gif</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This doesnt have two separate vectors: u and v.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Sun, Sep 1, 2013 at 5:52 PM, Jeff Duda &lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The way you&#39;re doing it, you&#39;re only computing the difference in wind<br>
&gt;&gt; &gt;&gt; speed between two layers.  If you&#39;re trying to calculate vertical wind<br>
&gt;&gt; &gt;&gt; shear, you should be calculating the vector difference, which is the<br>
&gt;&gt; &gt;&gt; difference in the components.  So you should have a delta-U wind<br>
&gt;&gt; &gt;&gt; component of the shear (u500-usfc) and a delta-V component of the<br>
&gt;&gt; &gt;&gt; shear (v500-vsfc).  Those are the two quantities you would display to<br>
&gt;&gt; &gt;&gt; get the vectors.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Jeff<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Sun, Sep 1, 2013 at 3:39 PM, Nimrod Micael &lt;<a href="mailto:nmicael@aggies.ncat.edu" target="_blank">nmicael@aggies.ncat.edu</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; I see Jeff. So then how would i make it to display the magnitude of<br>
&gt;&gt; &gt;&gt; &gt; u,v<br>
&gt;&gt; &gt;&gt; &gt; for<br>
&gt;&gt; &gt;&gt; &gt; 2 different levels then? Since I am taking the difference between the<br>
&gt;&gt; &gt;&gt; &gt; 500 mb<br>
&gt;&gt; &gt;&gt; &gt; wind and the sfc wind?<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Sun, Sep 1, 2013 at 4:33 PM, Jeff Duda &lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; displaying wind barbs requires two inputs in the display command<br>
&gt;&gt; &gt;&gt; &gt;&gt; (i.e., &#39;d u;v&#39;).  You are only supplying one.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Jeff Duda<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; On Sun, Sep 1, 2013 at 2:53 PM, Nimrod Micael<br>
&gt;&gt; &gt;&gt; &gt;&gt; &lt;<a href="mailto:nmicael@aggies.ncat.edu" target="_blank">nmicael@aggies.ncat.edu</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; The shaded is plotting fine but the wind barb is not showing up.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Can<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; anyone<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; help me out why?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set gxout shaded&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set lev 1000&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;s= mag(u,v)&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set lev 500&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;a = mag (u,v)&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set cmin 20&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;bulk = (a-s)*1.92&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;d bulk&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set gxout barb&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set lev 1000&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;barbs= mag(u,v)&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set lev 500&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;barba = mag (u,v)&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;set cmin 20&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;bulkb = (barba-barbs)*1.92&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &#39;d bulkb&#39;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Wind vectors are not showing up. Why???<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Thanks.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Nimrod Micael<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; gradsusr mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; Jeff Duda<br>
&gt;&gt; &gt;&gt; &gt;&gt; Graduate research assistant<br>
&gt;&gt; &gt;&gt; &gt;&gt; University of Oklahoma School of Meteorology<br>
&gt;&gt; &gt;&gt; &gt;&gt; Center for Analysis and Prediction of Storms<br>
&gt;&gt; &gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; gradsusr mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt; Nimrod Micael<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt; gradsusr mailing list<br>
&gt;&gt; &gt;&gt; &gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; &gt;&gt; &gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Jeff Duda<br>
&gt;&gt; &gt;&gt; Graduate research assistant<br>
&gt;&gt; &gt;&gt; University of Oklahoma School of Meteorology<br>
&gt;&gt; &gt;&gt; Center for Analysis and Prediction of Storms<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; gradsusr mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; &gt;&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Nimrod Micael<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; gradsusr mailing list<br>
&gt;&gt; &gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; &gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Jeff Duda<br>
&gt;&gt; Graduate research assistant<br>
&gt;&gt; University of Oklahoma School of Meteorology<br>
&gt;&gt; Center for Analysis and Prediction of Storms<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; gradsusr mailing list<br>
&gt;&gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt;&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Nimrod Micael<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gradsusr mailing list<br>
&gt; <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Jeff Duda<br>
Graduate research assistant<br>
University of Oklahoma School of Meteorology<br>
Center for Analysis and Prediction of Storms<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Nimrod Micael
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Nimrod Micael
</div>