<div dir="ltr"><div><div><div><div><div>You don&#39;t need to do it that way.  Defining a script variable (within a Grads script) is as simple as<br><br></div>var = value (no quotes)<br><br></div>So, for you, it would be<br>
</div>par = 10<br></div>&#39;print filename_value&#39;par&#39;.eps&#39;<br><br></div>where the extra single quotes remove the string &quot;par&quot; from the Grads command and replace it with its script variable value.<br>
<br>Jeff Duda<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 12, 2014 at 1:28 PM, Laura Zamboni <span dir="ltr">&lt;<a href="mailto:lzamboni@mcs.anl.gov" target="_blank">lzamboni@mcs.anl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
how can I convert a grads variable to a string within a script? What I&#39;d<br>
like to do is the following:<br>
&#39;define par=10&#39;<br>
(instructions)<br>
&#39;print filename_value&lt;par&gt;.eps&#39;<br>
in which I&#39;d like to see the value &quot;10&quot; in lieu of &lt;par&gt;<br>
<br>
Thanks,<br>
Laura<br>
<br>
--<br>
-------------------------<br>
My research and why I got to Argonne curious?<br>
<a href="http://www.anl.gov/articles/laura-zamboni" target="_blank">http://www.anl.gov/articles/laura-zamboni</a><br>
<br>
-------------------------<br>
-------------------------<br>
Laura Zamboni, PhD<br>
Computational Postdoctoral Fellow - Climate Scientist<br>
Board member of the Postdoctoral Society of Argonne - Chair of the PSA mentoring committee<br>
Argonne National Laboratory, MCS Division<br>
9700 S.Cass Ave<br>
TCS Bldg #240, room 4152<br>
Argonne, IL 60439<br>
ph.+1 630-252-1131<br>
fax. +1 630-252-5986<br>
web: <a href="http://www.mcs.anl.gov/~lzamboni/" target="_blank">http://www.mcs.anl.gov/~lzamboni/</a><br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>