<div dir="ltr"><div>Hi NCL user,</div><div><br></div><div>I would appreciate any help to fix this issue. Although the data dimension looks okay, this error keeps coming. <br></div><div><br></div><div>Thanks</div><div>DZ<br></div><div><br></div><div>fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side<br>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 81 in file eof-ensemble.ncl</div><div><br></div><div>fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side<br>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 120 in file eof-ensemble.ncl</div><div><br></div><div>Variable: xJA<br>Type: float<br>Total Size: 2246400 bytes<br>            561600 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 26] x [lat | 75] x [lon | 288]<br>Coordinates: <br>            time: [  31..9156]<br>            lat: [20.26178010471205..  90]<br>            lon: [   0..358.75]<br>Number Of Attributes: 1<br>  NMO :      0<br><br></div><div><u>Code: </u><br></div><div>xJA = month_to_season (Avg, "DJF")<br>printVarSummary(xJA)<br>  ;nyrs   = dimsizes(var&time)<br>  ;printVarSummary(var)<br><br>; =================================================================<br>; create weights:  sqrt(cos(lat))   [or sqrt(gw) ] for covariance<br>; =================================================================<br>  rad    = 4.0*atan(1.0)/180.0<br>  clat   = cos(rad*xJA&lat)<br>  clat   = where(clat.lt.0, 0.0, clat)  ; avoid a potential numerical issue at pole<br>  clat   = sqrt( clat )  ; avoid a potential numerical issue at pole<br><br>; =================================================================<br>; weight all observations <br>; =================================================================<br>  wvar   = xJA                                  ; copy meta data<br>  printVarSummary(wvar)<br>  wvar   = xJA*conform(xJA, clat, 1) ; <b>line 81</b><br> ; wvar@long_name = "Wgt: "+wvar@long_name<br>; =================================================================<br>; EOF<br>; Reorder (lat,lon,time) the *weighted* input data<br>; Access the area of interest via coordinate subscripting<br>; =================================================================<br>  x      = wvar(lat|:,lon|:,time|:)<br><br>  eof    = eofunc_Wrap(x, neof, optEOF)<br>  eof_ts = eofunc_ts_Wrap (x, eof, optETS)</div><div>printVarSummary( eof )<br>  printVarSummary( eof_ts )<br>return<br>; =================================================================<br>; Perform varimax rotation<br>; =================================================================<br><br>  eof_rot = eofunc_varimax_Wrap( eof, 1 )<br>  printVarSummary( eof_rot )<br>  print("eof_rot: min="+min(eof_rot)+"   max="+max(eof_rot) )<br><br>; =================================================================<br>; put into descending order<br>; =================================================================<br><br>  eofunc_varimax_reorder( eof_rot )<br>  printVarSummary( eof_rot )<br><br>; =================================================================<br>; Normalize time series: Sum spatial weights over the area of used<br>; =================================================================<br><br>  dimx   = dimsizes( x )<br>  mln    = dimx(1)<br>  sumWgt = mln*sum( clat )<br>  printVarSummary( sumWgt )<br>print(sumWgt)<br>  eof_ts = eof_ts/sumWgt ; <b>line 120</b><br>return</div></div>