[ncl-talk] How to calculate the escorc when the input array contain some series with all constant values?
xianglin72
xianglin72 at icloud.com
Tue Mar 1 08:18:14 MST 2016
Hi, all
I'am dealing with the correlation between a index series and HadISST ice concentration gridded data. And I
got no results when using escorc function, only with the following warning message :
" warning:escorc: Non-fatal conditions encountered in series or xstd equals zero.
Possibly, all values of a series are constant. "
I suggest that it may be because the grids in land are all _FillValue and the grids in the warm ocean are all constant
zero values. How could I get the escorc results between the index series and the corresponding grids with variable values?
Besides, I also suggest that the escorc could add some function, to make the corresponding correaltion values to be _FillValue when the input grids contain all constant values. Thank!
The attached codes :
……. ********************************
fi = addfile( data_path + data_filename ,"r")
printVarSummary(fi)
time = fi-time
yyyymm = ut_calendar(time,-1)
nt1 = ind(yyyymm.eq.ntStrt)
nt2 = ind(yyyymm.eq.ntLast)
;lat = fi-latitude
;lon = fi-longitude
x = fi-sic(nt1:nt2,{-45.:-90.},:)
x = where(x.eq.0, x at _FillValue, x)
; ****************** read the AAO index series ********************************************
data = asciiread("/Users/Data/indices/SAM/cpc.aao_197901-201312.txt",(/34*12,3/),"float")
y = data(:,2)
y!0 = "time"
print(y(34*12-1))
ccr = escorc( y,x(latitude|:,longitude|:,time|:) )
sig = rtest(ccr, 34*12, 0)
print(" ok ")
*********************************
Thank!
Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160301/f904d861/attachment.html
More information about the ncl-talk
mailing list