[gradsusr] Spatial Correlation
Tom Robinson
ter at hawaii.edu
Sat Dec 26 13:15:02 EST 2015
I would write a separate script that has the scorr function.
function correlate (args)
y1=subwrd(args,1)
y2=subwrd(args,2)
x1=subwrd(args,3)
x2=subwrd(args,4)
>> 'scorr(var.1, var.2, lon=x1, lon=x2, lat=y1, lat=y2)'
Then you can call this function with the box you want. For example if your box was from 21-22N and -158.5 to -157.5 you could do
'correlate 21 22 -158.5 -157.5'
This would save you the trouble of having to enter the everything each time you want to run the correlation.
-Tom
Sent from my iPhone
> On Dec 26, 2015, at 9:39 AM, Muhammad Latif <latif.met at gmail.com> wrote:
>
> Yes Kishore, the spatial resolution is same for both the datasets. But the function (scorr) you have mentioned is valid only for one box (I have four lat. and four lon. values, which are required to draw two boxes). Please share, If you have any idea.
>
> Thanks
>
> Regards
>
>> On Sat, Dec 26, 2015 at 10:15 PM, Kishore Ragi <kishoreragi at gmail.com> wrote:
>> you need to have same resolution for both the datasets so that you can calculate the spatial correlation as below
>>
>> open two datasets as 1 and two and invoke the following command
>>
>> scorr(var.1, var.2, lon=x1, lon=x2, lat=y1, lat=y2)
>>
>> hope this helps!
>>
>> Regards,
>> Kishore
>>
>> PhD student in climate science,
>> National Institute of Technology, Rourkela,
>> India- 769008
>> Phone: +91-8908671881
>>
>> http://www.researchgate.net/profile/Kishore_Ragi
>>
>> https://in.linkedin.com/in/kishoreragi
>>
>> http://kishoreragi.webnode.com/
>>
>>> On Sat, Dec 26, 2015 at 10:18 PM, Muhammad Latif <latif.met at gmail.com> wrote:
>>> Hi Jeff, Let's suppose, I have two boxes on map 1 (Model) and similar on map 2 (Observation) of rainfall climatologies. I want to compute spatial correlation (scorr) between two maps, considering only the data within the defined boxes.
>>>
>>> Thanks
>>>
>>>> On Sat, Dec 26, 2015 at 9:40 PM, Muhammad Latif <latif.met at gmail.com> wrote:
>>>> Thanks Jeff Duda, Would you please elaborate a bit more?
>>>>
>>>> Regards
>>>>
>>>>> On Sat, Dec 26, 2015 at 9:26 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
>>>>> Create your fields such that they have empty boxes within them. Use maskout.
>>>>>
>>>>> Jeff Duda
>>>>>
>>>>>> On Sat, Dec 26, 2015 at 9:28 AM, Muhammad Latif <latif.met at gmail.com> wrote:
>>>>>> Hi all Grads users,
>>>>>>
>>>>>> As, "scorr" function calculates the spatial correlation between two variables over an X-Y domain, i.e. scorr(expr1, expr2, lon=0, lon=360, lat=-90, lat=90). Is there any way to use this scorr function when the domains are more than one (let's say, I have two boxes on a single map)?
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Latif
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> gradsusr mailing list
>>>>>> gradsusr at gradsusr.org
>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jeff Duda
>>>>> Graduate research assistant
>>>>> University of Oklahoma School of Meteorology
>>>>> Center for Analysis and Prediction of Storms
>>>>>
>>>>> _______________________________________________
>>>>> gradsusr mailing list
>>>>> gradsusr at gradsusr.org
>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151226/eda9fde0/attachment-0001.html
More information about the gradsusr
mailing list