<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi Arlindo,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I am experiencing the same problem with python returning AttributeError: &#39;NoneType&#39; object has no attribute &#39;t&#39;. I&#39;m on the latest version of pygrads version 1.1.8. </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I&#39;m trying to work through the following example.</div><div style="font-family:arial,sans-serif;font-size:13px">
<pre style="white-space:pre-wrap;background-color:rgb(249,249,249);padding:1em;line-height:1.1em;border:1px dashed rgb(47,111,171)">  [] ga-&gt; clear
  [] ga-&gt; uv = ga.exp(&#39;ua*ua+va*va&#39;)
  [] ga-&gt; speed = sqrt(uv)
  [] ga-&gt; dd speed</pre><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"> I looked into it and I believe the issue is when you execute the </div>
<div style="font-family:arial,sans-serif;font-size:13px">speed = sqrt(uv) command of the example. I believe the sqrt function is not properly instantiating the GaGrid object by not passing it the GaHandle object or by not setting the meta data after instantiating the GaGrid object.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">If you look at the uv object you see that the associated meta data is set, but when you look at the speed object its not set. Here is an example of what I am seeing.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>Successfully opened &lt;Contents/Resources/SampleDatasets/model.ctl&gt; as File 1</div><div>
<br></div><div> [1] ga-&gt; uv = ga.exp(&#39;ua*ua+va*va&#39;)</div><div>/usr/lib/python2.6/site-packages/pygrads-1.1.8-py2.6.egg/grads/numtypes.py:131: DeprecationWarning: object.__init__() takes no parameters</div><div>
  ma.MaskedArray.__init__(self,data, **kwargs)</div><div><br></div><div> [2] ga-&gt; speed = sqrt(uv)</div><div><br></div><div> [3] ga-&gt; uv.grid</div><div>  Out[3]: &lt;grads.numtypes.GaGrid at 0x29fe890&gt;</div><div>
<br></div><div> [4] ga-&gt; speed.grid</div><div>  Out[4]: &lt;grads.numtypes.GaGrid at 0x29fea10&gt;</div><div><br></div><div> [5] ga-&gt; uv.grid.denv</div><div>  Out[5]: </div><div>&lt;grads.gahandle.GaHandle object at 0x29fe990&gt;</div>
<div>==================================</div><div>  Handle name = dims</div><div>==================================</div><div>     xi = (1, 73)</div><div>     ei = (1, 1)</div><div>     zi = (1, 1)</div><div>   rank = 2</div>
<div>e_state = fixed</div><div>     ti = (1, 1)</div><div>   tyme = [datetime.datetime(1987, 1, 1, 0, 0), datetime.datetime(1987, 1, 1, 0, 0)]</div><div>    lon = (0.0, 360.0)</div><div>     ne = 1</div><div>     nx = 73</div>
<div>     ny = 46</div><div>     nz = 1</div><div>    ens = (&#39;1&#39;, &#39;1&#39;)</div><div>     rc = 0</div><div>  dfile = 1</div><div>     nt = 1</div><div>     yi = (1, 46)</div><div>t_state = fixed</div><div>z_state = fixed</div>
<div>x_state = varying</div><div>    lev = (1000.0, 1000.0)</div><div>    lat = (-90.0, 90.0)</div><div>y_state = varying</div><div>      e = (1, 1)</div><div>   name = dims</div><div>      t = (1, 1)</div><div>   time = (&#39;00Z01JAN1987&#39;, &#39;00Z01JAN1987&#39;)</div>
<div>      y = (1.0, 46.0)</div><div>      x = (1.0, 73.0)</div><div>      z = (1, 1)</div><div><br></div><div><br></div><div> [6] ga-&gt; speed.grid.denv</div><div><br></div><div> [7] ga-&gt; uv.grid.lat</div><div>  Out[7]: </div>
<div>array([-90., -86., -82., -78., -74., -70., -66., -62., -58., -54., -50.,</div><div>       -46., -42., -38., -34., -30., -26., -22., -18., -14., -10.,  -6.,</div><div>        -2.,   2.,   6.,  10.,  14.,  18.,  22.,  26.,  30.,  34.,  38.,</div>
<div>        42.,  46.,  50.,  54.,  58.,  62.,  66.,  70.,  74.,  78.,  82.,</div><div>        86.,  90.], dtype=float32)</div><div><br></div><div> [8] ga-&gt; speed.grid.lat</div><div><br></div><div> [9] ga-&gt; </div></div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thus when you try to import speed it crashes because the meta data it needs to do the import is missing. </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Kenneth</div><div class="" style="font-family:arial,sans-serif;font-size:13px"></div></div>