<div dir="ltr"><div><div><div><div><div>You don'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>'print filename_value'par'.eps'<br><br></div>where the extra single quotes remove the string "par" 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"><<a href="mailto:lzamboni@mcs.anl.gov" target="_blank">lzamboni@mcs.anl.gov</a>></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'd<br>
like to do is the following:<br>
'define par=10'<br>
(instructions)<br>
'print filename_value<par>.eps'<br>
in which I'd like to see the value "10" in lieu of <par><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>