The closed orbit distortion (COD) and its correction in the presence of field and alignment errors of magnets, for the heavy ion cooling storage ring (named CSRm), have been simulated on the basis of linear lattice of CSRm. In a typical case the maximum COD before correction is 3.08 mm and 2.73 mm for horizontal plane and vertical plane, respectively. The simulation shows that the COD of CSRm can be limited with in a sufficiently small range.