<div dir="ltr">Did you look at your output? NCL already does what you suggest.<br>N=10<br>x = random_uniform(-1,1,(/2,N/))<br>y = random_uniform( 0,N,(/2,N/)) <br>r = escorc(x,y)<br>print(r) <br><br>y(1,:) = 5.0 ; all constant<br>R = escorc(x,y)<br><br>You get the *warning*<br>warning:escorc: Non-fatal conditions encountered in series or xstd equals zero.<br>Possibly, all values of a series are constant.<br>warning:escorc: Most likely, one or more series consisted of all constant values<br><br>ncl 8> print(R)<br>=====================<br>Variable: r<br>Type: float<br>Total Size: 8 bytes<br> 2 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [2]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : 9.96921e+36<br>(0) -0.1098938<br>(1) -0.241365<br><br><br>Variable: R<br>Type: float<br>Total Size: 8 bytes<br> 2 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [2]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : 9.96921e+36 <========<br>(0) -0.1098938<br>(1) 9.96921e+36 <======<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 1, 2016 at 8:18 AM, xianglin72 <span dir="ltr"><<a href="mailto:xianglin72@icloud.com" target="_blank">xianglin72@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font:14px/1.5 'Lucida Grande','\005fae\008f6f\0096c5\009ed1';color:#333"><p style="font:14px/1.5 'Lucida Grande';margin:0"></p><p style="line-height:1.5;margin:0px">Hi, all</p><p style="line-height:1.5;margin:0px"> </p><p style="line-height:1.5;margin:0px"> I'am dealing with the correlation between a index series and HadISST ice concentration gridded data. And I </p><p style="line-height:1.5;margin:0px">got no results when using escorc function, only with the following warning message :</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">" warning:escorc: Non-fatal conditions encountered in series or xstd equals zero.</p><p style="line-height:1.5;margin:0px">Possibly, all values of a series are constant. "</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">I suggest that it may be because the grids in land are all _FillValue and the grids in the warm ocean are all constant </p><p style="line-height:1.5;margin:0px">zero values. How could I get the escorc results between the index series and the corresponding grids with variable values?</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"> 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!</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">The attached codes :</p><p style="line-height:1.5;margin:0px"><span style="line-height:1.5">……. ********************************</span></p><p style="line-height:1.5;margin:0px"></p><p style="line-height:1.5;margin:0px"></p><p style="line-height:1.5;margin:0px">fi = addfile( data_path + data_filename ,"r")</p><p style="line-height:1.5;margin:0px">printVarSummary(fi)</p><p style="line-height:1.5;margin:0px">time = fi->time</p><p style="line-height:1.5;margin:0px">yyyymm = ut_calendar(time,-1)</p><p style="line-height:1.5;margin:0px">nt1 = ind(yyyymm.eq.ntStrt)</p><p style="line-height:1.5;margin:0px">nt2 = ind(yyyymm.eq.ntLast)</p><p style="line-height:1.5;margin:0px">;lat = fi->latitude</p><p style="line-height:1.5;margin:0px">;lon = fi->longitude</p><p style="line-height:1.5;margin:0px">x = fi->sic(nt1:nt2,{-45.:-90.},:)</p><p></p><p style="line-height:1.5;margin:0px">x = where(x.eq.0, x@_FillValue, x)</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><span style="line-height:1.5">; ****************** read the AAO index series ********************************************</span></p><p style="line-height:1.5;margin:0px">data = asciiread("/Users/Data/indices/SAM/cpc.aao_197901-201312.txt",(/34*12,3/),"float")</p><p style="line-height:1.5;margin:0px">y = data(:,2)</p><p style="line-height:1.5;margin:0px">y!0 = "time"</p><p style="line-height:1.5;margin:0px">print(y(34*12-1))</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">ccr = escorc( y,x(latitude|:,longitude|:,time|:) )</p><p style="line-height:1.5;margin:0px">sig = rtest(ccr, 34*12, 0) </p><p style="line-height:1.5;margin:0px">print(" ok ")</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">*********************************</p><p></p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">Thank!</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px">Lin</p><p style="line-height:1.5;margin:0px"><br></p><p style="line-height:1.5;margin:0px"><br></p><p></p></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>