<div dir="ltr">Yes that'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="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
"define mag1000="zinterp(mag(u,v),height,1000)</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">"define mag6000="zinterp(mag(u,v),height,6000)</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
"06shear = mag6000-mag1000?</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">"d 06shear"</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><br></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
Would I then be able to do just do that?</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="font-family:arial"><br></span></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
<span style="font-family:arial">function zinterp(field,zgrid,zlev)</span><br></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">*----------------------------------------------------------------------
*
* Bob Hart (<a href="mailto:hart@ems.psu.edu">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:
*
* "d "zinterp(temp,height,5000)
*
* Would display a temperature field interpolated to 5000.
*
* "define t1000="zinterp(temp,height,1000)
*
* Would define a new variable, t1000, as a temp field at 1000.
*
* "d p1000="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"><br><br><div class="gmail_quote">On Sun, Sep 1, 2013 at 7:30 PM, Jeff Duda <span dir="ltr"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></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't offer data on a constant height AGL<br>
surface, it'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 class="HOEnZb"><font color="#888888"><br>
Jeff Duda<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, Sep 1, 2013 at 6:12 PM, Nimrod Micael <<a href="mailto:nmicael@aggies.ncat.edu">nmicael@aggies.ncat.edu</a>> wrote:<br>
> @Jeff,<br>
><br>
> I see but is it approximation? That's my understanding from Rich Thompson's<br>
> 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>
><br>
><br>
> On Sun, Sep 1, 2013 at 6:55 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>> wrote:<br>
>><br>
>> The contours are just the magnitude of the shear vector, but that's<br>
>> not the same as the difference in wind speed at two levels.<br>
>><br>
>> On Sun, Sep 1, 2013 at 4:58 PM, Nimrod Micael <<a href="mailto:nmicael@aggies.ncat.edu">nmicael@aggies.ncat.edu</a>><br>
>> wrote:<br>
>> > I see what your saying Jeff. But what if you are interested in the<br>
>> > magnitude<br>
>> > only of u and v and not the two separate u and v vectors. I am trying to<br>
>> > get<br>
>> > a map like this....<br>
>> ><br>
>> > <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>
>> ><br>
>> > This doesnt have two separate vectors: u and v.<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > On Sun, Sep 1, 2013 at 5:52 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>> wrote:<br>
>> >><br>
>> >> The way you're doing it, you're only computing the difference in wind<br>
>> >> speed between two layers. If you're trying to calculate vertical wind<br>
>> >> shear, you should be calculating the vector difference, which is the<br>
>> >> difference in the components. So you should have a delta-U wind<br>
>> >> component of the shear (u500-usfc) and a delta-V component of the<br>
>> >> shear (v500-vsfc). Those are the two quantities you would display to<br>
>> >> get the vectors.<br>
>> >><br>
>> >> Jeff<br>
>> >><br>
>> >> On Sun, Sep 1, 2013 at 3:39 PM, Nimrod Micael <<a href="mailto:nmicael@aggies.ncat.edu">nmicael@aggies.ncat.edu</a>><br>
>> >> wrote:<br>
>> >> > I see Jeff. So then how would i make it to display the magnitude of<br>
>> >> > u,v<br>
>> >> > for<br>
>> >> > 2 different levels then? Since I am taking the difference between the<br>
>> >> > 500 mb<br>
>> >> > wind and the sfc wind?<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > On Sun, Sep 1, 2013 at 4:33 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> displaying wind barbs requires two inputs in the display command<br>
>> >> >> (i.e., 'd u;v'). You are only supplying one.<br>
>> >> >><br>
>> >> >> Jeff Duda<br>
>> >> >><br>
>> >> >> On Sun, Sep 1, 2013 at 2:53 PM, Nimrod Micael<br>
>> >> >> <<a href="mailto:nmicael@aggies.ncat.edu">nmicael@aggies.ncat.edu</a>><br>
>> >> >> wrote:<br>
>> >> >> > The shaded is plotting fine but the wind barb is not showing up.<br>
>> >> >> > Can<br>
>> >> >> > anyone<br>
>> >> >> > help me out why?<br>
>> >> >> ><br>
>> >> >> > 'set gxout shaded'<br>
>> >> >> > 'set lev 1000'<br>
>> >> >> > 's= mag(u,v)'<br>
>> >> >> > 'set lev 500'<br>
>> >> >> > 'a = mag (u,v)'<br>
>> >> >> > 'set cmin 20'<br>
>> >> >> > 'bulk = (a-s)*1.92'<br>
>> >> >> > 'd bulk'<br>
>> >> >> ><br>
>> >> >> > 'set gxout barb'<br>
>> >> >> > 'set lev 1000'<br>
>> >> >> > 'barbs= mag(u,v)'<br>
>> >> >> > 'set lev 500'<br>
>> >> >> > 'barba = mag (u,v)'<br>
>> >> >> > 'set cmin 20'<br>
>> >> >> > 'bulkb = (barba-barbs)*1.92'<br>
>> >> >> > 'd bulkb'<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > Wind vectors are not showing up. Why???<br>
>> >> >> ><br>
>> >> >> > Thanks.<br>
>> >> >> ><br>
>> >> >> > --<br>
>> >> >> > Nimrod Micael<br>
>> >> >> ><br>
>> >> >> > _______________________________________________<br>
>> >> >> > gradsusr mailing list<br>
>> >> >> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> >> >> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> >> >> ><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">gradsusr@gradsusr.org</a><br>
>> >> >> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > Nimrod Micael<br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > gradsusr mailing list<br>
>> >> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> >> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> >> ><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">gradsusr@gradsusr.org</a><br>
>> >> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Nimrod Micael<br>
>> ><br>
>> > _______________________________________________<br>
>> > gradsusr mailing list<br>
>> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>> ><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">gradsusr@gradsusr.org</a><br>
>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Nimrod Micael<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><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">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>-- <br>Nimrod Micael
</div>