[gradsusr] set clevs dynamically
Sam Wilson
sam at surfline.com
Tue May 21 21:49:23 EDT 2013
Hi Jeff,
Thanks for the response. I have the RGB values and the 'set ccols' command covered I think. Those will remain static no matter what the high/low temps are. I'm looking for how to work the 'set clevs' command, which I need to be variable from data file to data file, given that the temperature ranges will change. So, I'm wondering if I can create an array of clevs, and pass that to the 'set clevs' command.
Thanks,
Sam
On May 21, 2013, at 6:32 PM, "Jeff Duda" <jeffduda319 at gmail.com<mailto:jeffduda319 at gmail.com>> wrote:
You need to also set the contour colors. This means you will need to use the 'set rgb R G B' commands to define color numbers up to 255 (the highest allowable in Grads) and set the color values using the 'set ccols (list#)'.
Jeff Duda
On Tue, May 21, 2013 at 6:41 PM, Sam Wilson <sam at surfline.com<mailto:sam at surfline.com>> wrote:
Hi all,
I have a grads script that reads satellite data and figures out a temperature range based on the data over an area:
sstrange = maxtemp – mintemp
I would like to have 254 levels (colors) between that high and low temp, so I calculate an interval like so:
interval = sstrange/254
I have all the colors I need for the set ccols option, however I'm wondering if there is a way to dynamically set clevs based on the high and low temp and the interval. I tried the below, but I don't think it worked:
i = 1
while (i < 254)
clev.i = mintemp+(interval*i)
'set clevs 'clev.i
i = i + 1
endwhile
I also tried the following:
'set cmin 'finallowt
'set cmax 'finalhight
'set cint 'interval
But I get a message saying 'Too many contour levels -- adjusting cint'.
Any ideas if this is possible or how to solve it?
Thanks and best regards.
Sam
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130522/2d07e4f0/attachment-0003.html
More information about the gradsusr
mailing list