Array of objects

From: <Daniel.Leuenberger_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 27 2011 - 09:39:09 MST

Dear NCL Community,

I would like to pass many objects to a procedure or function, but I know
the number only at run time. How can I pass multiple objects in an array
to the procedure? Consider the following small ncl script:

;For example, I have a procedure
procedure proc(x,y)

; here, I define an object a with an attribute attr
; likewise the object b

;Now I can pass those variables to the procedure

and I get, what I want. No problem. Now, if I had many objects
like a and b and I would like to store them in an array and pass them
to a procedure which takes an array of objects as argument.
Inside the procedure, I would like to access the elements of the arrays
including their attributes, dimensions and so on. If I create an array
of a and b such as c = (/a,b/), I loose all attributes of a and b. The
May also be graphics objects.

I have found a topic in the mailing list archive, in which you announce
the type "list". Is this already implemented? When is it foreseen? What
would you suggest in the meanwhile?

A "list" type would be an extremely helpful feature of the NCL language.

Many thanks and best regards
Daniel Leuenberger


Daniel Leuenberger
Numerical Models

Federal Departement of Home Affairs FDHA Federal Office of Meteorology
and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 97 10
Fax +41 44 256 92 78 - First-hand information
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu Jan 27 09:39:24 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST