[gradsusr] correlation difference between GrADS and NCL
Andrew Friedman
andfried at berkeley.edu
Fri Jun 13 04:41:13 EDT 2014
This should allow you to isolate whether the issue is GrADS or the implementation.
Andrew
On Jun 13, 2014, at 1:09 AM, Andrew Friedman <andfried at berkeley.edu> wrote:
> Hi Rui,
>
> As a more simple check than another program, can you compare your GrADS results with a simple correlation coefficient calculated using the standard formula with a handful of data points?
> https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
>
> Andrew
>
> On Jun 12, 2014, at 3:27 PM, Cheng, Rui <r5cheng at ucsd.edu> wrote:
>
>> Hi all GrADS users,
>>
>> I want to get the correlation between dcape and rainrate using GrADS. Meanwhile, NCL is used to test the result.
>>
>> Assuming dcape is one time step prior to rainrate, so we can get the correlation (0.0266) using GrADS through,
>> "set t 2 77; define dcapeave2=dcapeave(t-1); set t 1; d tcorr(dcapeave2,rainrateconvm,t=2,t=77)."
>>
>> Also using NCL, we can get the correlation (-0.18815) through,
>> "ccr2=esccr(dcapeave(1:76,0,0,0),rainrateconvm(1:76,0,0,0),1)."
>>
>> I notice that the difference is small if there is no time lag between dcape and rainrate. Then we get the correlation "-0.1139" using GrADS and "-0.1101" using NCL.
>>
>> Why the difference is so big when the time lag is present between two time series?
>> Would you like to help me?
>>
>> Many thanks,
>>
>> Rui
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
More information about the gradsusr
mailing list