Yes .
Note: On your data below, there are numerical issues.
On 02/09/2010 11:36 AM, guangshan chen wrote:
> 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
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Feb 9 11:41:37 2010
This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 09:50:35 MST