[ncl-talk] reference vector in weather_sym_9.ncl

Mary Haley haley at ucar.edu
Thu Feb 16 11:02:05 MST 2017


Mariangel,

Sorry for the delay in response. We are very busy trying to get a new
release of NCL out the door.

The problem is that these two pieces of code that generate the vector
reference boxes are not related to each other, so I'm not sure what it's
going to take to make them the same size.

One work-around for now is to create two vector plots, one with the
reference annotation box put in the lower left, and one in the lower
right.  You can use vcRefAnnoXXXX resources to customize each of these
boxes.

You can then overlay the two plots and draw them as one.  See the attached
script which will hopefully help you get started.

--Mary



On Mon, Feb 13, 2017 at 10:20 AM, Mariangel Fedrizzi - NOAA Affiliate <
mariangel.fedrizzi at noaa.gov> wrote:

> Hi All,
>
> I have not heard from anybody since last Thursday, so I'm sending more
> info about my question in case that helps.
>
> In the figure below, I've used:
>
>   res at vcRefMagnitudeF         = 400.0             ; vec magnitude
>   res at vcRefLengthF            = 0.04              ; size of ref vector
>
> to plot the black vectors, from a netcdf file, where I had values for all
> lat lon grids. I used mainly the examples in
> http://www.ncl.ucar.edu/Applications/polar.shtml to create that map.
>
> However, I had to overplot on that map vectors from a satellite pass
> (white vectors on the plot), where I had an ascii file with lat, lon,
> Veast, Vnorth. For that, I used:
>
>   wmsetp("vrs - size of reference vector in user space", 400.)
>   wmsetp("vrn - size of reference vector on plot in NDC space", 0.07)
>
> following the example in http://www.ncl.ucar.edu/Applic
> ations/Images/weather_sym_9_lg.png and http://www.ncl.ucar.edu/Applic
> ations/Scripts/weather_sym_9.ncl.
>
> My question is how can I make the white vector with the same size and
> label format (not scientific notation) as the black vector?
>
> I've used:
>
>  wmvectmap(wks, lat, lon,  Veast, Vnorth)  ; Plot vectors.
>
> to overplot the white vectors on the map. Is this the best procedure for
> this case, or there are others that have more resources?
>
> Thanks,
> Mariangel.
>
>
>
>
>
> [image: Inline image 1]
>
>
>
> On Thu, Feb 9, 2017 at 11:25 AM, Mariangel Fedrizzi - NOAA Affiliate <
> mariangel.fedrizzi at noaa.gov> wrote:
>
>> Hi,
>>
>> I'm looking at the example http://www.ncl.ucar.edu/Applic
>> ations/Scripts/weather_sym_9.ncl, and see that the reference vector in
>> the label (http://www.ncl.ucar.edu/Applications/Images/weather_sym_9_l
>> g.png) is 0.35E+02.
>>
>> Is there a way to set the reference vector in the label with the same
>> value it is set in the script weather_sym_9.ncl, i.e. 40.0:
>>
>> wmsetp("vrs - size of reference vector in user space", 40.)
>>
>> Also, it there a way to change from scientific notation to float in the
>> label box?
>>
>> Any suggestions on how to proceed?
>>
>> Thanks,
>> Mariangel.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170216/53992e54/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 376506 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170216/53992e54/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: veceff.000003.png
Type: image/png
Size: 152790 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170216/53992e54/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: veceff_1.ncl
Type: application/octet-stream
Size: 1367 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170216/53992e54/attachment-0001.obj 


More information about the ncl-talk mailing list