<div dir="ltr"><div dir="ltr">Hello everyone,<div><br></div><div>I am trying to use 'reshape' to convert a 60 x 180 x 360 matrix to a 6 x 10 x 18 x 360 matrix in the following way:</div><div><br></div><div><div>        </div><div>          dir_s  ="/work/as10017/CESM/archive/Ensemble_means/yearly_means_h0/1993/"</div><div>          fil_s = systemfunc("ls "+dir_s+"/sps_199311_*_<a href="http://icef.cam.h0.6mth_grid.surface.nc">icef.cam.h0.6mth_grid.surface.nc</a>")</div><div>          f_s = addfiles(fil_s,"r")</div><div>         t2m_test2 = f_s[:]->TREFHT</div><div><br></div><div>        printVarSummary(t2m_test2)</div><div>        t2m_reshape = reshape(t2m_test2,(/6,10,180,360/))</div><div>        copy_VarCoords(t2m_test2(0,:,:), t2m_reshape(0,0,:,:))</div><div>        printVarSummary(t2m_reshape)</div><div><br></div></div><div><br></div><div>I am getting the 1st dimension of my 60 x 180 x 360  array by using a wildcard (*) and 'systemfunc' so that it concatenates (in a folder) 10 files with each 6 x 180 x 360 dimensions (months x mlat x nlon). I then reshaped the 60 x 180 x 360  array so as to reflect the original file structure : 6 x 10 x 180 x 360 (months x member x mlat x nlon).</div><div><br></div><div>This worked fine, however, if I check with </div><div><br></div><div><div> print(t2m_test2(4,0,0))</div><div> print(t2m_reshape(4,0,0,0))</div></div><div><br></div><div>I do not get the same values (223 Kelvin vs. 221 Kelvin). Did I miss something here?</div><div><br></div><div><br></div><div>thanks</div><div>Anne</div></div></div>