Re: Strange side effect of attaching a variable as attribute to another variable in 6.2.0

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Sat Apr 12 2014 - 10:08:47 MDT

Hi Robert,
I'm afraid I am to blame for this bug. It looks like this was an unnoticed side effect of my attempt to fix a smaller problem. Apparently our test suite did not catch it.
I wil be backing out this change. If you need a new binary, let us know.
 -dave

On Apr 10, 2014, at 5:53 AM, Robert Schuster <rxschuster@gmail.com> wrote:

> Dear NCL team,
>
> since the update to version 6.2.0 I have some strange errors in my scripts. I found that attaching a variable as attribute to another variable has side effects on the variable that were not there before. Here is an example:
>
> ncl 0> x = new (2, float)
> ncl 1> print(any(ismissing(x)))
> (0) True
> ncl 2> y = True
> ncl 3> y@x = x
> ncl 4> print(any(ismissing(x)))
> (0) False
> ncl 5> print(x)
>
>
> Variable: x
> Type: float
> Total Size: 8 bytes
> 2 values
> Number of Dimensions: 1
> Dimensions and sizes: [2]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> (0) 9.96921e+36
> (1) 9.96921e+36
>
>
> x contains only missing values. Checking that before attaching it to y confirms that. Checking x again for missing values after it has been attached to y shows the strange behavior. The missing values inside of x are no longer detected as missing values, but the _FillValue attribute remains unchanged but is ignored. In version 6.1.2 attaching an attribute to a variable don’t seems to have this side effect.
>
> Thanks in advance for looking into that!
> Robert
> _______________________________________________
> 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 Sat Apr 12 10:09:01 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 15 2014 - 10:45:19 MDT