Re: Attaching a column to a 2D array

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun, 03 May 2009 14:02:36 -0600

Try

http://www.ncl.ucar.edu/Document/Functions/Contributed/table_attach_columns.shtml

But use:

y2 = new((/48,1/),typeof(datasCasos1D_ut),getFillValue(datasCasos1D_ut))
y2(:,0) = datasCasos1D_ut

Good luck

Mateus Teixeira wrote:
> Dear NCL users,
>
> I'm trying to attach a 1D array to a 2D array as an additional column.
> My arrays are as follow
>
> Variable: datasCasos1D_ut
> Type: double
> Total Size: 384 bytes
> 48 values
> Number of Dimensions: 1
> Dimensions and sizes: [48]
> Coordinates:
> Number Of Attributes: 2
> units : hours since 1800-1-1 00:00:0.0
> _FillValue : -9999
>
>
> Variable: chuvaMedGrupos (subsection)
> Type: float
> Total Size: 768 bytes
> 192 values
> Number of Dimensions: 2
> Dimensions and sizes: [casos | 48] x [grupos | 4]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -999
>
> So, I want to create a new 2D array but with [48x5] dimensions. I have
> tried using
>
> (/chuvaMedGrupos(casos|:,grupos|:),datasCasos1D_ut/)
>
> but I got the following error message:
>
> fatal:_NclBuildArray: each element of a literal array must have the same
> number of dimensions
>
> I can't see a way to do it, since the table_attach_columns function
> require two 2D arrays to work.
>
> Is it possible to do what I'm trying to do?
>
> Best regards,
>
> --
> Mateus da Silva Teixeira
>
> Registered Linux User #466740
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Sun May 03 2009 - 14:02:36 MDT

This archive was generated by hypermail 2.2.0 : Wed May 06 2009 - 16:48:59 MDT