[ncl-talk] Computing coefficient of determination

Dennis Shea shea at ucar.edu
Thu Mar 5 10:45:30 MST 2015


The question is not clear to me.

Click 'Functions'; search for 'correlation'

http://www.ncl.ucar.edu/Document/Functions/Built-in/escorc_n.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/pattern_cor.shtml

===

x(ntim,nlat,mlon), y(ntim,nlat,mlon)

r = *escorc_n*(x,y,0,0)   ; r(nlat,mlon)  ; r2 = r^2

===
ra = *pattern_cor*(x, y, 1.0, 0)    ; no weighting, centered,
ra(ntim);  r2 = ra^2

clat = *cos* <http://www.ncl.ucar.edu/Document/Functions/Built-in/cos.shtml>(0.01745329*lat)
       ; cos(lat) weight
re = *pattern_cor*(x, y,clat, 0)    ; cos(lat) weighting, centered,
re(ntim); r2 = re^2

===


On Thu, Mar 5, 2015 at 5:16 AM, Darren Slevin <slevindn at tcd.ie> wrote:

> Hi,
> I would like to compute the coefficient of determination (r squared)
> between 2
> gridded datasets of the form (time,lat,lon). Is there to do this using
> NCL? Can I use the function regcoef? Thanks.
> regards,
> Darren
> _______________________________________________
> 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/20150305/1b955039/attachment.html 


More information about the ncl-talk mailing list