Memory leak with array overwriting

From: Tompkins Adrian <tompkins_at_nyahnyahspammersnyahnyah>
Date: Thu, 30 Jul 2009 15:38:40 +0200

hello all,

I am running NCL 5.0.0

I have a 2D array, cprmask(x,z), and want to rotate the contents of each
x-slice to the right by "nshift" places with cyclic boundary conditions.

As nshift itself is a function of height, I resorted to a Do-Loop as
follows:

    do i=0,nhgtr-1
      nshift = round(hgtr(i)*tan_sza_dx,3)
      index = mod(ispan(0,npts-1,1)+nshift,npts)
      shiftmask(:,i) = cprmask(index,i)
      delete(index)
    end do

This works, BUT I suffer from a nasty memory leak problem that is not
allowing be to run the program for large amounts of data, despite the
fact that I also have a "delete(shiftmask)" statement later in the
"mother" do loop.

does anyone have any ideas how to prevent the memory leak?

thanks,

Adrian

-- 
+39 040 2240579 (office) | Earth System Physics
+39 040 2240449 (fax)    | ICTP (UNESCO-IAEA)
esp.ictp.it              | Strada Costiera 11
www.ictp.it/~tompkins    | 34014 Trieste, Italy
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 30 2009 - 07:38:40 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 31 2009 - 14:51:03 MDT