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

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 11 2014 - 09:58:51 MDT

Hi Robert,

That certainly is odd and not expected behavior. I don't have vers. 6.1.2 handy at the moment, but 6.0.0 definitely behaved more as one would expect. We'll look into this…

Thanks,
Rick

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 Fri Apr 11 09:59:00 2014

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