[ncl-talk] Possible bug (?) with lists in 6.2.0

Wei Huang huangwei at ucar.edu
Fri Sep 26 15:02:52 MDT 2014


I think we have fixed this problem back in May, and it should be in the new
release.

Here is a test I just did:

cisl-huelva:/Users/huangwei/test/ncltest/ncl_1963 950 > cat list.ncl
test_data = ispan(0,10,1)
test_list = NewList("fifo")
ListPush(test_list, (/test_data/))
print(test_list[0])

cisl-huelva:/Users/huangwei/test/ncltest/ncl_1963 951 > ncl list.ncl
 Copyright (C) 1995-2014 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.2.1
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
(0)     0
(1)     1
(2)     2
(3)     3
(4)     4
(5)     5
(6)     6
(7)     7
(8)     8
(9)     9
(10)    10
cisl-huelva:/Users/huangwei/test/ncltest/ncl_1963 952 > ncl -V
6.2.1


Regards,

Wei

================================================
1850 Table Mesa Dr.
Boulder, CO 80307
Phone: 303-497-8924

On Fri, Sep 26, 2014 at 1:08 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:

> I'll further this request, if possible. Whenever I foray into using lists,
> often in conjunction with loops, the variables are often reassigned or
> otherwise change/lose their values. While Brian's initial code appears to
> the desired functionality, it does not seem to work with the newer releases
> and this has deterred me from utilizing any list features in my code.
> Although my memory is fuzzy with a few years of rust, I think the original
> functionality mimic's that of Java's lists, which would be nice to have.
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2 at wisc.edu
>
> On Fri, Sep 26, 2014 at 1:54 PM, Carl Schreck <cjschrec at ncsu.edu> wrote:
>
>> This bug appears to persist in 6.2.1. Has there been a fix that didn't
>> make it into the release?
>>
>> I'm only just learning how to use lists, but I am also looking for a way
>> for the variable in the list to survive after the original variable has
>> been deleted or re-assigned.
>>
>>     Thanks!
>>     Carl
>>
>> On Fri, May 9, 2014 at 10:16 AM, Wei Huang <huangwei at ucar.edu> wrote:
>>
>>> Brian,
>>>
>>> I think this is a bug.
>>> I have created JIRA-1963 to track this issue.
>>> We will have a fix soon.
>>> If you need a new binary/source-code for the fix,
>>> please let us know, and we'll inform you when we get a fix.
>>>
>>> Thanks,
>>>
>>> Wei
>>>
>>> On May 9, 2014, at 1:33 AM, Brian Vanderwende <simbjv at gmail.com> wrote:
>>>
>>> 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
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> --
>>
>> <http://www.cicsnc.org/>
>> <http://www.researcherid.com/rid/B-8711-2011>
>> * Cyclone <http://www.cyclonecenter.org/>*Center.org
>> <http://www.cyclonecenter.org/>  *Carl J. Schreck III, PhD*
>> *Research Associate*
>> Cooperative Institute for Climate and Satellites NC
>> <http://www.cicsnc.org/>
>> North Carolina State University <http://ncsu.edu/>
>> NOAA's National Climatic Data Center <http://ncdc.noaa.gov/>
>> 151 Patton Ave, Asheville, NC 28801
>> e: cjschrec at ncsu.edu
>> o: +1 828 257 3140
>> Publications
>> <http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
>> monitor.cicsnc.org/mjo
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140926/1ec96419/attachment.html 


More information about the ncl-talk mailing list