<div dir="ltr">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#)'.<div>
<br></div><div style>Jeff Duda</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 21, 2013 at 6:41 PM, Sam Wilson <span dir="ltr"><<a href="mailto:sam@surfline.com" target="_blank">sam@surfline.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>
<div>
<div>Hi all,</div>
<div><br>
</div>
<div>I have a grads script that reads satellite data and figures out a temperature range based on the data over an area:</div>
<div><br>
</div>
<div>sstrange = maxtemp – mintemp</div>
<div><br>
</div>
<div>I would like to have 254 levels (colors) between that high and low temp, so I calculate an interval like so:</div>
<div><br>
</div>
<div>interval = sstrange/254</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">i = 1</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">while (i < 254)</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">clev.i = mintemp+(interval*i)</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">'set clevs 'clev.i</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">i = i + 1</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">endwhile</span></div>
</div>
<div><br>
</div>
<div>I also tried the following:</div>
<div><br>
</div>
<div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">'set cmin 'finallowt</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">'set cmax 'finalhight</span></div>
<div style="font-family:Consolas;font-size:medium"><span style="font-family:Calibri">'set cint 'interval</span></div>
</div>
<div><br>
</div>
<div>But I get a message saying 'Too many contour levels -- adjusting cint'.</div>
<div><br>
</div>
<div>Any ideas if this is possible or how to solve it?</div>
<div><br>
</div>
<div>Thanks and best regards.</div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Sam</div>
</font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>