Re: vcMapDirection resource

From: wxtofly <wxtofly_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 08 2011 - 19:25:00 MDT

Thanks for the clarification.

Andrea Barcellona, a fellow also running the windgrams I have designed noted that the wrf_meteo4 and wrf_meteo5.ncl at least gets around the issue by using uvmet.
uvmet = wrf_user_getvar(a,"uvmet",-1) ; get rotated u and v comp of wind

He has suggested that rather than using uvmet as above, we only do the calculations at the single points of interest using the COSALPHA and SINALPHA variables already in the wrf output files.
b is a wrf output file.
cosalpha = b->COSALPHA(0,:,:)
sinalpha = b->SINALPHA(0,:,:)

u_point   = u_point*cosalpha(locY,locX) - v_point*sinalpha(locY,locX)
v_point   = u_point*sinalpha(locY,locX) + v_point*cosalpha(locY,locX)

Unfortunately my trig is so rusty as to be irreparable and I don't know if those are equivalents to the calculations in wrf_user_getvar.  If they are, then much computation is saved by doing only single points with existing COSALPHA and SINALPHA. 

Does this seem to make sense to you?  If it does, then the wrf people might consider substituting his formula in wrf_user_getvar if the COSALPHA and SINALPHA variables are always part of the WRF output.  

If this makes sense, please forward it to someone on the wrf/ncl team as I don't want to subscribe to another list to do that.


On 08/08/2011 03:08 PM, David Brown wrote:
Hi TJ,

Your description is basically correct, although it might be more precise to say that when vcMapDirection is False the horizontal direction (left to right) represents the positive U component and the vertical direction (bottom to top) represents the positive V component (since U and V do not necessarily have to represent Eastward and Northward components).  In retrospect, it might have been better to have vcMapDirection default to False unless the data is overlaid on a map. It is quite possible there are some examples that should have this resource set differently. We will investigate and make changes where needed.

On Aug 4, 2011, at 11:33 AM, wxtofly wrote:

Does this mean that with vcMapDirection=True, the coordinate space acts the same as the projection used in the underlying data and with it False it uses up as North and right as East?  That would fit with the slight differences that I checked from a point near the center of a Lambert conformal projection.  I tried it with points from a larger domain where I would expect larger deviations if it were the case, but the results were inconclusive.  It does appear that no matter which point I have chosen, the vcMapDirection=False --> vcMapDirection=True  causes barbs to change as if they were on a Lambert conformal surface with horizontal and vertical barbs not changing at all.   I guess this means that I should be using  vcMapDirection=False.

Fortunately, my domains are small enough that the distortion doesn't matter much to people who are using the Windgrams.

Perhaps the wrf_meteo1-5.ncl scripts should be amended...


On 08/04/2011 07:28 AM, Mary Haley wrote:
Hi TJ,

I admit I've never understood this resource very well. Dave Brown is out of the office, but here's an explanation from him (modified slightly to make sense in this context) that he sent to another user:

By default, the vector direction is mapped into the coordinate space defined by the coordinate variables. This is appropriate for horizontal vectors drawn on a map, but not for vectors in a vertical space where the Y axis and the X Axis have completely unrelated units. To fix this you should set the resource vcMapDirection to False.  However,  it also has the effect of always making the positive Y direction from bottom to top. If the vertical component is positive from top to bottom of the atmosphere, then you will need to multiply the vertical component by -1.0 to get the result you are looking for.


On Aug 3, 2011, at 11:54 PM, wxtofly wrote:

I am confused by this resource as the examples are not consistent with its use and I don't really understand what it does in the absence of an underlying map as on the attached windgram plots.

I have attached two of my windgrams, one produced without any mention of vcMapDirection which therefore would use the true default, and the other with
uv_res@vcMapDirection=false.  As you can see they are nearly but not exactly identical.  (gwenview  or something similar next prev to rock between them)

On the NCAR site, the 1 special example meteo.ncl uses uv_res@vcMapDirection=false.  The 5 wrf_meteo(1-5).ncl omit the resource.  Which is "correct."  
What would I expect the effects to be?

Thanks for you help.

TJ Olney

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Aug 8 19:25:08 2011

This archive was generated by hypermail 2.1.8 : Wed Sep 07 2011 - 10:58:58 MDT