<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Thx for the script, as soon I have time, I will try this!<br>
<br>
<blockquote cite="mid:63AFF9A8-6F2C-4E98-A816-9AD7465079BD@nasa.gov"
 type="cite">I &nbsp;had this same issue recently and finally figured out
how it works with some help from this list. &nbsp;What was non-intuitive to
me is that every time you do a 'display' command you have to reset the
clevs and ccols. &nbsp;What I do is specify the cmin, cmax, and cint with
script arguments and then set clevs using those variables each time I
do a display. &nbsp;You can set ccols if you want or just let it get set
automatically. &nbsp;Here is an animation script I am using.
  <div><br>
  </div>
  <div>
  <div>* Display animation&nbsp;</div>
  <div>* &nbsp; &nbsp; ga&gt; run ani variable [ -I slowness (default=10) ]</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ -cint, -ci &nbsp;contour interval ]</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ -cmin, -mn &nbsp;minimum contour level
]</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ -cmax, -mx &nbsp;maximum contour level
]</div>
  <div>* &nbsp; ex. ga&gt; run ani t-t.2 -ci 0.1 -mn -0.5 -I 5 -cmax 0.3</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt;&gt;&gt;&gt; plot (t-t.2) with slowness=5,
contour_interval=0.1</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minimum contour level=-0.5, maximum contour
level=0.3</div>
  <div>*</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Nov. 9, 1999
Masami Nonaka</div>
  <div>*</div>
  <div>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Modified by Clay Blankenship 2011</div>
  <div>*</div>
  <div>function ani (args)</div>
  <div><br>
  </div>
  <div>variable=subwrd(args,1)</div>
  <div><br>
  </div>
  <div>slow=''</div>
  <div>cint=''</div>
  <div>cmin=''</div>
  <div>cmax=''</div>
  <div>cbar=''</div>
  <div>n=2</div>
  <div><br>
  </div>
  <div>while(n&lt;10000)</div>
  <div>idx=subwrd(args,n)</div>
  <div>opt=subwrd(args,n+1)</div>
  <div>if(idx='');break;endif</div>
  <div>if(idx='-I');slow=opt;endif</div>
  <div>if(idx='-Int');slow=opt;endif</div>
  <div>if(idx='-cint');cint=opt;endif</div>
  <div>if(idx='-cmin');cmin=opt;endif</div>
  <div>if(idx='-cmax');cmax=opt;endif</div>
  <div>if(idx='-ci');cint=opt;endif</div>
  <div>if(idx='-mn');cmin=opt;endif</div>
  <div>if(idx='-mx');cmax=opt;endif</div>
  <div>n=n+2</div>
  <div>endwhile</div>
  <div><br>
  </div>
  <div>defaultslow=10</div>
  <div>if(slow=''); slow=defaultslow;endif</div>
  <div><br>
  </div>
  <div>&nbsp;'q dims'</div>
  <div>&nbsp;say result</div>
  <div>aline=sublin(result,5)</div>
  <div>cctime1=subwrd(aline,11)</div>
  <div>cctime2=subwrd(aline,13)</div>
  <div>tmin=substr(cctime1,1,9)</div>
  <div>tmax=substr(cctime2,1,9)</div>
  <div>it=tmin</div>
  <div>'set dbuff on'</div>
  <div>while (it &lt;=tmax)</div>
  <div>&nbsp;'set t 'it</div>
  <div>i=0</div>
  <div>while (i &lt;slow)</div>
  <div><br>
  </div>
  <div>*CBB 3/22/11 setting max min clevs</div>
  <div>if((ccint!='')&amp;(ccmin!='')&amp;(ccmax!=''))</div>
  <div>&nbsp;&nbsp;'make_clevs 'cmin' 'cmax' 'cint</div>
  <div>endif</div>
  <div>*'set ccols 1 2 3 4 5 6 7 8 9 10 11'</div>
  <div><br>
  </div>
  <div>&nbsp;'display 'variable</div>
  </div>
  <div><br>
  </div>
  <div>
  <div>&nbsp;'run date.gs'</div>
  <div><br>
  </div>
  <div>&nbsp;'query shades'</div>
  <div>shdinfo = result</div>
  <div>if(subwrd(shdinfo,1)!='None');'run fcbar.gs';endif</div>
  <div><br>
  </div>
  <div>'swap'</div>
  <div>i=i+1</div>
  <div>endwhile</div>
  <div>&nbsp;it=it+1</div>
  <div>endwhile</div>
  <div>&nbsp;'set t ' tmin ' ' tmax</div>
  </div>
  <div><br>
  </div>
  <div>
  <div>****END OF SCRIPT</div>
  <div><br>
  </div>
  <div>*Here is make_clevs.gs</div>
  <div><br>
  </div>
  <div>
  <div>*CBB I got this from Ron Goodson on the GRADS User Forum, 3/22/11</div>
  <div>*Set a min and max value for the color bar</div>
  <div>function main(UserInput)</div>
  <div>value = subwrd(UserInput,1)</div>
  <div>maxvalue = subwrd(UserInput,2)</div>
  <div>incvalue = subwrd(UserInput,3)</div>
  <div>space = " "</div>
  <div>say value space maxvalue space incvalue</div>
  <div>mystring = " "</div>
  <div>while (value &lt;= maxvalue)</div>
  <div>mystring = mystring%value</div>
  <div>mystring = mystring%" "</div>
  <div>value = value + incvalue</div>
  <div>endwhile</div>
  <div>'set clevs ' mystring</div>
  <div>say 'clevs are 'mystring</div>
  <div>return</div>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  <div><br>
  </div>
  <div><br>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  <div>
  <div>On Apr 4, 2011, at 2:29 AM, Simon Kiertscher wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div>Yes you can control it by set clevs, but i hoped there would
