[ncl-talk] Fwd: Setting contour levels with setvalues

Kyle Griffin ksgriffin2 at wisc.edu
Tue Aug 26 08:26:05 MDT 2014


Hi all,

I solved this problem this morning. While the biggest issue with my example
was the lack of a statement to convert the input from string to a numeric
type, I did have such provisions in my actual code of interest.

It turns out that the order with which contour resources are set *does*
matter. If cnLevels or cnMinLevelValF, cnMaxLevelValF, and cnLevelSpacingF
(depending on selection mode) are set before the cnLevelSelectionMode is
set, the previously-set limits are essentially ignored (or perhaps
partially reset?). I can't quite say what was happening as I didn't look
into it, but just wanted to clarify that it is crucial to set
cnLevelSelectionMode ***before*** setting any other related resources with
the 'setvalues' command.


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


---------- Forwarded message ----------
From: Kyle Griffin <ksgriffin2 at wisc.edu>
Date: Mon, Aug 25, 2014 at 6:29 PM
Subject: Setting contour levels with setvalues
To: ncl-talk <ncl-talk at ucar.edu>


Hi all,

I have either found a bug or am missing other resources that need setting.
My problem stems from not being able to properly limit the min and max
levels with cnMinLevelValF/cnMaxLevelValF in ManualLevels mode and cnLevels
with ExplicitLevels mode. While this doesn't seem to always occur, I've
attached a script which duplicates this problem. There might be a few
unnecessary lines in the script as well, as I've been testing quite a bit
of the object-oriented setvalues/getvalues commands. You can test each mode
by commenting/uncommenting the pair of vresources/vresvalue variables just
inside the begin statement. I think this is all self-contained (aside from
the two gsm load statements), but let me know if anything doesn't work when
the script is run. This is on a 64-bit linux system with 6.1.2. Thanks,


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140826/150219b3/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_values_ncltalk.ncl
Type: application/octet-stream
Size: 2024 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140826/150219b3/attachment.obj 


More information about the ncl-talk mailing list