[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #KWG-597166]: Thermal wind vectors



HI Dave-

> After about a dozen false starts (forced by my 5% knowledge--an
> exaggerated estimate--of Jython library syntax and IDV formula
> syntax), I finally managed to plot thermal wind vectors by creating a
> formula ("Thermal wind") that invokes existing grid diagnostics
> library routine "thrm" in a manner that mimics formula "Layer
> Difference" except with "Z" replacing "Field" in the argument list:
> 
> Name: Thermal_wind
> Formula:
> thrm
> (Geopotential_height
> ,user_Top_of_Layer[default=500],user_Bottom_of_Layer[default=1000])
> Group: Grids
> Derived: For end user   [whatever that means]

It means that it shows up in your  Formula data source.

> I've now noticed two issues that I can't figure out:
> 
> (1) The thermal wind vector display is shown at sea level, and
> setting Display > Levels to some other pressure level seems to have no
> effect on where the field is plotted. There is no vertical position
> slider for this display, nor is there one for geostrophic wind vector
> plots, I see, though those, at least, plot at the pressure level in
> space where they are defined.

It shows up at the bottom of the view because there is no vertical
dimension associated with it after you run the formula.  Where would
one plot the result?  at the top level, bottom level, or at the
midway point?

It ends up with levels instead of a position slider because it
uses the levels from the Geopotential height field.  This is
a bug, but not an easy one to fix.  I'll see what I can do.
I think the best bet is to implement what you and I talked about
at one time, where we allow the user to ignore the vertical coordinate.

> (2) My geostrophic wind and thermal wind plots have a "Range"
> setting in the display control. The default range is always some
> negative number to the same, but positive, number (presumably in
> meters/second or whatever unit is specified). Setting this range to
> something else (say, 0 to 50) changes the direction of the vectors as
> well as their size--not what I expected, since I interpreted "Range"
> to mean something like "plot vector magnitudes only within this
> range". Do these ranges apply to the u- and v-components of the
> vectors? Are the sizes of the largest u- and v-components in the field
> mapped onto these range limits, hence affecting the size of the
> plotted vectors? Neither of these makes much sense to me, given how
> the vectors behave when I change the range. I just want to plot
> various vectors together using the same scale--how should I treat
> "Range"? (Specifying the same range for all vector plots, and
> symmetric positive and negative range limits, seems to give me a
> sensible relation between thermal wind and geostrophic wind vectors.)

The range controls the size of the vectors and needs to be symetrical.
So, let's say you have a range of -10 to 10.  That means that a vector
of 1 unit length would be 10 m/sec and scaled according to the scale
factor.  a 20 m/sec component would be 2 units long, etc.  The
idea here is that if you set the range the same for 2 different vector
displays, then the sizes of vectors in each display is comparable.
Previously, the was solely based on the range of the data and you
couldn't change it.  That meant that one display could have a
-10 to 10 range and another a -20 to 20 range.  For two vectors
of the same length, they would have different magnitudes.

With Jeff's change yesterday, you should be able to save the
range in a display setting (and the scale factor) which you 
could apply to all vector displays so they can be compared visually.

> I've attached a sample bundle to illustrate.

The formula you created ends up creating the Geostrophic wind 
at all levels and then picking out the specified levels and
doing the subtraction.  For version 2.5, that's really
the only way to do it.  For the latest nightly build, we've
done a little better with GridMath so you can subtract
slices without having to read the entire volume.   So
with the latest build, you could do:

sub(top,bottom)

and select the appropriate layer of the Geostrophic Wind Vector
for top and bottom.  That also ends up with a slider for the
vertical position.

Don

Ticket Details
===================
Ticket ID: KWG-597166
Department: Support IDV
Priority: Normal
Status: Open