Recovering after natgrid failure

From: daryl herzmann <akrherz_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 04 2010 - 10:21:43 MST

Howdy PyNGL'rs!

So, I've got a fancy program that loops over times to grid out data for
each time. The problem is that when natgrid hits a failure, the next call
results in a segfault. Here is a simple reproducer:

import Ngl
import numpy

vals = [278.14, 280.87, 280.87]
lats = [31.39, 33.21, 33.57]
lons = [-92.29, -87.62, -86.75]

XAXIS = numpy.arange(-92., -88.25, 0.25)
YAXIS = numpy.arange(30.,25., 0.25)

grid = Ngl.natgrid(lons, lats, vals, XAXIS, YAXIS)
grid = Ngl.natgrid(lons, lats, vals, XAXIS, YAXIS)

---------
Running in gdb yields:

Program received signal SIGSEGV, Segmentation fault.
0x00002ac7557be22f in FreeMatrixd ()
    from /home/mesonet/python-2.5/lib/python2.5/site-packages/PyNGL/_hlu.so

I ran a simple/similiar test with NCL and get the same segfault.

thanks!
   daryl

-- 
/**
  * Daryl Herzmann
  * Assistant Scientist -- Iowa Environmental Mesonet
  * http://mesonet.agron.iastate.edu
  */
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Mar 4 18:12:41 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 29 2010 - 12:19:51 MDT