Re: unknown array size

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 08 2013 - 16:35:09 MST


That's a perfectly acceptable approach.

Other approaches would include using the array_append_record() function, or the relatively new 'list' variable type; as is often the case, which method you use will probably be a balance between speed and memory size.

Without seeing your script it's impossible to know the best option


From: Micah Sklut <<>>
Date: Saturday, 9 March 2013 10:25 AM
To: Will Hobbs <<>>
Cc: NCL_Talk <<>>
Subject: Re: unknown array size

Yes Will:

"How do I declare an array of unknown size:"
predifine/declare, whichever term you want to use. Is this possible?
My way around this thus far was just defining the array with size larger then possible with my data.


On Fri, Mar 8, 2013 at 6:20 PM, Will Hobbs <<>> wrote:

I'm not entirely sure what you mean by 'an array of unknown size'. In the error message you gave, the array 'px' has not been defined which causes the error. Do you mean to predefine an array that you don't know the size of?


From: Micah Sklut <<>>
Date: Saturday, 9 March 2013 9:39 AM
To: NCL_Talk <<>>
Subject: unknown array size

My apologies for this novice question, however I couldnt find the answer in the docs.
How do I declare an array of unknown size:

px(np)= x(j)

fatal:Undefined identifier: (px) is undefined, can't continue
fatal:Execute: Error occurred at or near line 50 in file graph_gfs.ncl

The size of array, px, is unknown.

Thank you,

Micah Sklut
Micah Sklut

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri Mar 8 14:35:21 2013

This archive was generated by hypermail 2.1.8 : Wed Mar 13 2013 - 14:19:38 MDT