import a grads variable that has a fixed dimension in lon/lat

Hai-Ru Chang hrc at EAS.GATECH.EDU
Thu May 14 10:29:12 EDT 2009


Hello,
        I tried import a defined grads variable with fixed dimension
on latitude and longitude and varied dimension on time and ensemble
members.  When I  tried to export the variable to python, I saw the
following error messages

Traceback (most recent call last):
   File "nino3_4_pnct.py", line 25, in <module>
     sstpcnt = ga.exp("sstpcnt")
   File "/home/scripting/ext/Linux/lib/python2.5/site-packages/grads/
ganum.py", line 112, in exp
     return self._exp2d(expr)
   File "/home/scripting/ext/Linux/lib/python2.5/site-packages/grads/
ganum.py", line 232, in _exp2d
     'invalid exchange metadata (idim,jdim)=(%d,%d) - make sure <%s>
is valid and that lon/lat is varying.'%(id,jd,expr)
grads.gacore.GrADSError: 'invalid exchange metadata (idim,jdim)=
(-1,-1) - make sure <sstpcnt> is valid and that lon/lat is varying.'

I have two questions.  First, can I export a defined grads variable
to a numpy array?  Second, can I only export a grads variable that is
varying in latitude and longitude?

Thanks!





Dr. Hai-Ru Chang
School of Earth and Atmospheric Sciences
Georgia Institute of Technology
Atlanta, GA 30332-0340


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090514/99b40c91/attachment.html 


More information about the gradsusr mailing list