Re: plotting question

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 28 2011 - 19:52:23 MDT

Hi Kate,

My guess is that the array you're trying to pass as a value to sfYArray hasn't been referenced correctly.

When you do this:

clat = file1.variables["clat"]
clon = file1.variables["clon"]

clat and clon are just references to a variable, and not the actual values themselves. Try this, in order to get the values:

res.sfXArray = clon[:]
res.sfYArray = clat[:]

--Mary

On Apr 26, 2011, at 9:17 AM, Kate Hedstrom wrote:

> Dear Pyngl folks,
>
> I'm trying to follow the vector_pop.py example to plot some vectors. I
> thought viewing the box first would be fun, but I'm getting an error:
>
> python pop_ice.py
> value for keyword sfYArray is invalid.
> Traceback (most recent call last):
> File "pop_ice.py", line 48, in <module>
> plot = Ngl.contour_map(wks, hice[:-2,:-2], res)
> File "/u1/uaf/kate/lib/python2.6/site-packages/PyNGL/Ngl.py", line
> 2713, in contour_map
> rlist1,rlist3,rlist2,pvoid())
> SystemError: error return without exception set
>
>
> What's up with that sfYArray not being valid?
>
> Kate
> <pop_ice.py>_______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Apr 28 19:52:33 2011

This archive was generated by hypermail 2.1.8 : Wed May 18 2011 - 12:00:50 MDT