<div class="gmail_quote">On Wed, Nov 26, 2008 at 12:22 PM, Kevin M Levey <span dir="ltr"><<a href="mailto:klevey@customweather.com">klevey@customweather.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
WED 26NOV08: 0915PST<br>
<br>
Dear GRADS users<br>
<br>
I was wondering if anyone in the GRADS community has or is using<br>
Arlindo da Silva's PYGRADS on a regular basis? I hate to bug poor<br>
Arlindo all the time, but I would be keen to get some feedback from<br>
those using PYGRADS to generate plots, not interactively, but using<br>
grads scripts run in batch mode from shell scripts. I have no problem<br>
creating images (with blue marble backgrounds) etc interactively, but<br>
I would like some guidance as to how to convert my existing GRADS GS<br>
scripts and run these form the command line in batch mode. There is no<br>
information regarding this on the current PYGRADS WIKI pages that<br>
Arlindo has set up.<br></blockquote><div><br></div><div><br></div><div><div>Some clarification. I've been using the term "pygrads" to mean 2 related but different things. First, *pygrads* is the name of the package. This package includes the python *grads* module, as well as the command line utility *pygrads*, which is a customization of the interpreter *ipython* given it a bit of a grads look and feel; the utility *pygrads* is generally used for interactive work. Although you could write scripts to be run under ipython, I myself tend not to do so, using instead the module *grads* inside a regular python script.</div>
<div><br></div></div><div>The module *grads* can be imported like any other python module. However, in order to write such scripts you need some familiarity with the python language itself. Take a look at the references I listed in section 4 of the wiki:</div>
<div><br></div><div> <a href="http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS#Additional_References">http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS#Additional_References</a><br>
</div><div><br></div><div>In particular, this wikibook:</div><div><br></div><div> <a href="http://en.wikibooks.org/wiki/Programming:Python">http://en.wikibooks.org/wiki/Programming:Python</a><br></div><div><br></div><div>
For an example of a python script using the *grads* module take a look at this recipe:</div><div><br></div><div><a href="http://cookbooks.opengrads.org/index.php?title=Recipe-003:_Using_PyGrADS_to_save_variable_data_to_a_text_file">http://cookbooks.opengrads.org/index.php?title=Recipe-003:_Using_PyGrADS_to_save_variable_data_to_a_text_file</a><br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
The reason for wanting to use this version of GRADS is that I would<br>
prefer to create plots with the blue marble basemap all within the<br>
same script, and not have to use imagemagick to merge GRADS plots with<br>
pre-existing topo basemaps.<br>
<br>
Anyone who has mastered PYGRADS etc, and who is willing to give me a<br>
few pointers, I'd appreciate the tips and help!<br></blockquote><div><br></div><div>Let me know if you have questions. </div><div><br></div><div> Arlindo</div><div><br></div></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>