Re: Possible bug (?) with lists in 6.2.0

From: Karin Meier-Fleischer <meier-fleischer_at_nyahnyahspammersnyahnyah>
Date: Fri May 09 2014 - 02:10:05 MDT

Hi Brian,

you don't have to use (/test_data/) in the ListPush call just test_data:

test_data = ispan(0,10,1)
test_list = NewList("fifo")
ListPush(test_list, test_data)
print(test_list)

test_list has only one dimension containing the list variable test_data.
Using ListPop
with fifo list type will return the first list variable if you pushed
more list variables to
test_list.

See also: http://ncl.ucar.edu/Document/Functions/Built-in/ListPop.shtml

Hope this will help,
Karin

Am 09.05.14 09:33, schrieb Brian Vanderwende:
> Hello,
>
> I'm running into a potential bug with list variables in NCL 6.2.0 (and
> apparently 6.1.x). In 6.1.0-beta, I would often disassociate data from
> their parent variable when adding it to a list so that I could return
> lists of data of various types from functions without worrying about
> keeping around the original variable. Simple example (sans function):
>
> test_data = ispan(0,10,1)
> test_list = NewList("fifo")
> ListPush(test_list, (/test_data/))
> print(test_list[0])
>
> That code ran fine in 6.1.0-beta, but since I've upgraded to 6.2.0,
> I've been getting the following error at the print statement:
>
> fatal:["Execute.c":1939]:Internal error
> fatal:["Execute.c":8565]:Execute: Error occurred at or near line 3
>
> Perhaps this behavior is intended, as I'm not really using lists in
> the way they were conceived, but I found it to be quite a useful
> coding trick in 6.1.0-beta.
>
> System information from uname:
> Linux 2.6.32-358.11.1.2chaos.ch5.1.x86_64 #1 SMP Wed Jul 24 17:45:01
> PDT 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> Regards,
> -Brian
>
> --
> Brian Vanderwende - PhD Student
> Atmospheric and Oceanic Science, University of Colorado Boulder
> Phone: (303)492-2654
> --
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
Dipl. Geophys. Karin Meier-Fleischer
Application Support, Visualization
Deutsches Klimarechenzentrum GmbH      E-Mail:   meier-fleischer@dkrz.de
Bundesstrasse 45a                      Internet: http://www.dkrz.de/
20146 Hamburg                          Phone:    +49 (0)40 460094 126
Germany                                Fax:      +49 (0)40 460094 270
Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 9 02:10:22 2014

This archive was generated by hypermail 2.1.8 : Fri May 09 2014 - 15:23:18 MDT