Correlations
In addition to the functions demonstrated on this page, there are
two more that might be of interest:
esacr computes an auto correlation and
escorc computes an cross correlation at zero lag
corel_1.ncl: Calculates a cross
correlation.
esccr: Calculates the cross correlation between two variables.
dimsizes: Calculates the size of the dimensions of a variable.
corel_2.ncl: The intrinsic NCL
correlation function
esccr only calculates the positive side of a correlation. This
script demonstrates how a pos and neg lag can be created.
ispan calculates a vector between arg1 and arg2 at an interval of arg3.
corel_3.ncl: Demonstrates using
the same functions to do a 2D correlation in time.The data must be reordered to put time as the right-most dimension.
This example computes the cross-correlation at lags 0,1 and 2. If the cross-correlation at 0-lag only were desired, then it would be more efficient to use escorc.