Re: table_attach_columns

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 26 Jun 2009 14:32:33 -0600 (MDT)

Mateus,

You're right, it says it will name them for you, and it doesn't.

This is a bug. I will make sure Dennis Shea knows about this so
he can fix it. Meanwhile, as a work-around, can you name the
dimensions yourself?

--Mary

On Fri, 26 Jun 2009, Mateus Teixeira wrote:

> Hi Mary,
>
> The documentation for table_attach_columns function says in its description:
> "If not present, the function will provide temporary named dimensions."
>
> Do I have interpreted this in a wrong way or it says that the function will
> work even with a variable without named dimensions?
>
> Thanks
>
> Mateus
>
>
> 2009/6/26 Mary Haley <haley_at_ucar.edu>
>
>>
>> i Mateus,
>>
>> I had fixed "table_attach_rows" and not "table_attach_columns".
>>
>> But if you read the documentation:
>>
>>
>> http://www.ncl.ucar.edu/Document/Functions/Contributed/table_attach_columns.shtml
>>
>> it states explicitly that the dimensions must be named for this
>> function to work.
>>
>> Try this in your code:
>>
>> . . .
>> x!0 = "x"
>> y!0 = "x"
>> x!1 = "y"
>> y!1 = "y"
>> z = table_attach_columns( x, y, 0 )
>>
>> --Mary
>>
>>
>>
>> On Fri, 26 Jun 2009, Mateus Teixeira wrote:
>>
>> Hi Mary,
>>>
>>> Sorry for take so long to answer.
>>>
>>> I have tested the script and it continues not working.
>>>
>>> Here is the script I used:
>>>
>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>> load "./table_attach_columns.ncl"
>>>
>>> begin
>>> x = new((/3,2/),float)
>>> y = new((/3,5/),float)
>>>
>>> x = 1.
>>> y = 2.
>>>
>>> z = table_attach_columns( x, y, 0 )
>>>
>>> printVarSummary( z )
>>> end
>>>
>>> And here are the error messages:
>>>
>>> Copyright (C) 1995-2009 - All Rights Reserved
>>> University Corporation for Atmospheric Research
>>> NCAR Command Language Version 5.1.0
>>> The use of this software is governed by a License Agreement.
>>> See http://www.ncl.ucar.edu/ for more details.
>>> (0) table_attach_columns: dimensions must be named
>>> (0) dimNames_t1=missing
>>> (1) dimNames_t1=missing
>>> (0) dimNames_t2=missing
>>> (1) dimNames_t2=missing
>>> fatal:(missing) is not a dimension name in variable (t1), could not
>>> determine dimension number
>>> fatal:Execute: Error occurred at or near line 9051 in file
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>>>
>>> fatal:Execute: Error occurred at or near line 12 in file teste.ncl
>>>
>>>
>>> The 12th line showed above is the line that uses table_attach_columns
>>> function in the script.
>>>
>>> Thanks for the help.
>>>
>>> Best regards,
>>>
>>> Mateus
>>>
>>> 2009/6/19 Mary Haley <haley_at_ucar.edu>
>>>
>>> Mateus,
>>>>
>>>> It looks like there's a bug in table_attach_columns, where it
>>>> tries to use the dimension name, even if it doesn't exist.
>>>>
>>>> Please see the attached new version of this function and let me know
>>>> if it works. You can load it after contributed.ncl with:
>>>> ...
>>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>>> load "./table_attach_columns.ncl"
>>>>
>>>> It's untested, so please let me know if it works, and I'll make
>>>> the change on our end.
>>>>
>>>> --Mary
>>>>
>>>>
>>>>
>>>> On Fri, 19 Jun 2009, Mateus Teixeira wrote:
>>>>
>>>> Dear NCL developers,
>>>>
>>>>>
>>>>> In documentation for table_attach_columns function, it is said that when
>>>>> there aren't named dimensions in the variables, it will create temporary
>>>>> names for the dimensions. However, I got an error - saying that
>>>>> 'missing'
>>>>> is
>>>>> not a dimension name - trying to attach two 2-d arrays without named
>>>>> dimensions.
>>>>>
>>>>> It only works when I assigned names to their dimensions.
>>>>>
>>>>> I read contributed.ncl and saw that there isn't statements giving
>>>>> temporary
>>>>> name to dimensions. I think the documentation should be corrected.
>>>>>
>>>>> My NCL version is 5.1.0, so if it works in 5.1.1, please, sorry for
>>>>> that.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> --
>>>>> Mateus da Silva Teixeira
>>>>>
>>>>> Registered Linux User #466740
>>>>>
>>>>>
>>>>>
>>>
>>> --
>>> Mateus da Silva Teixeira
>>>
>>> Registered Linux User #466740
>>>
>>>
>
>
> --
> 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
Received on Fri Jun 26 2009 - 14:32:33 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 29 2009 - 10:19:05 MDT