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

    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)
    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?



+39 040 2240579 (office) | Earth System Physics
+39 040 2240449 (fax)    | ICTP (UNESCO-IAEA)              | Strada Costiera 11    | 34014 Trieste, Italy
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
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