[gradsusr] set clevs dynamically

Jeff Duda jeffduda319 at gmail.com
Tue May 21 21:29:31 EDT 2013


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> 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
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130521/1d6fab0e/attachment-0003.html 


More information about the gradsusr mailing list