No subject


Wed Apr 14 09:37:02 EDT 2010


with a very useful scripting language, there are times when more powerful
scripting is called for. Here are just a few of the reasons you may have to
script GrADS from Perl <http://en.wikipedia.org/wiki/Perl>:

   - You are an experienced Perl
<http://en.wikipedia.org/wiki/Perl>programmer new to GrADS and do not
want to spend the time learning a new
   scripting language.
   - You need some GrADS functionality inside your regular Perl script,
   say, parse the contents of a GrADS readable dataset or want to store your
   metadata in a mySQL database.
   - You would like to transparently issue GraDS commands inside your
   cgi-bin <http://en.wikipedia.org/wiki/Common_Gateway_Interface> script
   and produce images for your dynamic website.
   - You want to query your OpenDAP
<http://www.opendap.org/index.html>server and figure out which is the
latest forecast available before actually
   opening the dataset.
   - You would like to use PerlTK <http://www.perltk.org/> or any other
   toolkit to write a Graphical User Interface for GrADS.
   - Your script is getting too complex and you could use an object
   oriented approach to better organize and reuse your code.
   - You would like to explore GrADS ability to slice and dice a
   meteorological dataset or OpenDAP URL, but prefer to use Perl Data
   Language (PDL) <http://pdl.perl.org/> to perform further analysis and
   visualization your dataset.
   - You are tired of counting lines and words for parsing a query
   command in a GrADS native script, and could use a else if construct.

Whatever your case may be, you should be able to just about do all of your
GrADS scripting in Perl. There is also a Python
Interface<http://opengrads.org/wiki/index.php?title=Python_Interface&action=edit>with
an API along the same lines.

The GrADS interfaces to Perl comes in 2 flavors: 1) an object oriented
module (Grads.pm), and 2) a more procedural module (Gerl.pm), built on top
of Grads.pm, that has more of the look and feel of a classic GrADS script.
For interative work you may want to try gadl, a customization of the Perl
Data Language (PDL) for GrADS.
  Enjoy!

     Arlindo


--
Arlindo da Silva
dasilva at alum.mit.edu

------=_Part_13251_17696766.1202357803378
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

All,<br><br>I just uploaded &quot;Gerl&quot;, a package implementing a Perl interface to GrADS, with an API much along the same lines as the Python interface PyGrADS. You can download it from <a href="http://sf.net">sf.net</a>:<br>
<br>&nbsp;&nbsp; <a href="http://sourceforge.net/project/showfiles.php?group_id=161773&amp;package_id=256759">http://sourceforge.net/project/showfiles.php?group_id=161773&amp;package_id=256759</a><br><br>I am yet to post it on CPAN. You can find documentation at the OpenGrADS Wiki, including a couple of tutorials and manual pages:<br>
<br>&nbsp; <a href="http://opengrads.org/wiki/index.php?title=Perl_Interface_to_GrADS">http://opengrads.org/wiki/index.php?title=Perl_Interface_to_GrADS</a><br clear="all"><br>From the wiki:<br><h1 class="firstHeading">Perl Interface to GrADS</h1>
Although <a href="http://grads.iges.org/grads" class="external text" title="http://grads.iges.org/grads" rel="nofollow">GRADS</a>
comes with a very useful scripting language, there are times when more
powerful scripting is called for. Here are just a few of the reasons
you may have to script GrADS from <a href="http://en.wikipedia.org/wiki/Perl" class="external text" title="http://en.wikipedia.org/wiki/Perl" rel="nofollow">Perl</a>:

<ul><li> You are an experienced <a href="http://en.wikipedia.org/wiki/Perl" class="external text" title="http://en.wikipedia.org/wiki/Perl" rel="nofollow">Perl</a> programmer new to GrADS and do not want to spend the time learning a new scripting language.
</li><li> You need some GrADS functionality inside your regular Perl
script, say, parse the contents of a GrADS readable dataset or want to
store your metadata in a mySQL database.
</li><li> You would like to transparently issue GraDS commands inside your <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" class="external text" title="http://en.wikipedia.org/wiki/Common_Gateway_Interface" rel="nofollow">cgi-bin</a> script and produce images for your dynamic website.
</li><li> You want to query your <a href="http://www.opendap.org/index.html" class="external text" title="http://www.opendap.org/index.html" rel="nofollow">OpenDAP</a> server and figure out which is the latest forecast available before actually opening the dataset.
</li><li> You would like to use <a href="http://www.perltk.org/" class="external text" title="http://www.perltk.org/" rel="nofollow">PerlTK</a> or any other toolkit to write a Graphical User Interface for GrADS.
</li><li> Your script is getting too complex and you could use an object oriented approach to better organize and reuse your code.
</li><li> You would like to explore GrADS ability to slice and dice a meteorological dataset or OpenDAP URL, but prefer to use <a href="http://pdl.perl.org/" class="external text" title="http://pdl.perl.org/" rel="nofollow">Perl Data Language (PDL)</a> to perform further analysis and visualization your dataset.
</li><li> You are tired of counting lines and words for parsing a query command in a GrADS native script, and could use a <tt>else if</tt> construct.
</li></ul>
<p>Whatever your case may be, you should be able to just about do all of your GrADS scripting in Perl. There is also a <a href="http://opengrads.org/wiki/index.php?title=Python_Interface&amp;action=edit" class="new" title="Python Interface">Python Interface</a> with an API along the same lines.
</p><p>The GrADS interfaces to Perl comes in 2 flavors: 1) an object oriented module (<tt><a href="http://Grads.pm">Grads.pm</a></tt>), and 2) a more procedural module (<tt><a href="http://Gerl.pm">Gerl.pm</a></tt>),
built on top of <a href="http://Grads.pm">Grads.pm</a>, that has more of the look and feel of a
classic GrADS script. For interative work you may want to try <tt>gadl</tt>, a customization of the Perl Data Language (PDL) for GrADS.
</p>&nbsp; Enjoy!<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Arlindo<br><br><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva at alum.mit.edu">dasilva at alum.mit.edu</a>

------=_Part_13251_17696766.1202357803378--



More information about the gradsusr mailing list