Deposition of semiconductor films is a key process for production of thin-film solar cells, such as CdTe or CIGS cells. In order to optimize photovoltaic properties of the film a comprehensive model of the deposition process should be build, which can relate deposition conditions and film properties. We have developed a multiscale model of deposition of CdTe film in close space sublimation (CSS) process. The model is based on kinetic Monte Carlo method on the rigid lattice, in which each site can be occupied by either Cd or Te atom. The model tabulates the energy of the site as a function of its local environment. These energies were obtained from first-principles calculates and then approximated with analytical formulas. Based on determined energies of each site we performed exchange (diffusion) processes using Metropolis algorithm. In addition the model included adsorption and desorption processes of Cd and Te2 species. The results of the model show that a steady-state structure of the surface layer is formed during film growth. The model can reproduce transition from film deposition to film etching depending on external conditions. Moreover, the model can predict deposition rates for non-stoichiometric gas compositions.