be a script<br>
doing all that for me. I can't use the scripts I found the way they are<br>
at the moment. And doing it by my self would be very expensive. Any<br>
other ideas?<br>
    <br>
Best Regards,<br>
Simon<br>
    <blockquote type="cite">I believe you need to set the clevs so that
the range in the color bar is <br>
    </blockquote>
    <blockquote type="cite">fixed for each timestep at which the
variable is plotted<br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite">set clevs ...<br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite">--<br>
    </blockquote>
    <blockquote type="cite">Muhammad Rahiz<br>
    </blockquote>
    <blockquote type="cite">Researcher &amp; DPhil Candidate (Climate
Systems &amp; Policy)<br>
    </blockquote>
    <blockquote type="cite">School of Geography &amp; the Environment<br>
    </blockquote>
    <blockquote type="cite">University of Oxford<br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite">On Fri, 1 Apr 2011, Simon Kiertscher wrote:<br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">Hi All,<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">I have a question about colorbars. I have
already found several scripts<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">for drawing a colorbar under a picture
(e.g. cbar.gs, xcbar.gs ...).<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">That works fine. My Problem is, I would
like to make a video out of a<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">couple of pictures from one time line.
The problem is that the colorbar<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">always shows the max and min of the
current picture. Therefor my video<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">has a changing colorbar what is really
not what I want. I want to have<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">fixed colorbar about the whole video
length. I hope i could explain my<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">problem good enough. Any ideas how to do
that? Are there eventually a<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">script which has a parameter to enter the
maximum and minimum values?<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">Thank &amp; Best Regards,<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">Simon<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite"><br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">_______________________________________________<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">gradsusr mailing list<br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite"><a moz-do-not-send="true"
 href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite"><a moz-do-not-send="true"
 href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite"><br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite"><br>
      </blockquote>
    </blockquote>
    <blockquote type="cite">_______________________________________________<br>
    </blockquote>
    <blockquote type="cite">gradsusr mailing list<br>
    </blockquote>
    <blockquote type="cite"><a moz-do-not-send="true"
 href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
    </blockquote>
    <blockquote type="cite"><a moz-do-not-send="true"
 href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <blockquote type="cite"><br>
    </blockquote>
    <br>
_______________________________________________<br>
gradsusr mailing list<br>
    <a moz-do-not-send="true" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
    </div>
  </blockquote>
  </div>
  <br>
  <div apple-content-edited="true">
  <div style="word-wrap: break-word;">
  <div style="word-wrap: break-word;">
  <div
 style="word-wrap: break-word; font-family: Monaco; font-size: 12px;">
  <div style="word-wrap: break-word;">
  <div>
  <div>
  <div>
  <div>--&nbsp;</div>
  <div>Clay Blankenship &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * USRA Research Scientist</div>
  </div>
  <div>
  <div>
  <div>
  <div><a moz-do-not-send="true"
 href="mailto:clay.b.blankenship@nasa.gov">clay.b.blankenship@nasa.gov</a>
&nbsp; &nbsp; &nbsp;* 256-961-7638</div>
  </div>
  </div>
  </div>
  <div>320 Sparkman Drive &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * Huntsville, AL 35805 USA</div>
  </div>
  </div>
  <div>National Space Science and Technology Center at NASA-MSFC/UAH</div>
  <br>
  </div>
  <br class="Apple-interchange-newline">
  </div>
  <br class="Apple-interchange-newline">
  </div>
  <br class="Apple-interchange-newline">
  </div>
  <br class="Apple-interchange-newline">
  </div>
  <br>
  </div>
  </div>
  </div>
  </div>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
  </pre>
</blockquote>
<br>
</body>
</html>