[gradsusr] set clevs dynamically
Sam Wilson
sam at surfline.com
Tue May 21 19:41:24 EDT 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130521/fd427fcd/attachment-0003.html
More information about the gradsusr
mailing list