Re: empty array command

From: Gus Correa <gus_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 22 2010 - 14:36:22 MDT

Hi Ioana

I think you can add a line more or less like this:

thfn=new( (/ 30, 128, 256 /), float, any_fill_value_you_want )

before the loop, to create thfn with the required dimensions.

My $0.02
Gus Correa

Ioana Colfescu wrote:
> Hi,
>
> Could someone help me with the following. I have this loop :
>
>
> i=0
> do while (i.lt.31)
> thfn=thfb(i,:,:) - thf(0,:,:)
> printVarSummary(thfn)
> i=i+1
> end do
> printVarSummary(thfn)
>
> And the result is :
>
> Variable: thfn
> Type: float
> Total Size: 131072 bytes
> 32768 values
> Number of Dimensions: 2
> Dimensions and sizes: [128] x [256]
>
>
> I want to have thfn as thfn(30,128,256) but it saves only the last
> moment of time. In order to save all the time moments I want to create
> an empty array thfn(31,128,256) and fill in the values from the
> substraction. Can someone tell me how/what's the command to create an
> empty array ?
>
>
> Ioana
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Thu Jul 22 14:36:34 2010

This archive was generated by hypermail 2.1.8 : Wed Jul 28 2010 - 10:42:06 MDT