[ncl-talk] error in probability calculation
Dhirendra Kumar
dhirendra.cub at gmail.com
Tue Mar 7 04:15:46 MST 2017
Dear folks
I am trying to calculate significance of the regression coefficient for a
gridded dataset.
I have written the followin code:
f=addfile("yearmean_monmean_selmon_JJAS_mergetime_1975_2015.nc","r")
rain=f->rf(lat|:,lon|:,time|:)
; regression coefficient
time = rain&time
rc=regCoef(time,rain)
copy_VarCoords(rain(:,:,0), rc)
df1= onedtond(rc at nptxy , dimsizes(rc)) - 2
tval1 = onedtond(rc at tval , dimsizes(rc))
printVarSummary(tval1)
b=0.5
prob = betainc(df1/(df1+tval1^2),df1/2.0,0.5) ; prob(nlat,nlon)
I got the following error:
fatal:betainc: The three input arrays must have the same number of
dimensions
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 19 in file
regress.ncl
Please suggest me any missing step or the cause of the error.
Regards
Dhirendra
--
========================================
Dhirendra Kumar
PhD Student
School of Environmental Sciences, JNU
New Delhi (India)
Contact: +91 9910778043
Alternate email: dhirendra.cub at outlook.com
=========================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170307/a5be953b/attachment.html
More information about the ncl-talk
mailing list