Re: Weird representation of Wind Barbs

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 06 2011 - 18:34:52 MDT

Sorry for the second message. The NCL script seems to have gone missing somehow. So here it is:

On Apr 6, 2011, at 6:31 PM, David Brown wrote:

> Hi Caroline,
> There were two factors involved in the problems you encountered plotting this data, one that can be fixed by modifying your NCL script, and the other an actual problem with NCL that I have now repaired.
> 1) The reason the wind barb layout "doesn't seem to respect the mesh" is because you are using vcMinDistanceF as the mechanism to thin the vectors. This resource use an algorithm that sets a minimum distance for the vectors in the projected space. It is good at ensuring a relatively even spacing for map projections where the mesh becomes crowded in some areas (such as near the poles). It is specifically designed not to "respect the mesh", as you put it. A better approach for your data that lies in such a small area and is far enough away from the pole that most map projections are approximately rectangular is to thin the mesh by striding the data. I am attaching a plot which uses a stride of 4 to more or less duplicate the arrangement of wind barbs in the GrADS plot you attached.
> 2) The blank area and the variable wind directions both resulted from the fact that the total mapped area is very small (about 1 degree by 1/2 degree) relative to the kinds of plots NCL has traditionally be used for. I could be wrong, but I believe that GrADS always uses a basic lat-lon projection, which is a straightforward cartesian mapping of the data. NCL can project the vectors into any of its supported projections, but the current code loses accuracy when determining the projection of the vector angle when the mapped area is as small as in your case. When the vector code was originally written double precision versions of the mapping routines were not available. Now, however they are, and so I have been able to make the calculations much more accurate. I am attaching a sample code along with the above-mentioned plot that pretty much duplicates the arrangement of the wind barbs as drawn in your GrADS plot. The difference is that I have drawn a raster contour of the magnitudes in the background, and also the GrADS plot seems to leave out the bottom row and the rightmost column (where there seems to be a big discontinuity in the data).
> Of course the script will not be able to reproduce this plot until you get the new version of NCL, but this will definitely be part of 6.0.0. A caveat is that the curly vector glyph style and streamlines will still exhibit the problem for now. It is going to be a bit more complicated to modify these plot styles to use the double precision mapping routines and we do not have the time prior to the 6.0.0 release.
> -dave
> <new-barb.pdf>
> On Mar 10, 2011, at 2:17 AM, Caroline Serraud wrote:
>> Hi everyone,
>> I am currently trying to plot WRF Wind outputs on a really small domain with a spatial resolution around 500 meters. I have noticed some weird behaviour of NCL while plotting wind barbs, and I wonder if I am wrong with my NCL wind parametrization.
>> Here is my script, and two similar plots: one with NCL, one with GrADS.
>> What makes me suspcicious is:
>> - why this "blank" in the right bottom corner? I have already noticed this effect on other plots and the blank was even more larger
>> - why wind barbs layout doesn't seem to respect the mesh? If you look at the right upper corner, two barbs are shifted upward...
>> - why wind directions seems so variable? If you take a look at GrADS plot, directions are smoother while NCL wind barbs look all "unkempt"..
>> I don't know if I am misusing NCL but the aim is to plot "small-scale" effects like coastal winds and with this representation we can't even see the differences between large and coastal wind distribution..
>> Any help would be appreciated!!
>> Thanks a lot,
>> Kind regards,
>> Caroline
>> --
>> <signature-cs.jpg>
>> <wind.ncl><Hyeres_2011030900.png><000.gif>_______________________________________________
>> 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 Wed Apr 6 18:34:57 2011

This archive was generated by hypermail 2.1.8 : Fri Apr 08 2011 - 09:34:26 MDT