[ncl-talk] seasonal cross corelation

Dennis Shea shea at ucar.edu
Sun Oct 12 20:35:08 MDT 2014


[1] Consider x(ntim), y(ntim) where ntim is the total number of days across
all years .
    eg: 10 years would yield 10*365 values (few extra for leap years). If
your data are
    not in this form ... put them in this form.

[2] Read about Fischer z-transform:
http://en.wikipedia.org/wiki/Fisher_transformation

[3] rfz  = 0.0
     nfz = 0
     nDay = 92                                    ; season length
     do ns=0,nSea-1                           ; season or year
          iStrt   = iSea(ns)                      ; index values to select
start of desired seasons
          iLast  = iStrt+nDay-1
          r        = escorc(x(iStrt:iLast),y(iStrt:iLast),...)   or
esccr(...)

          nfz    = nfz +1
          rfz     = rfz  + 0.5*log((1+r)/(1-r))     ; Fischer z-transform
  end do

  rfz     = rfz/nfz                                           ; mean zf;
test with this
  rSea  = (exp(2*rfz)-1)/(exp(2*rfz)+1)       ; return to original 'space'


On Sat, Oct 11, 2014 at 1:44 AM, Erika Folova <e.folova at gmail.com> wrote:

> Hi Maria,
>
> The second option, if i do that carefully for instance lag -1, by removing
> one day per each season each year, then combine them into one series in
> such a way avoiding the issue you mentioned. The problem that im still
> worried is about the transision of year, as it will treat your series as
> continous series, but actually it is discret, DJF-DJF where february meets
> december next year, what do you think? i think this issue also remains for
> lag 0.
>
>
>
> On Saturday, October 11, 2014, Maria Gehne - NOAA Affiliate <
> maria.gehne at noaa.gov> wrote:
>
>> Hi Erika,
>>
>> I think it depends. Are you interested in cross-correlations at lag zero
>> only, or do you want non-zero lags as well?
>>
>> In the first case it doesn't make any difference what you do. Both
>> approaches should give you the same answer.
>>
>> In the second case you may be better off computing the cross-correlation
>> for each season and each year and then averaging over all years. Otherwise
>> (if you put all DJFs into one single time series) you may end up
>> correlating dates from one year with the next year (at non-zero lags),
>> which you don't want.
>>
>> I hope this helps,
>> Maria
>>
>> On Mon, Oct 6, 2014 at 3:52 PM, Erika Folova <e.folova at gmail.com> wrote:
>>
>>> Hallo evryone,
>>>
>>> I have daily data multiplyr years and I would like to perform the cross
>>> correlation of daily data in specific season lets say DJF.
>>> What do you suggest, do i have to calculate the cross correlation of DJF
>>> each year then averaging them by number of N seasons? or
>>> I just need to combine the time series DJF from different years to be
>>> one time series and perform the cross correlation?
>>>
>>> Your insight would be really helpful.
>>> Cheers
>>> _______________________________________________
>>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141012/a81a1673/attachment.html 


More information about the ncl-talk mailing list