[gradsusr] scorr function

Stephen McMillan smcmillan at planalytics.com
Sat Apr 24 12:03:04 EDT 2010


Dear Krlos,
If you haven't already, first review the correct syntax and example in the
GrADS Documentation Index:  http://sidata.org/grads/gadoc/gradfuncscorr.html
Other functions can be found in the same Documentation Index.

The basic idea is that you have two previously defined variables, whose
horizontal dimensions both include the geographical area you wish to
spatially correlate.  For example, let's say you have two variables var1 and
var2 and you wanted to correlate them over a 10 x 10 degree domain over
somewhere at a fixed time:
'd scorr(var1,var2,lon=-90,lon=-80,lat=30,lat=40)'
should give you something like this:
result value = -0.2356
You could capture above value in script by including this after display
command:
corr=subwrd(result,4)
You can also create a time loop of correlations, 50 timesteps for example:
'set t 1 50'
'd tloop(scorr(var1,var2,....)'
Create a correlation time series of above loop:
'define corrts=tloop(scorr(var1,var2,...)'
Display the time series:
'set x 1';'set y 1'
'd corrts'

The tcorr function (see http://sidata.org/grads/gadoc/gradfunctcorr.html)
may be more appropriate for correlating your data, especially if they are
time series at a fixed point.

A search of the GrADS user archive (http://gradsusr.org/pipermail/gradsusr/)
may yield more appropriate answers.

Best wishes--
Stephen McMillan

On Sat, Apr 24, 2010 at 10:02 AM, Carlos Batista <krlosbatist at gmail.com>wrote:

> Dear all,
> Kindly tell me how to use the "scorr " function of grads.
> I don't how use its this function for to do correlation between
> precipitation and flow rivers. Someone know some gs for to do correlations
> between this data, please, useding the scorr function and other functions ?
> Any suggestions
> Krlos
> e-mail; krlosbatist at gmail.com
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>

***************************************************
The information contained in this e-mail message 
is intended only for the use of the recipient(s) 
named above and may contain information that is 
privileged, confidential, and/or proprietary. 
If you are not the intended recipient, you may not
review, copy or distribute this message. If you have
received this communication in error, please notify 
the sender immediately by e-mail, and delete the original message.
***************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100424/cadeffd4/attachment-0003.html 


More information about the gradsusr mailing list