Re: Is this a bug in the esacr function

From: guangshan chen <gchen9_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 09 2010 - 11:36:37 MST

Hi Dennis,

Thanks.

Could I ask one more question? I try to make sure I understand correctly.

If I use "acr = esacr(x, 2)", I can calculate autocorrelation at lags of 0, 1, 2.
The autocorrelation coefficient at lags of 0 should be 1.
Am I correct?

Guangshan

On Feb 9, 2010, at 12:00 PM, Dennis Shea wrote:

> 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:36:49 2010

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