<div dir="ltr"><div><br></div><div><pre style="color:rgb(0,0,0)"><i>Dear NCL users, I just have a little knowledge on NCL. So, could anyone help me?</i></pre><pre style="color:rgb(0,0,0)"><i>I have two data with 372 timestep, one has 3D and the other 4D, someone please help me with this error?</i></pre><pre style="color:rgb(0,0,0)"><i style="font-family:arial,sans-serif">"</i><font color="#000000" style="font-family:arial,sans-serif"><i>fatal:regCoef: The rightmost dimension of x must be equal to the rightmost dimension of y"</i></font><br></pre><pre style="color:rgb(0,0,0)"><font color="#000000" style="font-family:arial,sans-serif"><i>The summary is bellow</i></font></pre><font color="#000000" face="monospace"><i><div style="white-space:pre"><font color="#000000" face="monospace"><span style="white-space:pre"><i>This is the scrip line error </i></span></font></div><div style="white-space:pre"><font color="#000000" face="monospace"><span style="white-space:pre"><i><br></i></span></font></div><div><font color="#000000" face="monospace" style="white-space:pre"><span style="white-space:pre"><i>"</i></span></font><span style="white-space:pre">; Regress</span></div><span style="white-space:pre">; =================================================================
eof_regres = eof ; create an array w meta data
do ne=0,neof-1
eof_regres(ne,:,:) = (/ regCoef(eof_ts(ne,:), x2(TIME1|:,DEPTH1_1|:,LAT|:,LON|:))/)
end do
printVarSummary(eof_regres)
printMinMax(eof_regres, True)</span></i></font></div><div><font color="#000000" face="monospace"><span style="white-space:pre"><i>"</i></span></font></div><div><font color="#000000" face="monospace"><span style="white-space:pre"><i><br></i></span></font></div><div><font color="#000000" face="monospace"><i><span style="white-space:pre">If i use regCoef_n, shows this error "fatal:syntax error: function regCoef_n expects 4 arguments, got 2"<br></span></i><i><span style="white-space:pre"> </span></i></font></div>Summary<div><div>Copyright (C) 1995-2017 - All Rights Reserved</div><div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.4.0</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</div><div><br></div><div>Variable: x</div><div>Type: double</div><div>Total Size: 29760000 bytes</div><div> 3720000 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[time | 372] x [lat | 100] x [lon | 100]</div><div>Coordinates: </div><div> time: [ 0..16260480]</div><div> lat: [-89.09999999999999..89.10000000000002]</div><div> lon: [ 0..356.4]</div><div>Number Of Attributes: 2</div><div> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-999000000</div><div> missing_value :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-999000000</div><div><br></div><div>Variable: x2</div><div>Type: double</div><div>Total Size: 29760000 bytes</div><div> 3720000 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[TIME1 | 372] x [DEPTH1_1 | 1] x [LAT | 100] x [LON | 100]</div><div>Coordinates: </div><div> TIME1: [1928.06849316134..1958.561643829649]</div><div> DEPTH1_1: [17.5..17.5]</div><div> LAT: [-89.1..89.1]</div><div> LON: [ 0..356.4]</div><div>Number Of Attributes: 4</div><div> long_name :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>DIC[L=1:372]</div><div> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-9.999999999999999e+33</div><div> missing_value :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-9.999999999999999e+33</div><div> history :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>>From dic_uvic</div><div><br></div><div>Variable: eof_ts</div><div>Type: double</div><div>Total Size: 2976 bytes</div><div> 372 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[evn | 1] x [time | 372]</div><div>Coordinates: </div><div> evn: [1..1]</div><div> time: [ 0..16260480]</div><div>Number Of Attributes: 3</div><div> ts_mean :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>1.196080271862835e-13</div><div> matrix :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>covariance</div><div> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-999000000</div><div><br></div><div>fatal:regCoef: The rightmost dimension of x must be equal to the rightmost dimension of y</div><div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 128 in file eof_cfsr.ncl</div><div><br></div><div>Variable: eof_regres</div><div>Type: double</div><div>Total Size: 80000 bytes</div><div> 10000 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[evn | 1] x [lat | 100] x [lon | 100]</div><div>Coordinates: </div><div> evn: [1..1]</div><div> lat: [-89.09999999999999..89.10000000000002]</div><div> lon: [ 0..356.4]</div><div>Number Of Attributes: 6</div><div> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-999000000</div><div> method :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>transpose</div><div> matrix :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>covariance</div><div> pcvar :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>13.29658</div><div> eval :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>634047.31020702</div><div> eval_transpose :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>24386.43500796231</div><div>(0)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span> </div><div>(0)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>min=-0.04332826535433597 max=0.02833814180143831</div></div><div><br></div><div><br></div><div><b><font color="#ff00ff">Melanie O'Hanoly</font></b></div><div><b><font color="#ff00ff">Oceangrapher</font></b></div><div><b><font color="#ff00ff">PhD canditate at <span style="line-height:18.2px">Alfred Wegener Institute Helmholtz Centre for Polar and Marine Research</span></font></b></div><div><br></div></div>