Re: user defined data types

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 19 Apr 2007 14:08:53 -0600 (MDT)

On Tue, 17 Apr 2007, Hamish Struthers wrote:

> Hi
>
> Is there a way to create user defined data types (data structures) in
> NCL?
>
> Cheers
> Hamish

Hi Hamish,

It appears that nobody has responded to this, so I'll take a stab.
There is no way to specifically create user-defined data types. As
for creating "structures", I do this by using NCL attributes (via the
'@' sign) to create metadata.

For example, if you have a data array called "t", then a structure
might look something like this:

    t_at_units = "C"
    t_at_long_name = "Potential Temperature"
    t@_FillValue = -9999
    t_at_z_t = 500.622
    t_at_time = 365031

Note that you can also have arrays:

    t_at_time = (/365031,365032,365033/)

or
    t_at_time = (/(/365031,365032/),(/365033,365034/)/)

When you have array attributes, however, you can only subset them
if they are one-dimensional.

--Mary
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 19 2007 - 14:08:53 MDT

This archive was generated by hypermail 2.2.0 : Sat Apr 21 2007 - 12:15:57 MDT