Re: vinth2p memory leak?

From: Ivan Lima <ivan_at_nyahnyahspammersnyahnyah>
Date: Wed, 08 Apr 2009 09:51:39 -0400

   I have the same exact problem when using Ngl.contour_map repeatedly.
   I use PyNGL/PyNIO 1.3.0b2 on Debian testing.

   Thanks,

Ivan Lima
Woods Hole Oceanographic Institution, MC&G MS #25
360 Woods Hole Road, Woods Hole, MA 02543-1543 USA

Rodrigo Caballero wrote:
> Hello,
>
> I'm having memory problems when calling vinth2p repeatedly, see code
> snippet below. After some iterations (about 80 in my case), memory fills
> up and the code eventually crashes.
> I'm using PyNGL/PyNIO 1.3.0b1 on Mac OSX 10.4, both Intel and PPC
> machines give the same problem. However, the problem does NOT arise when
> I run on Linux x86_64.
> Thanks,
> Rodrigo
>
>
>
> =============================
> from numpy import *
> import os,glob
> import Ngl
> import Nio
>
> File = Nio.open_file('cam_data.nc','r')
>
> time = File.variables['time'][:]
> hyam = File.variables['hyam'][:]
> hybm = File.variables['hybm'][:]
> p0mb = File.variables['P0'].get_value()/100.
>
> pmin = 50.
> pmax = 1050.
> dp = 10.
> p = arange(pmin/dp,pmax/dp+1)*dp
>
> for l in range(len(time)):
> x = File.variables['U'][l,:,:,:]
> ps = File.variables['PS'][l,:,:]
> xi = Ngl.vinth2p(x,hyam,hybm,p,ps,2,p0mb,1,False)
> ================================
>
>
> ----
>
> Rodrigo Caballero | http://maths.ucd.ie/~rca
>
> Meteorology and Climate Center
>
> School of Mathematical Sciences
>
> University College Dublin
>
> Belfield, Dublin 4, Ireland.
>
> Telephone: +353 1 716 5312
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Wed Apr 08 2009 - 07:51:39 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 24 2009 - 11:15:58 MDT