<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><font face="Times" style="font-size: 14px;">Dear NCL users</font><div><font face="Times" style="font-size: 14px;"><br></font></div><div><span style="font-size: 14px; font-family: Times;">I am trying to do cross-correlation and ttest between two files. Both of them are three dimensions. I used esccr to calculate cross correlation and then try to do ttest using this equation: </span><b style="font-size: 14px; font-family: Times; line-height: 16px; margin: 0px; padding: 0px;">r</b><span style="font-size: 14px; font-family: Times; background-color: rgb(255, 255, 255); line-height: 16px;">*sqrt[(</span><i style="font-size: 14px; font-family: Times; line-height: 16px; margin: 0px; padding: 0px;">n</i><span style="font-size: 14px; font-family: Times; background-color: rgb(255, 255, 255); line-height: 16px;">-2)/(1-</span><b style="font-size: 14px; font-family: Times; line-height: 16px; margin: 0px; padding: 0px;">r</b><span style="font-size: 14px; font-family: Times; background-color: rgb(255, 255, 255); line-height: 16px;">^2)] <</span><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/esccr.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/esccr.shtml</a>><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;">. But I am getting this following errors</span></div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;"><br></span></div><div>fatal:divide: Division by 0, Can't continue</div><div>fatal:Div: operator failed, can't continue</div><div>fatal:["Execute.c":7743]:Execute: Error occurred at or near line 48 in file re_CMF_EXT_correl_sig.ncl</div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;"><br></span></div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;">I tried to use where or mask function but it still shows same errors</span><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;">. </span><span style="background-color: rgb(255, 255, 255);"><font face="Times"><span style="font-size: 14px; line-height: 16px;">I do appreciate a</span></font></span><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;">ny comments and helps.</span></div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;"><br></span></div><div><font face="Times"><span style="font-size: 14px; line-height: 16px;">Thank you in advance</span></font></div><div><font face="Times"><span style="font-size: 14px; line-height: 16px;">Sun-</span></font></div><div><br></div><div><font face="Times"><span style="font-size: 14px; line-height: 16px;">=SCRIPT</span></font></div><div><font face="Times"><span style="font-size: 14px; line-height: 16px;"><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div><br></div><div>begin</div><div><br></div><div> f = addfile("/Users/spark/vertical/00_DATA/13_CAL_L3_NnD_Combined/all/CALIPSO_L3_2007-2013_monthly.nc/","r") ;extinction all</div><div> ext = f->data3avg</div><div> ext@_FillValue = getFillValue(ext) ; assign _FillValue</div><div> ext!0 = "time"</div><div> time = ispan(0,83,1)</div><div> ext&time = time</div><div><br></div><div> EXT = ext(lat|:,lon|:,time|:)</div><div><br></div><div> f1 = addfile("/Users/spark/vertical/00_DATA/11_MERRA_Monthly2007-2013_CMF/reCMF07_13forCALIPSO_all.nc/","r") ;mass flux all</div><div> cmf = f1->CMF3co</div><div> cmf@_FillValue = getFillValue(cmf) ; assign _FillValue</div><div>; cmf!2 = "time"</div><div>; time = ispan(0,83,1)</div><div>; cmf&time = time</div><div><br></div><div> printVarSummary(cmf)</div><div> printVarSummary(EXT)</div><div>;print(cmf(50:55,40:45,:))</div><div>;print(EXT(50:55,40:45,:))</div><div><br></div><div> massvsext = esccr(cmf,EXT,0)</div><div> massvsext@_FillValue = 1e+15</div><div> massvsext1 = dim_avg_Wrap(massvsext)</div><div>printVarSummary(massvsext1)</div><div><br></div><div> Nr = dimsizes(cmf&time)</div><div>printVarSummary(Nr)</div><div><br></div><div> prob = rtest(massvsext1,Nr,0)</div><div>printVarSummary(prob)</div><div> prob1 = mask(prob,prob.eq.0,False)</div><div> probt = prob1*sqrt((Nr-2)/(1-prob1^2))</div><div>printVarSummary(probt)</div><div>end</div></span></font></div><div></div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;"><br></span></div><div><span style="background-color: rgb(255, 255, 255); font-family: Times; font-size: 14px; line-height: 16px;">==============</span></div><div><span style="background-color: rgb(255, 255, 255); font-size: 14px; line-height: 16px;"><font face="Times"><div>Variable: cmf</div><div>Type: float</div><div>Total Size: 2056320 bytes</div><div> 514080 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space: pre;">        </span>[LATITUDE | 85] x [LONGITUDE | 72] x [time | 84]</div><div>Coordinates:</div><div> LATITUDE: [-85..85]</div><div> LONGITUDE: [-180..180]</div><div> time: [ 0.. 0]</div><div>Number Of Attributes: 9</div><div> _FillValue :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div> missing_value :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div> time_statistic :<span class="Apple-tab-span" style="white-space: pre;">        </span>instantaneous</div><div> grid_type :<span class="Apple-tab-span" style="white-space: pre;">        </span>linear</div><div> grid_name :<span class="Apple-tab-span" style="white-space: pre;">        </span>grid-1</div><div> units :</div><div> long_name :<span class="Apple-tab-span" style="white-space: pre;">        </span>Upward moist convective mass flux</div><div> comments :<span class="Apple-tab-span" style="white-space: pre;">        </span>Unknown1 variable comment</div><div> average_op_ncl :<span class="Apple-tab-span" style="white-space: pre;">        </span>dim_avg over dimension(s): levels</div><div>==============</div><div>Variable: EXT</div><div>Type: float</div><div>Total Size: 2056320 bytes</div><div> 514080 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space: pre;">        </span>[lat | 85] x [lon | 72] x [record | 84]</div><div>Coordinates:</div><div> lat: [-85..85]</div><div> lon: [-180..180]</div><div>Number Of Attributes: 2</div><div> average_op_ncl :<span class="Apple-tab-span" style="white-space: pre;">        </span>dim_avg over dimension(s): alt</div><div> _FillValue :<span class="Apple-tab-span" style="white-space: pre;">        </span>-9999</div><div>warning:esccr: Non-fatal conditions encountered: all missing or constant values</div><div>==============</div><div>Variable: massvsext1</div><div>Type: float</div><div>Total Size: 24480 bytes</div><div> 6120 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space: pre;">        </span>[85] x [72]</div><div>Coordinates:</div><div>Number Of Attributes: 2</div><div> _FillValue :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div> average_op_ncl :<span class="Apple-tab-span" style="white-space: pre;">        </span>dim_avg function was applied</div><div>===============</div><div>Variable: Nr</div><div>Type: integer</div><div>Total Size: 4 bytes</div><div> 1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space: pre;">        </span>[1]</div><div>Coordinates:</div><div>===========</div><div>Variable: prob</div><div>Type: float</div><div>Total Size: 24480 bytes</div></font></span><span style="background-color: rgb(255, 255, 255); font-size: 14px; line-height: 16px;"><font face="Times"><div> 6120 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space: pre;">        </span>[85] x [72]</div><div>Coordinates:</div><div>fatal:divide: Division by 0, Can't continue</div><div>fatal:Div: operator failed, can't continue</div><div>fatal:["Execute.c":7743]:Execute: Error occurred at or near line 48 in file re_CMF_EXT_correl_sig.ncl</div></font></span></div></body></html>