<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Dear all nil users<span class="Apple-tab-span" style="white-space:pre">        </span><div><br></div><div>I am trying to get plots from each month and year. One file contains all 7 years and 12 months values. So, I used reshape but I got a problem. I try to follow the reshape example in the website but it is not working. How can I fix it?</div><div><br></div><div>Thank you for any help</div><div>Sun-</div><div><br></div><div>This is what I got&nbsp;</div><div><br></div><div>fatal:Argument type mismatch on argument (0) of (reshape) can not coerce</div><div>fatal:["Execute.c":7743]:Execute: Error occurred at or near line 53 in file CMIP5_ec.ncl</div><div><br></div><div><br></div><div>; ==============================================================</div><div>; Open the file:</div><div>; ==============================================================</div><div>&nbsp; fili &nbsp; &nbsp;= "ec550aer_aero_NorESM1-M_historicalExt_"+version(ii)+"i1p1_200601-201212.nc"</div><div>&nbsp; varname = "ec550aer”&nbsp;</div><div><div>&nbsp;filenc &nbsp; &nbsp; &nbsp; = addfile (diri+fili+".nc", "r") &nbsp; &nbsp; &nbsp;; entire file</div><div>; &nbsp;print (varname)</div><div>; &nbsp;print (filenc)</div><div><br></div><div>&nbsp; data &nbsp; = filenc-&gt;$varname$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; (time, ver, lat, lon)</div><div>; &nbsp;print (dimsizes(data))</div><div>&nbsp; time =filenc-&gt;time</div><div>&nbsp; lev =filenc-&gt;lev</div><div>&nbsp; lat =filenc-&gt;lat</div><div>&nbsp; lon =filenc-&gt;lon</div><div>&nbsp; data@_FillValue= 0</div><div><br></div><div>; &nbsp;printVarSummary(data)</div><div>; &nbsp;print(dimsizes(time))</div><div>; &nbsp;return</div><div><br></div><div>&nbsp; ntim = dimsizes(time)</div></div><div><div>&nbsp; nlev = dimsizes(lev)</div><div>&nbsp; nlat = dimsizes(lat)</div><div>&nbsp; nlon = dimsizes(lon)</div><div>&nbsp; nyears = ntim/12</div><div><br></div><div>; &nbsp;printVarSummary(ntim)</div><div>; &nbsp;printVarSummary(nyears)</div><div>; &nbsp;print(ntim)</div><div>; &nbsp;print(nyears)</div><div><br></div><div>&nbsp; <font color="#e32400">ecreshape = reshape(varname,(/nyears,12,nlev,nlat,nlon/))</font></div><div>; &nbsp;reec550nm = reshape(ecreshape(:,0:2,:,:,:),(/nyears*12,nlev,nlat,nlon/))</div><div>&nbsp; printVarSummary(ecreshape)</div><div>; &nbsp;printVarSummary(ec550nm)</div><div>&nbsp; return</div><div><br></div></div><div><br></div></body></html>