[ncl-talk] wind vector
David Brown
dbrown at ucar.edu
Wed Dec 10 12:47:57 MST 2014
Kyle is definitely correct in saying that "curly vectors are more akin
to streamlines". In fact at the low level, a modified version of the
streamline code is used to implement them. That is also why the
vcMinMagnitudeF is not currently enabled for curly vectors. However,
since each curly vector originates from a specific grid point where a
single vector magnitude can be computed, it seems to me that there is
nothing to prevent vcMinMagnitudeF from being supported for curly
vectors. Whether it will produce a good looking result or not is
another question.
A work-around might be to use the "where" function, with your
user-defined min_magnitude:
u = where(sqrt(u*u + v * v) .lt. min_magnitude, u at _FillValue, u)
v = where(sqrt(u*u + v * v) .lt. min_magnitude, v at _FillValue, v)
before plotting. Let us know if you have problems getting this to work.
I will create a ticket for implementing vcMinMagnitudeF for curly vectors.
-dave
On Wed, Dec 10, 2014 at 7:50 AM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:
> I'm not Dave, but I'll go ahead and say "no" - CurlyVectors are more akin to
> streamlines in that they don't exist at any one "point" but rather get
> longer and turn with the wind as magnitude increases. You can't simply turn
> off the CurlyVector in some areas as it would break up the streamline by
> falling below an arbitrary magnitude. vcMinMagnitude seems to look the best
> with either LineArrow or FillArrow glyphs, in my experience.
>
> Good luck!
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Wed, Dec 10, 2014 at 7:04 AM, Xi Chang <xi.chang01 at gmail.com> wrote:
>>
>> Hi Dave, HI NCL,
>>
>> so, is there any way around how to use " res at vcMinMagnitudeF " for
>> "CurlyVector" mode?
>> Thanks
>>
>> chang.
>>
>> On Fri, Nov 7, 2014 at 3:22 PM, David Brown <dbrown at ucar.edu> wrote:
>>>
>>> Try turning off the curly vectors. It's possible that it hasn't been
>>> enabled for that glyph style.
>>> -Dave
>>>
>>>
>>> On Friday, November 7, 2014, Xi Chang <xi.chang01 at gmail.com> wrote:
>>>>
>>>> Thanks Dave,
>>>>
>>>> Anyway, nothing happens when I did as follows (the results are still the
>>>> same):
>>>>
>>>> res at gsnScalarContour = True ; vectors over scalars
>>>> res at vcRefMagnitudeF = 20.0 ; vec magnitude
>>>> res at vcRefLengthF = 0.06 ; size of ref vector
>>>> res at vcLineArrowColor = "black" ; white vectors
>>>> res at vcMinDistanceF = 0.025 ; thins arrows near
>>>> pole
>>>> res at vcGlyphStyle = "CurlyVector" ; turns on curley
>>>> vectors
>>>> res at vcMinMagnitudeF = 5
>>>>
>>>> On Fri, Nov 7, 2014 at 12:25 AM, David Brown <dbrown at ucar.edu> wrote:
>>>>>
>>>>>
>>>>> http://www.ncl.ucar.edu/Document/Graphics/Resources/vc.shtml#vcMinMagnitudeF
>>>>>
>>>>> On Thu, Nov 6, 2014 at 4:23 PM, Xi Chang <xi.chang01 at gmail.com> wrote:
>>>>> > Hallo, is there any trick to display wind vectors only for those
>>>>> > whose
>>>>> > magnitude greater than XXX m/s, bellow this values are not plotted.
>>>>> > Im using
>>>>> > a function called gsn_csm_vector.
>>>>> >
>>>>> > Thanks
>>>>> >
>>>>> > _______________________________________________
>>>>> > ncl-talk mailing list
>>>>> > List instructions, subscriber options, unsubscribe:
>>>>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>> >
>>>>
>>>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
More information about the ncl-talk
mailing list