[gradsusr] PyGrADS OK, but python script is not working!

Arlindo da Silva dasilva at alum.mit.edu
Sun Apr 3 11:29:24 EDT 2011


On Tue, Mar 29, 2011 at 4:53 AM, Wang Jun <daxiawj at gmail.com> wrote:

>  Hello, dear list,
>
>    I have install pygrads successfully on my Ubuntu 11.04 with opengrads
> 2.0.a8.
>
>    When I test the pygrads as
> "*
> http://cookbooks.opengrads.org/index.php?title=Recipe-008:_Using_PyGrADS_to_draw_contours_on_top_of_a_true-color_image_of_the_earth_%28Blue_Marble%29
> *  "
>
>    It worked !
>
>    While when I start to use python script as following : *(ts.py*)
> *import grads
> from pylab import title, savefig
> ga = GrADS()
> *
>

ga = grads.GrADS()


* ga.open('model.ctl')
> ga.contour('ts')
> title('Surface Temperature')
> savefig('ts.png')*
>
>
>  and run it with:         * python2.6  ts.py*
>
>  It said:
> *
> /usr/local/lib/python2.6/dist-packages/grads/gacore.py:42:
> DeprecationWarning: The popen2 module is deprecated.  Use the subprocess
> module.
>   from popen2 import popen2
> *
>

Ignore this warning.


> * Traceback (most recent call last):
>   File "ts.py", line 3, in <module>
>     ga = GrADS()
> NameError: name 'GrADS' is not defined*
>
>
>
See above.



> Can anybody tell me what's the problem here and how can I fix it?
>
>
>
  Arlindo



-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110403/3c9b3dce/attachment-0003.html 


More information about the gradsusr mailing list