import a grads variable that has a fixed dimension in lon/lat
Arlindo da Silva
arlindo.dasilva at GMAIL.COM
Thu May 14 10:37:17 EDT 2009
Hi,
I need to know versions of grads and pygrads you are working with.
Thanks,
Arlindo
On Thu, May 14, 2009 at 10:29 AM, Hai-Ru Chang <hrc at eas.gatech.edu> wrote:
> 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?
>
Yes.
> Second, can I only export a grads variable that is varying in latitude and
> longitude?
>
Yes. In fact, if using exp() it *must* be varying in lat/lon.
Arlndo
>
>
> Dr. Hai-Ru Chang
>
> School of Earth and Atmospheric Sciences
>
> Georgia Institute of Technology
>
> Atlanta, GA 30332-0340
>
>
>
>
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090514/472382c3/attachment.html
More information about the gradsusr
mailing list