Re: NCL Wrapit + memory question

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 18 2013 - 09:48:33 MST

Hi Jon,

In a case like this, it might help if you could provide your datasets as well so we can try running the script.

However, before we go that route, we can try some other things.

First, how are you determining that the memory is growing? From looking at the script, it does look like you are doing the right thing with the "delete" command. It also looks like you are doing a good job of defining the NetCDF file before you write to it.

The issue may be more with your nested do loops and not the Fortran code.

How big are your loops? That is, how many iterations are you doing with these two loops:

  do yy = s_yy, e_yy

     do z = 0, n_lev-1

?

Also, what version of NCL are you using?

ncl -V

--Mary

On Nov 15, 2013, at 2:15 PM, jonathan meyer <tallj03@hotmail.com> wrote:

> Hi,
>
> I've been quite happy to learn how useful the wrapit functionality can be in NCL. While I've successfully gotten wrapit to work, I am seeing memory usage grow with each call to my subroutines.
>
> I've checked to make sure unused ncl variables are being deleted each time through my loop.
>
> Being rather green with the workings of fortran memory allocation, I'm wondering if there is something I'm missing in my fortran code that is allowing the arrays to remain in memory? I was under the impression that non-allocated memory in the subroutine would be removed at the 'end' command, but maybe this isn't the case for how I've coded mine.
>
> Attached is a code snippet of the NCL code for the loop the wrapit is being used, as well as the .f script containing my subroutines.
>
> As always, thanks in advance.
>
> Jon
> <Ageowinds.ncl><JDMlib.f>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 18 09:48:41 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 22 2013 - 09:36:32 MST