Hi,<div><br></div><div>I need to know versions of grads and pygrads you are working with.</div><div><br></div><div> Thanks,</div><div><br></div><div> Arlindo<br><br><div class="gmail_quote">On Thu, May 14, 2009 at 10:29 AM, Hai-Ru Chang <span dir="ltr"><<a href="mailto:hrc@eas.gatech.edu">hrc@eas.gatech.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">Hello,<div> 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</div>
<div><br></div><div><div>Traceback (most recent call last):</div><div> File "nino3_4_pnct.py", line 25, in <module></div><div> sstpcnt = ga.exp("sstpcnt")</div><div> File "/home/scripting/ext/Linux/lib/python2.5/site-packages/grads/ganum.py", line 112, in exp</div>
<div> return self._exp2d(expr)</div><div> File "/home/scripting/ext/Linux/lib/python2.5/site-packages/grads/ganum.py", line 232, in _exp2d</div><div> 'invalid exchange metadata (idim,jdim)=(%d,%d) - make sure <%s> is valid and that lon/lat is varying.'%(id,jd,expr)</div>
<div>grads.gacore.GrADSError: 'invalid exchange metadata (idim,jdim)=(-1,-1) - make sure <sstpcnt> is valid and that lon/lat is varying.'</div><div><br></div><div>I have two questions. First, can I export a defined grads variable to a numpy array? </div>
</div></div></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><div>Second, can I only export a grads variable that is varying in latitude and longitude? </div>
<div></div></div></div></blockquote><div><br></div><div>Yes. In fact, if using exp() it *must* be varying in lat/lon.</div><div><br></div><div> Arlndo</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div><br></div></div><br><div> <p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font:12.0px Helvetica">Dr. Hai-Ru Chang</font></p> <p style="margin:0.0px 0.0px 0.0px 0.0px">
<font face="Helvetica" size="3" style="font:12.0px Helvetica">School of Earth and Atmospheric Sciences</font></p> <p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font:12.0px Helvetica">Georgia Institute of Technology</font></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font:12.0px Helvetica">Atlanta, GA 30332-0340</font></p> <p style="margin:0.0px 0.0px 0.0px 0.0px"><br></p> </div><br></div></blockquote></div>
<br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>
</div>