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

20041025: how to handle staggered U & V in IDV?



>From: Rich Signell <address@hidden>
>Organization: USGS
>Keywords: 200410251601.i9PG11vV012347 IDV grid relative true winds

Hi Rich-

>I downloaded the new idv.jar and followed your recipe and
>it worked great.  I have a map display of vectors!  Fantastic!

One down, XXX to go!

>Now I realize that I also need to rotate the vectors, since the u and
>v components are oriented in the *grid coordinates*, not geographical
>coordinates.    (Luckily this is pretty obvious  in this grid, since the 
>grid is oriented at about 45 degrees to True North).   The angle between the
>grid-oriented U and True East is stored in the 2D array "angle".  

Bummer for you. ;-)  

>I imagine there is a VisAd/IDV function to rotate vectors, right?  

Of course! Here's a new recipe:

1) Get the new idv.jar (same bat time, same bat place). This uncovered
a bug that is fixed in that jar.

2) Create a Jython procedure similar to the createWindVectors:

# true wind vectors
def makeTrueVector(u, v):
  from ucar.unidata.data.grid.DerivedGridFactory import *
  return DerivedGridFactory.createTrueWindVectors(u,v)

(I'll add this to the next release).

3) Create a formula to call this:

Name: true flow vectors
Formula:  makeTrueVector(u,v)
(optional)
Desc:  Make flow vectors from grid relative u and v
Group: Rich's ever growing list of cool formulas
Displays:  Use selected, All off, select Flow Displays group

4) Select the new formula and the type of display you want to use
then click "Create Display".  From your dataset, select the
2D Grid->ubar for u and 2D Grid->vbar for v, then click "OK".

5) The true winds should appear.  You can plot the non-corrected
vectors on top to check that this worked correctly.  Let me know
if it didn't.


>Is there a good place to find these functions? 

Not really.

>I tried googling for a while, but I never found the
>page that I thought must exist somewhere --  a list of all the functions we
>have available to use in IDV.

Unfortunately, Google does not extend to the depths of my brain.
This is one area of the documentation that is sorely inadequate.
It's high on the priority list to document.  It just takes time.

A couple of follow-up items:

Is storing the angle in an array a part of the CF convention?   
We just compute it based on the grid.  If not, it would be good
for the convention to allow identifying components as grid
relative or true.

This new idv.jar should also solve the problem of a packed variable
for the s_rho calculation.  Could you check that out and let me know
if it doesn't?

Thanks for testing this out.

Don
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.

> From:    Rich Signell <address@hidden>
> Subject: Re: 20041026: how to handle staggered U & V in IDV?
> 
> Unidata Support wrote:
> 
> >>>Is storing the angle in an array a part of the CF convention?   
> >>>We just compute it based on the grid.  If not, it would be good
> >>>for the convention to allow identifying components as grid
> >>>relative or true.
> >>>      
> >>>
> You are right!   The convention for "grid relative" or "true" is not 
> part of the CF convention,
> but should be!  I'll bring this up.
> 
> >>>This new idv.jar should also solve the problem of a packed variable
> >>>for the s_rho calculation.  Could you check that out and let me know
> >>>if it doesn't?
> >>>      
> >>>
> 
> Yes, it does!    Fantabolous!