Re: Is this a bug in the esacr function

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 09 2010 - 11:00:07 MST

There is a numerical issue. Note the range
of the data and other statistics.

(0) avg(data)=0.869405
(0) stddev(data)=6.64027e-08
(0) variance(data)=4.40932e-15
(0) min(data)=0.869404 max(data)=0.869405 range=1.2e-06

This is even if you read the data as "double"

===

You can always do

    ar = where(ar.gt. 1.0, 1.0, ar)
    ar = where(ar.lt.-1.0,-1.0, ar)

guangshan chen wrote:
> Dear NCL developers,
>
> When I use the esacr function to calculate the autocorrelation, I find the the autocorrelation coefficient is great than 1.
> Is this a bug in the esacr function?
>
> I attach my ncl script and tested data.
>
> Thanks.
>
> guangshan
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Tue Feb 9 11:00:12 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 09:50:35 MST