[gradsusr] issue in exporting and expression, change it in Python and import back

Arlindo da Silva dasilva at alum.mit.edu
Mon Oct 3 21:26:44 EDT 2011


On Mon, Oct 3, 2011 at 9:06 PM, Helio Camargo <heliocamargo at gmail.com>wrote:

> Dear gradsusr,
>
> Just before mentioning the error, I like to emphasize that the environment
> variables GAUDXT and LD_LIBRARY_ PATH are (apparently) properly set in my
> .bashrc.
>
>
If you are using the opengrads bundle, you should *not* set any of these;
just put Contents/ in your path.



> I've been struggling a bit just to follow a pygrads example available in
> http://opengrads.org/wiki/index.php?title=PyGrADS_Interactive_Shell .
> Everytime I want to export and expression, change it in Python and import
> back I get the following message:
>
>
Which version of pygrads are you using?  Which platform? Are using EPD? If
so, which version?

   Arlindo



>
> ***********
> iuser at iuser-Dell-System-Vostro-3450:~$ pygrads
>
>   Welcome to PyGrADS, a GrADS-based iPython environment.
>
> Grid Analysis and Display System (GrADS) Version 2.0.a9.oga.1
> Copyright (c) 1988-2010 by Brian Doty and the
> Institute for Global Environment and Society (IGES)
> GrADS comes with ABSOLUTELY NO WARRANTY
> See file COPYRIGHT for more information
>
> Config: v2.0.a9.oga.1 little-endian readline printim grib2 netcdf hdf4-sds
> hdf5 opendap-grids,stn athena geotiff shapefile
> Issue 'q config' command for more detailed configuration information
> Loading User Defined Extensions table
> </opt/opengrads/Linux/Versions/2.0.a9.oga.1/i686/gex/udxt> ... ok.
> GX Package Initialization: Size = 11 8.5
>
>
>    Welcome to PyGrADS, a GrADS-based iPython environment.
>    For more information, type 'help(ipygrads)'
>
> ?         -> Introduction and overview of IPython's features.
> help      -> Python's own help system.
> qref      -> PyGrADS quick reference
> examples  -> Some PyGrADS examples
> object?   -> Details about 'object'. ?object also works, ?? prints more.
>
>
>
>  [2] ga-> o model
> Scanning description file:  model
> Data file model.grb is open as file 1
> LON set to 0 360
> LAT set to -90 90
> LEV set to 1000 1000
> Time values set: 1987:1:1:0 1987:1:1:0
> E set to 1 1
>
>
>  [3] ga-> . q dims
> Default file number is: 1
> X is varying   Lon = 0 to 360   X = 1 to 73
> Y is varying   Lat = -90 to 90   Y = 1 to 46
> Z is fixed     Lev = 1000  Z = 1
> T is fixed     Time = 00Z01JAN1987  T = 1
> E is fixed     Ens = 1  E = 1
>
>
>  [4] ga-> . set lev 300
> LEV set to 300 300
>
>
>  [5] ga-> uv = ga.exp('ua*ua+va*va')
>
>  [6] ga-> speed = sqrt(uv)
>
>  [7] ga-> ga.imp('speed', speed)
>
> ------------------------------------------------------------
> Traceback (most recent call last):
>   File "<ipython console>", line 1, in <module>
>   File "/usr/local/lib/python2.7/dist-packages/grads/ganum.py", line 336,
> in imp
>     t1_, z1_ = (grid.denv.t[0], grid.denv.z[0])
> AttributeError: 'NoneType' object has no attribute 't'
>
>
>  [8] ga-> ga.imp('speed', speed)
> ^[[A
> ^C------------------------------------------------------------
> Traceback (most recent call last):
>   File "<ipython console>", line 1, in <module>
>   File "/usr/local/lib/python2.7/dist-packages/grads/ganum.py", line 298,
> in imp
>     dh = self.query("dims", Quiet=True)
>   File "/usr/local/lib/python2.7/dist-packages/grads/gacore.py", line 494,
> in query
>     self.cmd('query '+what,Quiet)
>   File "/usr/local/lib/python2.7/dist-packages/grads/gacore.py", line 241,
> in cmd
>     rc = self._parseReader(Quiet)
>   File "/usr/local/lib/python2.7/dist-packages/grads/gacore.py", line 1051,
> in _parseReader
>     got = self.Reader.readline()
> KeyboardInterrupt
>
>
>  [9] ga->
> ^C
> ************
>
> The funny thing is that after I try it once, the second try gets stuck and
> only CTRL+C returns the prompt back...
>
> Any hint on what can be going on will be very welcome.
>
> Thx in advance,
>
> --
> Helio
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


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


More information about the gradsusr mailing list