<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:&nbsp;</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)] &lt;</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>&gt;<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;">.&nbsp;</span><span style="background-color: rgb(255, 255, 255);"><font face="Times"><span style="font-size: 14px; line-height: 16px;">I do&nbsp;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>&nbsp; &nbsp;f &nbsp;= addfile("/Users/spark/vertical/00_DATA/13_CAL_L3_NnD_Combined/all/CALIPSO_L3_2007-2013_monthly.nc/","r") &nbsp; &nbsp; &nbsp; ;extinction all</div><div>&nbsp; &nbsp;ext = f-&gt;data3avg</div><div>&nbsp; &nbsp;ext@_FillValue = getFillValue(ext) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; assign _FillValue</div><div>&nbsp; &nbsp;ext!0 = "time"</div><div>&nbsp; &nbsp;time = ispan(0,83,1)</div><div>&nbsp; &nbsp;ext&amp;time = time</div><div><br></div><div>&nbsp; &nbsp;EXT = ext(lat|:,lon|:,time|:)</div><div><br></div><div>&nbsp; &nbsp;f1 &nbsp;= addfile("/Users/spark/vertical/00_DATA/11_MERRA_Monthly2007-2013_CMF/reCMF07_13forCALIPSO_all.nc/","r") &nbsp; &nbsp; &nbsp; &nbsp;;mass flux all</div><div>&nbsp; &nbsp;cmf = f1-&gt;CMF3co</div><div>&nbsp; &nbsp;cmf@_FillValue = getFillValue(cmf) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; assign _FillValue</div><div>; &nbsp; cmf!2 = "time"</div><div>; &nbsp; time = ispan(0,83,1)</div><div>; &nbsp; cmf&amp;time = time</div><div><br></div><div>&nbsp; printVarSummary(cmf)</div><div>&nbsp; printVarSummary(EXT)</div><div>;print(cmf(50:55,40:45,:))</div><div>;print(EXT(50:55,40:45,:))</div><div><br></div><div>&nbsp; massvsext = esccr(cmf,EXT,0)</div><div>&nbsp; massvsext@_FillValue = 1e+15</div><div>&nbsp; massvsext1 = dim_avg_Wrap(massvsext)</div><div>printVarSummary(massvsext1)</div><div><br></div><div>&nbsp; Nr = dimsizes(cmf&amp;time)</div><div>printVarSummary(Nr)</div><div><br></div><div>&nbsp; prob = rtest(massvsext1,Nr,0)</div><div>printVarSummary(prob)</div><div>&nbsp; prob1 = mask(prob,prob.eq.0,False)</div><div>&nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LATITUDE: [-85..85]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LONGITUDE: [-180..180]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [ &nbsp; 0.. &nbsp; 0]</div><div>Number Of Attributes: 9</div><div>&nbsp; _FillValue :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div>&nbsp; missing_value :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div>&nbsp; time_statistic :<span class="Apple-tab-span" style="white-space: pre;">        </span>instantaneous</div><div>&nbsp; grid_type :<span class="Apple-tab-span" style="white-space: pre;">        </span>linear</div><div>&nbsp; grid_name :<span class="Apple-tab-span" style="white-space: pre;">        </span>grid-1</div><div>&nbsp; units :</div><div>&nbsp; long_name :<span class="Apple-tab-span" style="white-space: pre;">        </span>Upward moist convective mass flux</div><div>&nbsp; comments :<span class="Apple-tab-span" style="white-space: pre;">        </span>Unknown1 variable comment</div><div>&nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [-85..85]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [-180..180]</div><div>Number Of Attributes: 2</div><div>&nbsp; average_op_ncl :<span class="Apple-tab-span" style="white-space: pre;">        </span>dim_avg over dimension(s): alt</div><div>&nbsp; _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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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>&nbsp; _FillValue :<span class="Apple-tab-span" style="white-space: pre;">        </span>1e+15</div><div>&nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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>